尝试安装java后开机弹窗
Tofloor
poster avatar
182******38
deepin
2017-11-05 09:46
Author
本来想尝试安装下linux版我的世界,按照网上教程安装完java后,时间太晚了关机卡在logo的地方,强制关机后在启动时出现
这是怎么回事
Reply Favorite View the author
All Replies
avatar
oldfeel
deepin
2017-11-05 09:59
#1
意思是环境变量那里出错了.
编辑环境变量配置文件
  1. sudo gedit /etc/profile
Copy the Code

修改第36行,看看冒号(分割的目录是否存在,大写字母的 JAVA_HOME/JRE_HOME 要另起一行.
或者把你的 /etc/profile 内容贴出来.我们帮你看看.

Reply View the author
avatar
182******38
deepin
2017-11-05 17:26
#2
Reply View the author
avatar
182******38
deepin
2017-11-05 17:32
#3
是这个吗
Reply View the author
avatar
182******38
deepin
2017-11-05 17:33
#4
http://pan.baidu.com/s/1c2m3ZMw
Reply View the author
avatar
182******38
deepin
2017-11-05 17:49
#5
https://bbs.deepin.org/post/147723
意思是环境变量那里出错了.
编辑环境变量配置文件

# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ "`id -u`" -eq 0 ]; then
  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
else
  PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/sbin:/usr/sbin"
fi
export PATH

if [ "$PS1" ]; then
  if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then
    # The file bash.bashrc already sets the default PS1.
    # PS1='\h:\w\$ '
    if [ -f /etc/bash.bashrc ]; then
      . /etc/bash.bashrc
    fi
  else
    if [ "`id -u`" -eq 0 ]; then
      PS1='# '
    else
      PS1='$ '
    fi
  fi
fi

if [ -d /etc/profile.d ]; then
  for i in /etc/profile.d/*.sh; do
    if [ -r $i ]; then
      . $i
    fi
  done
  unset i
fi
tty | egrep -q tty[1-6] && export LC_ALL=C
n#javanJAVA_HOME=/usr/local/java/jdknJRE_HOME=/usr/local/java/jrenPATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin:/root/bin:/bin:/binnexport JAVA_HOMEnexport JRE_HOMEnexport PATH

Reply View the author
avatar
sz******iy@vip.qq.com
deepin
2017-11-05 19:32
#6
本帖最后由 plmnhy 于 2017-11-5 11:36 编辑

从tty | egrep -q tty[1-6] && export LC_ALL=C下面一行开始,
先找到你的jdk的解压目录,比如就假设你解压到了/usr/local/java/jdkn
那么接下来配置和win类似,指定一个JAVA_HOME,一个JRE_HOME,一个CLASSPATH,然后再写到PATH里。
可以照抄下面的,修改下JAVA_HOME的地址。
export JAVA_HOME=jdk解压目录
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.{JAVA_HOME}/lib:{JRE_HOME}/lib
export PATH=$PATH{JAVA_HOME}/lib:
我的世界启动可以用HMCL,地址:http://www.mcbbs.net/thread-142335-1-1.html
下载到一个jar文件,随便扔到一个地方。打开终端执行:java -jar xxxxx.jar
然后固定图标到dock上,以后用托盘打开就行。
HMCL的mc游戏文件是存在.jar文件的同级目录里的。


Reply View the author
avatar
182******38
deepin
2017-11-05 20:32
#7
https://bbs.deepin.org/post/147723
从tty | egrep -q tty[1-6] && export LC_ALL=C下面一行开始,
先找到你的jdk的解压目录,比如就假设你解压 ...

按照你的教程搞定了谢谢
Reply View the author
avatar
134******40
deepin
2017-11-05 20:34
#8

你这能看清楚吗?
Reply View the author
avatar
134******40
deepin
2017-11-05 20:38
#9
https://bbs.deepin.org/post/147723
从tty | egrep -q tty[1-6] && export LC_ALL=C下面一行开始,
先找到你的jdk的解压目录,比如就假设你解压 ...
  1. export PATH=$PATH:${JAVA_HOME}/lib:
Copy the Code

这一行有误,稍微调整一下吧:
  1. export PATH=$PATH:${JAVA_HOME}/bin:
Copy the Code
Reply View the author
avatar
sz******iy@vip.qq.com
deepin
2017-11-05 20:53
#10
https://bbs.deepin.org/post/147723
这一行有误,稍微调整一下吧:

我天。我以前竟然放的这儿,没出错也太神奇了
Reply View the author