Eclipse cannot find Java on Ubuntu

后端 未结 8 1136
自闭症患者
自闭症患者 2021-02-09 05:38

Java is properly installed in my Ubuntu 12.04 and the PATH variable is set in the .bashrc file.

The command java -version gives an expected out

8条回答
  •  旧巷少年郎
    2021-02-09 06:03

    The Eclipse read me document has helped me solve this issue clearly.

    If this seems to solve the problem, it is likely that the problem really was related to the use of GCJ as the Java runtime for running Eclipse. The eclipse.ini file located within Eclipse's folder can be altered to automatically pass this argument to Eclipse at startup. An example of its content is presented below:

      -showsplash
      org.eclipse.platform
      -vm
      /opt/jdk-1.8/bin/java
      -vmargs
      -Xms256m
      -Xmx1024m
    

    So I had to put this the line before the -vmargs

提交回复
热议问题