1

I'm new to all the Java stuff so sorry in advance if i ever mislead.

I have Eclipse Java EE IDE for Web Developers. Version: Juno Service Release 2 and i installed JBoss Hibernate tools extension. And while i was trying to add a configuration as in http://furqanlabs.blogspot.com/2013/01/hibernate-and-oracle-configuration.html this tutorial, i got such an error:

"Project DmisService has higher compiler option than running Eclipse. Hibernate plugins unable to load its classes. Please decrease the compiler option or run the Eclipse with higher JDK level."

So to know which JDK level my eclipse is using i did the followings:

i typed java -version on the comman line and i came up with the following result: java version "1.8.0_11"

and when i checked my environment variable for JAVA_HOME it is C:\Program Files\Java\jdk1.6.0_30. and the Java Compiler setting is also 1.6 (as jre of the project as i understood) for my project.

So i came up with another questions -> Why command line gives me different java version than environment variable?

and my original question:

  1. what exactly (i am also new the java terms) should i do to fix this problem?

Thank you very much for any suggestion.

edit: i also checked with eclipse: System.out.println(System.getProperty("java.version")); and it gives me 1.6.0_30

user3114569
  • 11
  • 1
  • 4
  • You likely have 2 versions of Java installed. CMD uses the one in Path, while Eclipse uses the one in JAVA_HOME. Just point your JAVA_HOME to the Java 8 one instead of the Java 6 one. Also, your Eclipse will likely need to be pointed to it as well, that is done in Preferences -> Java -> Installed JREs. After that go to the Compiler menu and change the compliance level to 1.8 – Ordous Sep 10 '14 at 11:09
  • check which path is entered under your "path" entry system variable. Check at both levels i.e user and system. For eclipse got o windows-->preferences-->java-->compiler and check java version – jsjunkie Sep 10 '14 at 11:11
  • Thank you very much this is what i got under my Path variable: C:\oraclexe\app\oracle\product\11.2.0\server\bin;;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\development\tools\maven\bin;C:\Program Files\Java\jdk1.6.0_30\bin and my JDK compliance is also 1.6 and the thing is that i am -for customer-related issues- required to use jdk 1.6 not 1.8 – user3114569 Sep 10 '14 at 11:20
  • Hi, Please did you resolved your issue, i have the same problem and i tryied for all the day whithout any solution. Thanks in advance – Tarik Nov 18 '14 at 17:44
  • hi Tarik as far as i remember i just set everything (including the os) over. sorry for not being able to help. – user3114569 Dec 26 '14 at 14:08
  • I came across the same issue and below link helped me! http://stackoverflow.com/questions/15027255/eclipse-java-8-support – Peru Aug 05 '16 at 18:17

1 Answers1

0

Adding Eclipse Java 8 Support helped me to resolve the issue!

Ref : Eclipse + Java 8 support?

Community
  • 1
  • 1
Peru
  • 1,827
  • 1
  • 12
  • 4