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.

Bug 61909 - cannot set main class form libraries in the project cutomizer's run panel
Summary: cannot set main class form libraries in the project cutomizer's run panel
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
: 65282 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-08-08 07:03 UTC by pzgyuanf
Modified: 2007-09-26 09:14 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
my scrrenshot (20.01 KB, image/png)
2005-10-04 16:11 UTC, pzgyuanf
Details
the test library server.jar (55.62 KB, application/octet-stream)
2005-10-04 16:12 UTC, pzgyuanf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pzgyuanf 2005-08-08 07:03:50 UTC
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
Comment 1 Tomas Zezula 2005-08-15 10:59:14 UTC
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
Comment 2 Tomas Zezula 2005-09-16 12:49:33 UTC
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

Comment 3 Tomas Zezula 2005-10-04 11:14:25 UTC
*** Issue 65282 has been marked as a duplicate of this issue. ***
Comment 4 Jan Becicka 2005-10-04 15:33:43 UTC
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.
Comment 5 pzgyuanf 2005-10-04 16:09:45 UTC
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
Comment 6 pzgyuanf 2005-10-04 16:10:37 UTC
not worked for me.
Comment 7 pzgyuanf 2005-10-04 16:11:12 UTC
Created attachment 25521 [details]
my scrrenshot
Comment 8 pzgyuanf 2005-10-04 16:12:09 UTC
Created attachment 25522 [details]
the test library server.jar
Comment 9 Jan Becicka 2005-10-05 08:52:57 UTC
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.
Comment 10 rmatous 2005-10-05 10:10:55 UTC
Nothing strange from my point of view.
Comment 11 Jan Becicka 2005-10-05 10:44:59 UTC
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
Comment 12 Quality Engineering 2007-09-20 10:40:02 UTC
Reorganization of java component