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 65895 - jar file not executing
Summary: jar file not executing
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 4.x
Hardware: Other Windows XP
: P3 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-04 19:08 UTC by drenner
Modified: 2011-08-31 14:06 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description drenner 2005-10-04 19:08:09 UTC
I am trying to execute a jar file but I get the following:


C:\JAVA\PROJECTS\DIST>echo %CLASSPATH% c:\java\projects\dist;c:\Program 
Files\netbeans-4.1\ide5\modules\ext\AbsoluteLay
out.jar

C:\JAVA\PROJECTS\DIST>java -jar gift_email.jar
Exception in thread "main" java.lang.NoClassDefFoundError: 
org/netbeans/lib/awtextra/AbsoluteLayout
        at giftrecpt.email.gift_email_gui.initComponents
(gift_email_gui.java:38)

        at giftrecpt.email.gift_email_gui.<init>(gift_email_gui.java:24)
        at giftrecpt.email.gift_email_gui.main(gift_email_gui.java:142)

C:\JAVA\PROJECTS\DIST>


I cannot figure out why the class def is not found when I have the reference 
to the jar in the classpath.

Also, in the project properties in netbeans I have the same reference to the 
absolutelayout.jar in the runtime libraries section. But in spite of the 
reference being in 2 locations it still will not work. 

If I put the reference within netbeans in the project properties/run-time 
libraries it seems that I shouldn’t even need to put it in the classpath for 
the machine. Is this correct?

I am using netbeans 4.1, jsdk 1.4.2_09

Thanks,

Dave ....
Comment 1 drenner 2005-10-04 23:02:39 UTC
i looked at the following site for this problem but it is not clear to me how 
you implement this solution:

http://forum.java.sun.com/thread.jspa?threadID=597783&messageID=3559095

1) how do you extract the class info from the jar as described below:

 Create "org.netbeans.lib.awtextra" package in your "src" folder and 
copy "AbsoluteLayout.class" and "AbsoluteConstraints.class" to this package. 
You'll find both classes in "<install-
dir>/ide4/modules/ext/AbsoluteLayout.jar".

also this article indicated that you could add a line to the manifest but in 
netbeans the mainfest is read only.

thanks