Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2006

Tip: Looking for answers? Try searching our database.

Setting CLASSPATH variable for 3rd party jar

Thread view: 
misra.manisha@gmail.com - 12 Jul 2006 16:25 GMT
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...
lordy - 12 Jul 2006 16:32 GMT
> 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
Andrew T. - 12 Jul 2006 16:35 GMT
misra.mani...@gmail.com 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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.