Hey, when compiling one of my .java files I get the message
"package jxl does not exist
import jxl.WorkbookSettings;"
I've changed the classpath so it'll point to the jar file but still nothing.
Any ideas?
Printable View
Hey, when compiling one of my .java files I get the message
"package jxl does not exist
import jxl.WorkbookSettings;"
I've changed the classpath so it'll point to the jar file but still nothing.
Any ideas?
Either your classpath is still incorrect or that package doesn't exist; btw, you can check the contents of your .jar file with an ordinary zip application.
kind regards,
Jos
The importing for the file is
I copied the jxl.jar straight into my C: drive so the classpath is C:\jxl.jar.Code:import jxl.Workbook;
import jxl.WorkbookSettings;
import jxl.format.Alignment;
import jxl.format.Border;
import jxl.format.BorderLineStyle;
import jxl.write.*;
import jxl.write.Number;
Any ideas what is wrong?
P.S. Just checked the jar file, I contains everything I need
OK, got it sorted, well my classpath still won't recognise it so have to put in the full classpath when compiling, thanks for the help
This works to me:
1-Change or set the CLASSPATH in Environment Variables:
* Open Explorer (Windows-E)
* Right-click on Computer
* Select Properties
* On the "Advanced" Tab select "Environment Variables..."
* On System variables window, Edit or Add a new variable named: CLASSPATH
* On Variable Value set the place where jxl.jar is, example: .;C:\YourPath\jxl.jar
2-Open a new CMD window and compile as usual.
@
Please don't post to old dead threads. The question was adequately answered 2½ years ago.
Moreover, the preferred way to do things is to set the classpath via the -cp flag on the command line or the Class-Path header field in the manifest file of an applet or application. Not by setting the system environment variable.
db
THREAD CLOSED