Results 1 to 5 of 5

Thread: Classpath error

  1. #1
    Arnokeh is offline Member
    Join Date
    Apr 2011
    Posts
    5
    Rep Power
    0

    Default Classpath error

    Hello, I'm having a small (but frustrating) problem trying to run my program.

    When I run my program using:

    java -classpath .;/lib/jl1.0.1.jar Main

    It opens perfectly, but when doing an action that requires jl1.0.1.jar it gives me NoClassDefFoundError

    Thanks in advance

  2. #2
    sudheerrjy is offline Member
    Join Date
    Apr 2011
    Posts
    1
    Rep Power
    0

    Default Class path soluction

    hi
    for example your jar file is ojdbc14.jar which is in d:\oracle\ora92\bin\jdbc\lib\ojdbc14.jar ....copy the complete jar file location so copy the whole location and paste it in the ...following position ....
    my computer-->environmental variables.--->system variables-->new--------->

    VARIABLE NAME : CLASSPATH
    VALUE :PASTE THE VALUE;.(EXISTING VALUE)[DONT DISTRUB REMAINING]

    MAKE SURE THAT your pasted value must be the first one.. and more over before you paste the value first see the value ..suppose oracle is the first value the it is dominated by the java path.so make sure jdk path is more preferably first value and the you paste the .jar value..

  3. #3
    Arnokeh is offline Member
    Join Date
    Apr 2011
    Posts
    5
    Rep Power
    0

    Default

    The problem isn't running it on my own computer, but when passing the program on to other people.

    (I have the CLASSPATH set correctly on my own computer)

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

    Default

    Do the 'other people' even have the jl1.0.1.jar?

    db

  5. #5
    Arnokeh is offline Member
    Join Date
    Apr 2011
    Posts
    5
    Rep Power
    0

    Default

    Yes, but I already solved it by creating a jar file, and adding 'Class-Path: lib/jl1.0.1.jar' to it

    Now I just need to do 'start Program.jar' to make it run

    (I needed to be able to run it from command prompt)

Similar Threads

  1. Classpath
    By jojo in forum New To Java
    Replies: 5
    Last Post: 02-04-2010, 10:04 PM
  2. How to set ClassPath?
    By kishan in forum Advanced Java
    Replies: 5
    Last Post: 12-11-2009, 07:24 AM
  3. Replies: 3
    Last Post: 08-14-2009, 12:57 PM
  4. Classpath
    By dawiz001 in forum New To Java
    Replies: 3
    Last Post: 03-18-2009, 02:18 PM
  5. Set classPath?
    By rgbosque in forum New To Java
    Replies: 3
    Last Post: 02-07-2008, 02:14 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
  •