1. Download jdk installation file from http://www.oracle.com/technetwork/java/javase/downloads/index.html.

  a) If the file you download is rpm file, you can use command [rpm -i *.rpm] to start installing it.

  b) If it's bin file, you can use command [./*.bin] to start installing it.

   Then you can finish the installation following the wizard with the default option.

2. Set environment.

  Add the following code to the end of a certain configuration file.

  #set java environment

  JAVA_HOME=/usr/java/jdk1.6.0_29

  CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar

  PATH=$JAVA_HOME/bin:$PATH

  export JAVA_HOME CLASSPATH PATH

  a) Add it to file /etc/profile if you want everyone has this java environment.

  b) Add it to file ~/.profile if you just want that current user has this java environment.

相关文章:

  • 2021-06-19
  • 2022-12-23
  • 2022-12-23
  • 2021-08-31
  • 2021-11-29
  • 2021-06-02
  • 2021-11-11
  • 2022-03-09
猜你喜欢
  • 2022-01-13
  • 2022-12-23
  • 2021-06-14
  • 2022-12-23
  • 2021-12-01
  • 2022-12-23
  • 2021-07-30
相关资源
相似解决方案