[Java] Compile in Java 6 with NetBeans

Solved
canarder Posted messages 2034 Status Membre -  
canarder Posted messages 2034 Status Membre -
Hello,

I have NetBeans 7.1.1 with JDK 1.7.0_04.
It compiles my project for Java 7 while I need it to work under Java 6 (or Java 5 if possible according to a Google search on the subject).
Can I choose to switch between Java 6 for some projects and Java 7 for others?
Or how can I make it compile for Java 6?

I am creating a Minecraft plugin (CraftBukkit), and it works very well on a server launched with Java 7, but does not work if launched with Java 6 (errors are displayed and thus the plugin is not launched).

I assume I need to install a lower version JDK, but I would still like to be able to choose between JDKs or know which file contains the information on which JDK to use for compilation.

PS: Since I will be reinstalling NetBeans on another computer this weekend, could I have the links to the JDK and the version of NetBeans to use?

Thank you for your help.

2 réponses

KX Posted messages 19031 Status Modérateur 3 020
 
It is not necessary to have the lower JDKs, the most recent ones are compatible with previous versions. However, you need to configure NetBeans, look:
Cross-Compilation between Java Platforms.
--
Trust does not exclude control.
0
canarder Posted messages 2034 Status Membre 357
 
Actually, I found it in the project properties. And I have to use a lower version http://forums.bukkit.org/threads/unsupported-major-minor-version-51-0.48687/.
--
___/\_canarder_/\___
The Fox that reigns over the WEB: Firefox
0