Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Tool]How to Compile With Netbeans [Detailed]

Custom Title Activated
Loyal Member
Joined
Jan 18, 2010
Messages
3,109
Reaction score
1,139
C:\Users\Owner\Desktop\Dynasty v83\src\scripting\reactor\ReactorScriptManager.java:44: error: diamond operator is not supported in -source 1.6
private Map<Integer, List<ReactorDropEntry>> drops = new HashMap<>();
(use -source 7 or higher to enable diamond operator)
C:\Users\Owner\Desktop\Dynasty v83\src\scripting\reactor\ReactorScriptManager.java:60: error: multi-catch statement is not supported in -source 1.6
} catch (final ScriptException | NoSuchMethodException | NullPointerException e) {
(use -source 7 or higher to enable multi-catch statement)
C:\Users\Owner\Desktop\Dynasty v83\src\scripting\reactor\ReactorScriptManager.java:69: error: try-with-resources is not supported in -source 1.6
try (PreparedStatement ps = DatabaseConnection.getConnection().prepareStatement("SELECT itemid, chance, questid FROM reactordrops WHERE reactorid = ? AND chance >= 0")) {
(use -source 7 or higher to enable try-with-resources)
3 errors
C:\Users\Owner\Documents\NetBeansProjects\Dynasty\nbproject\build-impl.xml:601: The following error occurred while executing this line:
C:\Users\Owner\Documents\NetBeansProjects\Dynasty\nbproject\build-impl.xml:243: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 4 seconds)

sorry guys this is the problem i meet now can anyone help me please

Stop bumping threads and make a Help Thread. Your problem is that the Diamond Operator feature was implemented in Java 7, however you are using a Java 6 JDK. Upgrade to Java 7.
 
Newbie Spellweaver
Joined
Nov 24, 2015
Messages
15
Reaction score
0
Stop bumping threads and make a Help Thread. Your problem is that the Diamond Operator feature was implemented in Java 7, however you are using a Java 6 JDK. Upgrade to Java 7.

eric but im using JAVA7 right now o_O Jre7 and JDK1.7.0.1_05
 
Custom Title Activated
Loyal Member
Joined
Jan 18, 2010
Messages
3,109
Reaction score
1,139
eric but im using JAVA7 right now o_O Jre7 and JDK1.7.0.1_05

No you are not. If you were, it wouldn't say the diamond operator is not compatible on java source 1.6 (aka java 6). If you WERE using JDK7, it would work. Right click your source project in netbeans and click properties. Look for "Source/Binary Format" at the bottom and target JDK7 instead of JDK6 from the drop-down menu.
 
Newbie Spellweaver
Joined
Nov 24, 2015
Messages
15
Reaction score
0
No you are not. If you were, it wouldn't say the diamond operator is not compatible on java source 1.6 (aka java 6). If you WERE using JDK7, it would work. Right click your source project in netbeans and click properties. Look for "Source/Binary Format" at the bottom and target JDK7 instead of JDK6 from the drop-down menu.

Ahh i cant see the source/binary format when i right click and click properties on my project name in MYDOCUMENT/Netbeanproject/... Eric can u add me on skype pheekaisheng.. ohya is the version of JAVA7 will affect the compile? like JDK7u80 or JDK7u05 or whatever
 
Last edited:
Newbie Spellweaver
Joined
Apr 28, 2012
Messages
13
Reaction score
1
Anyone have any idea what I did wrong? I followed all of the directions in this tutorial. This is just the beginning of a huge list of errors when I try to compile.


Any help is greatly appreciated !



I am using jdk1.7.0_45 and jre7



What do you know, with a little bit of research I solved my problem. This may help someone else so I am going to share how I fixed it. Right click your project and go to "properties". Select "sources". On the bottom your will see "Source/Binary Format". Change the format to JDK 7 or whatever fits your need. Hope this helps someone.

Hey you, you're amazing you know that? Thanks for solving this issue that has caused many thousands of their lives. I'm quite proud of humanity actually that even when you managed to solve the problem you still sent the solution here just to help others. amazing
 
Back
Top