F
Frank Wood
I am developing a small front-end utilizing the AbsoluteLayout layout
from the AbsoluteLayout.jar file (which contains AbsoluteLayout.class
and AbsoluteConstraints.class), which comes from NetBeans 3.5.1.
My file is named Tray.java. I compile this down to Tray.class. I can
run this just fine from the command prompt with:
java.exe -classpath "c:\program
files\j2sdk_nb\netbeans3.5.1\modules\ext\AbsoluteLayout.jar";c:\tray
Tray
Of course, I can run it from the IDE in NetBeans as well with no
problems. My problem is attempting to run it all as a JAR file. I
create the jar file like (from the folder where the Tray*.class files
are located) this:
jar -cfm Tray.jar manifest.txt Tray*.class "c:\program
Files\j2sdk_nb\netbeans3.5.1\modules\ext\AbsoluteLayout.jar"
The manifest.txt file looks like this:
Main-Class: Tray
Class-Path: .;"c:\program
files\j2sdk_nb\netbeans3.5.1\modules\ext\AbsoluteLayout.jar"
Anyway, when I try to run the JAR file from the command prompt (as I
sit in the folder where the Tray.jar file I just created resides):
java -jar Tray.jar
I get:
C:\Tray>java -jar Tray.jar
Exception in thread "main" java.lang.NoClassDefFoundError:
org/netbeans/lib/awte
xtra/AbsoluteLayout
at Tray.initComponents(Tray.java:85)
at Tray.<init>(Tray.java:15)
at Tray.main(Tray.java:522)
As you can probably tell, I'm fairly new at Java and have been able to
hurdle a number of things so far - but this one I haven't been able to
quite get over. I'm guessing that for whatever reason, it can't find
the AbsoluteLayout class that I need for my program to run.
Any help with this issue sure would be appreciated.
Thanks,
Frank Wood
from the AbsoluteLayout.jar file (which contains AbsoluteLayout.class
and AbsoluteConstraints.class), which comes from NetBeans 3.5.1.
My file is named Tray.java. I compile this down to Tray.class. I can
run this just fine from the command prompt with:
java.exe -classpath "c:\program
files\j2sdk_nb\netbeans3.5.1\modules\ext\AbsoluteLayout.jar";c:\tray
Tray
Of course, I can run it from the IDE in NetBeans as well with no
problems. My problem is attempting to run it all as a JAR file. I
create the jar file like (from the folder where the Tray*.class files
are located) this:
jar -cfm Tray.jar manifest.txt Tray*.class "c:\program
Files\j2sdk_nb\netbeans3.5.1\modules\ext\AbsoluteLayout.jar"
The manifest.txt file looks like this:
Main-Class: Tray
Class-Path: .;"c:\program
files\j2sdk_nb\netbeans3.5.1\modules\ext\AbsoluteLayout.jar"
Anyway, when I try to run the JAR file from the command prompt (as I
sit in the folder where the Tray.jar file I just created resides):
java -jar Tray.jar
I get:
C:\Tray>java -jar Tray.jar
Exception in thread "main" java.lang.NoClassDefFoundError:
org/netbeans/lib/awte
xtra/AbsoluteLayout
at Tray.initComponents(Tray.java:85)
at Tray.<init>(Tray.java:15)
at Tray.main(Tray.java:522)
As you can probably tell, I'm fairly new at Java and have been able to
hurdle a number of things so far - but this one I haven't been able to
quite get over. I'm guessing that for whatever reason, it can't find
the AbsoluteLayout class that I need for my program to run.
Any help with this issue sure would be appreciated.
Thanks,
Frank Wood