the classpath ... that would be on the comand prompt:
$ java -jar -classpath .\jxl.jar WorkApp3.jar
right? if the jxl.jar and my WorkApp3.jar are both in the same
directory?
i still get the same error? or am i doing the classpath wrong?
> the classpath ... that would be on the comand prompt:
>
[quoted text clipped - 4 lines]
>
> i still get the same error? or am i doing the classpath wrong?
I can't remember the exact details but I was having classpath
trouble when using the "-jar" flag.
I tried a whole bunch of things and just kept banging away till it worked.
Try putting the jxl.jar in your
directory outside the jar file,
in fact try taking all the classes out of the jar file,
and using "java" instead of "java -jar"
TheNewf@gmail.com - 28 Jun 2005 03:13 GMT
umm... I tried as you suggested....i complied my files with little
trouble. but when i try to run them:
$ java -classpath .\jxl.jar Main
Exception in thread "main" java.lang.NoClassDefFoundError: Main
but when i tried:
$ java -classpath .\ Main
Exception in thread "main" java.lang.NoClassDefFoundError:
jxl/read/biff/BiffException
at Main.<init>(Main.java:35)
at Main.main(Main.java:64)
so in my directory i have:
ExcelData.class
ExcelData.java
jxl.jar
Main.class
Main.java
I just thought of trying this while writing this response:
$ java -classpath .\;.\jxl.jar Main
and it worked. Thank you Joan for the idea!!
now how am i able to get it so that it's all neat and tidy in a jar
file, so i don't have a bunch of files lying around? and is their a way
to set the classpath in the manifest file?
Robert kebernet Cooper - 28 Jun 2005 03:36 GMT
If you put the jxl.jar in the same directory as your jar and specify
"Class-Path: ./jxl.jar" in your Manifest file, you should get the
effect you are looking for.
TheNewf@gmail.com - 28 Jun 2005 04:40 GMT
Thanks it's working almost perfectly.. thanks.
I hope this is my final question but I need a lot of memory to run this
program. I know the command:
$ java -Xms10m -Xmx100m -jar WorkApp3.jar
But I was wondering if it were possible to add this to the manifest
file or in the program itself so that I can just double click on the
WorkApp3.jar file and it will run with the extra memory that it
requires, rather then runing from dos?
> the classpath ... that would be on the comand prompt:
>
[quoted text clipped - 4 lines]
>
> i still get the same error? or am i doing the classpath wrong?
The -jar options and the -classpath options are incompatible. RTFM, it
came with the JDK.
Ray

Signature
XML is the programmer's duct tape.
TheNewf@gmail.com - 29 Jun 2005 05:52 GMT
I read the manual and i was wondering if their was a way to do the
memory Allocation i need thats the not the jar.
TheNewf@gmail.com - 29 Jun 2005 05:52 GMT
I read the manual and i was wondering if their was a way to do the
memory Allocation i need thats the (-Xms10m -Xmx100m) not the jar.
TheNewf@gmail.com - 29 Jun 2005 05:54 GMT
I Read the manual... i was wondering about the memory Allocation i
need.... that the -Xms10m -Xmx100m if you didn't read the question. not
the jar