Results 1 to 11 of 11
  1. #1
    minifish is offline Member
    Join Date
    Oct 2008
    Posts
    9
    Rep Power
    0

    Exclamation Java - Importing from a Jar file hav touble with set CLASSPATH

    Hello experts,

    I'm try to import java file in unix.
    Under bash, I tried
    export CLASSPATH=/blah/blah/some.jar:/blah/some2.jar
    The CLASSPATH variable was initially undefined.

    and when I try to compile my java program, I get error message

    error: error reading /blah/blah/some.jar; error in opening zip file

    Any suggestions? or what I mit be doing wrong?

    Thank u

    -minifish

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    I don't know how jar file set in class path in UNIX.

    Do you use any IDE for Java coding. Most of IDEs have an option to attach external jar files into your project. It automatically attach to the class path.

  3. #3
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,582
    Rep Power
    23

    Default

    Is the jar file OK? Can you open it and view its contents with some utility to verify that it is OK?

  4. #4
    anandmohans is offline Member
    Join Date
    Sep 2008
    Posts
    2
    Rep Power
    0

    Default

    You should verify 2 things here:
    First - As Norm mentioned above, is the jar file OK?
    Second - Is the file accessible? i.e., if the file is present at the location is it accessible (i am talking about checking user permissions for accessibility).

    Regards,
    Anand
    j2eeconcepts.com

  5. #5
    minifish is offline Member
    Join Date
    Oct 2008
    Posts
    9
    Rep Power
    0

    Default

    The jar file seem to be ok, I can extract it with no problem.
    And the path is accessible.
    Do you have any suggestion for IDE in unix?

  6. #6
    Nakira is offline Member
    Join Date
    Oct 2008
    Location
    Aberystwyth
    Posts
    55
    Rep Power
    0

    Default

    Netbeans seems to be a popular choice on many operating systems. If there is no unix installer available then install using wine. If you need help just give a shout.

  7. #7
    serjant's Avatar
    serjant is offline Senior Member
    Join Date
    Jun 2008
    Location
    Ukraine,Zaporozhye
    Posts
    487
    Rep Power
    6

    Default

    On this question i have already answered somewhere in forum,search please,where is the jdk located on your system?

  8. #8
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    Quote Originally Posted by Nakira View Post
    Netbeans seems to be a popular choice on many operating systems. If there is no unix installer available then install using wine. If you need help just give a shout.
    I think NetBeans have separate packages for different operating systems. You can install them directly.

  9. #9
    Nakira is offline Member
    Join Date
    Oct 2008
    Location
    Aberystwyth
    Posts
    55
    Rep Power
    0

    Default

    Quote Originally Posted by Eranga View Post
    I think NetBeans have separate packages for different operating systems. You can install them directly.
    Just makes everything easier then. :)

  10. #10
    pankaj_salwan is offline Member
    Join Date
    Jul 2008
    Location
    india
    Posts
    35
    Rep Power
    0

    Default IMPORTING Jar file

    it is much easy in eclipse to import jar file....just select the file from the build path..

  11. #11
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

Similar Threads

  1. Classpath on mac osx
    By jacobb in forum JDBC
    Replies: 0
    Last Post: 06-12-2008, 09:41 PM
  2. Need help with importing classes
    By Deathmonger in forum New To Java
    Replies: 3
    Last Post: 02-07-2008, 10:03 AM
  3. Importing package
    By bugger in forum New To Java
    Replies: 5
    Last Post: 11-26-2007, 12:29 PM
  4. Importing classes
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-06-2007, 02:27 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
  •