This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Unable to run a main class from of the jar files in a Library added to the project with F6 without having a Sources packages associated with the project. This worked fine in NB 6.1 before I have downloaded the latest set of patches a few days ago... By adding an empty src folder back to Sources, F6 works fine. Getting: NullPointerException at org.netbeans.modules.java.source.classpath.CacheClassPath.<init>
I am rising the priority for this issue (I can only guess it is a result of the new CompileOnSave function??), as it is quite important for me... It is not possible to run a main class from the jar file now. This effectively prevents users to develop applications using some middleware framework. For example I am now unable to use JADE (Java Agent DEvelopment) Framework. Note: I have written an article in Czech language about "How to make JADE running under NB 6.1", and now it does not work... annoying... If you understand Czech, you can use it to reproduce the issue: http://joshis.iprofil.cz/clanek-14-navod-jak-rozchodit-platformu-jade-v-netbeans-6.1 http://jade.tilab.com/
I guess two different problems are described here: -the original problem seems like issue #136970, although it is difficult to be sure without the stack trace -the joshis' problem seems like issue #139630 *** This issue has been marked as a duplicate of 139630 ***
Product Version: NetBeans IDE Dev (Build 080813) Java: 1.5.0_15; Java HotSpot(TM) 64-Bit Server VM 1.5.0_15-b04 System: Linux version 2.6.24-19-generic running on amd64; UTF-8; en_US (nb) Userdir: /home/joshis/Documents/NetBeansSources/main/nbbuild/testuserdir I am reopening this issue. It is still not possible to run a main class that is contained in a JAR file that is added to the libraries. This can make IDE fully useless for development of certain (not a rare one) types of middleware.
The problem is that the main class which is located in jar on classpath isn't listed when selecting main class But there are two very simply workarounds 1) create new main class calling the original main method or 2) enter the name of main class manually in the configuration
Workaround 1) is probably possible but it is not acceptable as this is not the way you use the middleware (manual to similar middleware solution does not mention this workaround step). 2) - yes, you are right, I know that it is not listed, but this is another issue, it is not the problem I mention here. Even if you manually type it int the configuration, it does not work (I have sent a project to jlahoda). I would still suggest P2 priority... Someone who meets this issue will not submit it, he/she would just say the NB is not mature enough to handle this case...
Another note: it works correctly when you disable COS... just tested... so maybe a P3, but a bad one...
*** Issue 144231 has been marked as a duplicate of this issue. ***
Running a main class from a jar file should work now for CoS (in the same way as it works for the ant build): http://hg.netbeans.org/main/rev/3ca62d75a91b
It is working as expected in: Product Version: NetBeans IDE Dev (Build 200810011401) Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b13 System: Linux version 2.6.24-19-generic running on i386; UTF-8; en_US (nb) Thank you, Honza...