0

I've been building an application in NetBeans with JDK 7 and I now realize I want to update to JDK 8 but when I try to run it with JDK 8 installed I get an error that talks about an unsupported version.

Any ideas? I don't want to use JDK 7 at all anymore, I just want to leave that behind and update to JDK 8.

Thanks in advance!

Tresk33
  • 61
  • 3
  • 9
  • 1
    You must be running it with Java 7, once compiled with Java 8 (unless set to target 7) it won't run with an earlier version. And if you do target 7, then you can't use the features not present in 7. – Elliott Frisch Feb 09 '17 at 03:32
  • Elliott Frisch, how would I fix this in Netbeans? – Tresk33 Feb 09 '17 at 05:06
  • Why do you think the problem is Netbeans? Go to the command line, and type `java -version`. What do you get? – Elliott Frisch Feb 09 '17 at 05:13
  • It says 1.8.0_121, my program built in 1.7, I go to run it after I've updated my NetBeans to 1.8 I get a Major.Minor error – Tresk33 Feb 09 '17 at 05:18
  • Java 1.8 can run bytecode from 1.7 (in general). Exactly what major.minor error? – Elliott Frisch Feb 09 '17 at 05:20
  • the number it gives is 52 – Tresk33 Feb 09 '17 at 05:22
  • And how are you running your program? – Elliott Frisch Feb 09 '17 at 05:23
  • If you're asking how I launch it I just right click the Project in NetBeans and click run – Tresk33 Feb 09 '17 at 05:27
  • 1
    Then check your configured launch configuration; it's still set to a 1.7 JRE. – Elliott Frisch Feb 09 '17 at 05:29
  • I've tried completely uninstalling NetBeans and all JDK's and reinstalling the newest software i.e. JDK 8 and NetBeans 8.2 and then importing my project and I still get the same error. At that point JDK 7 wasn't even in the question – Tresk33 Feb 09 '17 at 05:32
  • Right click on your project folder and make sure you have all supporting libraries. While under the libraries label make sure your java platform is set to the lastest JDK. If not use Manage Platforms to add the latest JDK. Then select it. – SedJ601 Feb 09 '17 at 14:28

0 Answers0