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.
Cannot set main class form libraries in the project cutomizer's run panel According to the Issue 57274 (http://www.netbeans.org/issues/show_bug.cgi?id=57274&x=0&y=0), the problem is really resolved partly in 4.1, you can write directly the name of the class into the name field, but it doesn't work in lasted dev build(200508041800) again, even by the suggestion. Because it is a severe issue IMO. and I don't know whether the developer could see my comment(comments in a existed issue), I open this new issue. BTW. any plan to fix it currently? -pprun
It seems as a regresion, I will try to find out what has changed in the javacore. It has to be fixed in the 4.2
It seems to be a problem of javacore: The classname is test.Main The classpath which is set to JavaModel is: ClassPath[Entry[file:/tmp/00/XXX/build/classes/], Entry[jar:file:/tmp/00/lib.jar!/]] The lib.jar contains the test.Main which can be run from the command line. JavaModel.setClassPath (classpath); JavaModel.getDefaultExtent().getType().resolve(classname) returns UnresolvedClass$Impl
*** Issue 65282 has been marked as a duplicate of this issue. ***
I can set test.Main as a project main class even if test.Main is in the library. Please reopen this issue if you can reproduce this bug. Thanks.
Oh, it is not for me. I just simply add a test library - server.jar(from cajo.dev.java.net) and it contains example.Main class. When I Run my test project, the Select Main Class dialog appeared because it is saying "example.Main class wasn't found in ... project" see my screenshot attached and the test library server.jar -pprun
not worked for me.
Created attachment 25521 [details] my scrrenshot
Created attachment 25522 [details] the test library server.jar
Yes, I can reproduce it! Problem is probably not in javacore, but in filesystems or ClassPath. Problem is, that, ClassPath.getRoots()[0].getPath() returns "", but corresponding ClassPath entry is Entry[jar:file:/C:/server.jar!/] In debugger i can see strange thing: root.toString() = "AbstractFileObject@487efd[jar:file:/C:/server.jar!/]" root.getPath() = "" Radku, can you evaluate it? Thanks.
Nothing strange from my point of view.
Sorry I was wrong. Problem was in ResourceImpl: Checking in ResourceImpl.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/ResourceImpl.java,v <-- ResourceImpl.java new revision: 1.104; previous revision: 1.103 done
Reorganization of java component