Results 1 to 6 of 6
  1. #1
    Macca07 is offline Member
    Join Date
    Nov 2008
    Posts
    9
    Rep Power
    0

    Default package jxl does not exist ??? any ideas

    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?

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,524
    Blog Entries
    7
    Rep Power
    20

    Default

    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

  3. #3
    Macca07 is offline Member
    Join Date
    Nov 2008
    Posts
    9
    Rep Power
    0

    Default

    The importing for the file is

    Java 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;
    I copied the jxl.jar straight into my C: drive so the classpath is C:\jxl.jar.

    Any ideas what is wrong?

    P.S. Just checked the jar file, I contains everything I need

  4. #4
    Macca07 is offline Member
    Join Date
    Nov 2008
    Posts
    9
    Rep Power
    0

    Default

    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

  5. #5
    Join Date
    May 2012
    Posts
    1
    Rep Power
    0

    Default Re: package jxl does not exist ??? any ideas

    Quote Originally Posted by Macca07 View Post
    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?
    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.

    @

  6. #6
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,237
    Rep Power
    19

    Default Re: package jxl does not exist ??? any ideas

    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
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. package javax.servlet does not exist :>
    By wildheart25c in forum Java Servlet
    Replies: 2
    Last Post: 02-17-2010, 12:02 AM
  2. package java.text does not exist
    By sknn in forum NetBeans
    Replies: 12
    Last Post: 02-03-2010, 03:14 PM
  3. Replies: 7
    Last Post: 11-09-2009, 07:51 AM
  4. package javax.servlet does not exist
    By nikhil2jan in forum Java Servlet
    Replies: 1
    Last Post: 01-04-2009, 04:32 PM
  5. package mj does not exist
    By PzK in forum New To Java
    Replies: 8
    Last Post: 12-03-2008, 10:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •