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.
I have a main method in one of my Web Application classes. I use it to run a parser to populate a database. However, my main method depends on a 3rd party library and Netbeans is not adding this library to the classpath (despite being correctly copied to the right place in the dist folder and war file). This is a bug... the run-main classes should have the library dependencies on their classpath.
I just realised that the difficulty here may be because the 3rd party lib that I use is not in the Libraries, it is in the "Package with" list (i.e. the runtime library).
Reassigning to "web" for evaluation.
Following could help: edit project.properties and edit debug.classpath (should have been named run.classpath) and add to the end value ":${war.content.additional}" (that's the property which holds your runtime items to pack in WAR). Please confirm if it resolved your issue. Perhaps war.content.additional property should have been always automatically in debug.classpath?
It sounds like this issue can be closed. The reason is because the libraries where not place in the libraries, therefore where not placed on the classpath.
NetBeans.org Migration: changing resolution from LATER to WONTFIX