Setting CLASSPATH variable for 3rd party jar

Discussion in 'Java' started by misra.manisha@gmail.com, Jul 12, 2006.

  1. Guest

    I need to set the CLASSPATH environment variable to include a 3rd party
    jar that I want with my application. Lets say that the jar is is in the
    directory-

    C:\ThirdPartyApp\Useme.1.2.3.jar
    (I use such a name 'coz my jar has a similar name - multiple ".",
    before the actual extension)

    When I add this to my CLASSPATH from cmd as
    set CLASSPATH=%CLASSPATH%;C:\ThirdPartyApp\Useme.1.2.3.jar;

    it appends the jar. But when I try to run my application, say myApp.jar
    form cmd, it gives following error-

    java.lang.NoClassDefFoundError: com//ThirdPartyApp/abc

    Now, this class is definitely present in the Useme.1.2.3.jar....

    Where am I going wrong??

    Also, if I set the CLASSPATH from cmd, I need to do that every time I
    open the cmd window... I want to set the CLASSPATH permanently to
    include my jar.... Should I create a variable called CLASSPATH in my
    WinXP system's environment variable?

    Please help...
    , Jul 12, 2006
    #1
    1. Advertising

  2. lordy Guest

    On 2006-07-12, <> wrote:
    >
    > it appends the jar. But when I try to run my application, say myApp.jar
    > form cmd, it gives following error-
    >
    > java.lang.NoClassDefFoundError: com//ThirdPartyApp/abc
    >

    http://mindprod.com/jgloss/jar.html#CLASSPATH

    Lordy
    lordy, Jul 12, 2006
    #2
    1. Advertising

  3. Andrew T. Guest

    wrote:
    ....
    > ...when I try to run my application, say myApp.jar
    > form cmd, it gives following error-
    >
    > java.lang.NoClassDefFoundError: com//ThirdPartyApp/abc


    Where did that second '/' after com come from?
    Why do you have a package called ThirdPartyApp?
    Why is your class called 'abc'?

    Andrew T.
    Andrew T., Jul 12, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Terry McKiernan
    Replies:
    0
    Views:
    1,358
    Terry McKiernan
    Jul 7, 2003
  2. BestNews

    Any 3rd party Grid control in dotnet

    BestNews, Aug 26, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    5,169
    Robert Jacobson
    Aug 26, 2003
  3. Gabe
    Replies:
    3
    Views:
    1,059
  4. Replies:
    6
    Views:
    992
    Jacob
    Jan 12, 2005
  5. Replies:
    2
    Views:
    1,089
    Mike Schilling
    Mar 2, 2008
Loading...

Share This Page