Category Archives: Assignment

Configure jdk in Ubuntu(Install)

1.download the jdk in the oracle website.
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
2.extract the source code from the tar.gz
tar -zvxf ~.tar.gz
3.setup the enviroment variable
vim ~/.bashrc
4.Add following in the last line
export JAVA_HOME=/usr/local/java/jdk1.8.0_25(Specify your own path)
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
5.Save and Quit
source ~/.bashrc
6.Check if you set up successfully
java -version

Solve the “version 1.7 of the jvm is not suitable for this product. version 1.8 greater is required for eclipse nano in window”

When I download the eclipse for java, I found that I cannot run the eclipse.exe due to the “version 1.7 of the jvm is not suitable for this product. version 1.8 greater is required for eclipse neon in window”. I have installed the new java development kit in my D:/.

The reason is that we don’t specify the environment variable.

To solve this problem we just need add several environment variables in “System Variables”

To find the  system variable: control panel  –> System –> Advanced System Setting  –> Environment varibles

Add the following varibles by adding “NEW” :

  • Variable name :   JAVA_HOME
  • Variable valueC:\Program Files (x86)\Java\jdk1.8.0_91       (The path you installed the jdk)
  • Variable name:  CLASSPATH
  • Variable value:   .;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;         //don’t forget the “.”
  • Variable namePath
  • Variable value%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;

Then Reexecute your eclipse. The problem is probably resolved.