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 144231 - Running Main Class from library jar
Summary: Running Main Class from library jar
Status: RESOLVED DUPLICATE of bug 139404
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-18 10:03 UTC by rgw21
Modified: 2008-08-23 11:46 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rgw21 2008-08-18 10:03:22 UTC
Hi, 

I installed the new beta version of netbeans 6.5, and I faced a problem when I tried to run my java application that 
wasn't there before.

My main class is in a jar file and that jar is defined to my project libraries (Compile & Run), when I try to run the 
project, the system does nothing...

PS. same project with same setup is working fine under netbeans 6.1.

Thanks,
Raed Wakileh
Software Engineer
Comment 1 Tomas Danek 2008-08-18 16:00:45 UTC
Hi,
could you please describe some steps how to reproduce? Something like create project A, library B, cerate main class in
A,  set dependency in project A on library B...something that we may reproduce (and try to fix).

Thanks in advance...
Comment 2 Milos Kleint 2008-08-19 08:28:41 UTC
rgw21: it would be great, if you could create a sample project setup demonstrating the problem. Thanks.
jlahoda: could this be related to compile on save?
Comment 3 Tomas Danek 2008-08-19 10:20:28 UTC
Pasting steps to reproduce from reporter:
-------------------------------------------
Hi,  To Duplicate My Case, please follow the next steps:

- Create new java Project A.
- Create main class in project A
- Build Project A

- Create a new Project "B" without adding main class
- Go to Project "B" properties and add project "A" jar
- On Project B properties go to Run--> Main Class=a.main
- On Netbeans 6.5 beta, a message appear that a.main wasn't found in B project
This used to work fine on Netbeans 6.1, but didn't work on netbeans 6.5 beta
-Thanks,
Raed
Comment 4 Tomas Danek 2008-08-19 10:45:17 UTC
btw can't be the problem that in 6.5 beta is by default Build action disabled because of compile on save? therefore
classes are compiled, but jar itself (needed for project B) is not built?
Comment 5 Tomas Danek 2008-08-19 12:31:15 UTC
we got another info from reporter:
Yes, it worked fine when i unchecked(disable) "compile on save" from project "B".
Comment 6 Milos Kleint 2008-08-22 14:29:04 UTC
-> jlahoda
Comment 7 Jan Lahoda 2008-08-23 11:46:41 UTC

*** This issue has been marked as a duplicate of 139404 ***