netbeans-6.9

Export JAR with Netbeans

淺唱寂寞╮ 提交于 2019-11-26 08:14:40
问题 How to export java project to JAR with Netbeans ? I cannot find options like in Eclipse. 回答1: You need to enable the option Project Properties -> Build -> Packaging -> Build JAR after compiling (but this is enabled by default) 回答2: Do you mean compile it to JAR? NetBeans does that automatically, just do "clean and build" and look in the "dist" subdirectory of your project. There will be the JAR with "lib" folder containing the required libraries. These JAR + lib are enough to run the

Leaking this in constructor warning

ぃ、小莉子 提交于 2019-11-26 05:52:25
问题 I\'d like to avoid (most of the) warnings of Netbeans 6.9.1, and I have a problem with the \'Leaking this in constructor\' warning. I understand the problem, calling a method in the constructor and passing \" this \" is dangerous, since \" this \" may not have been fully initialized. It was easy to fix the warning in my singleton classes, because the constructor is private and only called from the same class. Old code (simplified): private Singleton() { ... addWindowFocusListener(this); }

Java, How to add library files in netbeans?

孤街醉人 提交于 2019-11-26 03:43:06
问题 I am new to the Netbeans IDE and Java. I have a java project that shows lot of compilation errors: can not import \"org.apache.commons.logging.Log\" Can somebody please help me with these errors, How do I add library files in Netbeans IDE? 回答1: Quick solution in NetBeans 6.8. In the Projects window right-click on the name of the project that lacks library -> Properties -> The Project Properties window opens. In Categories tree select "Libraries" node -> On the right side of the Project