aspose file tools*
The moose likes Java in General and the fly likes Help needed Packages and jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Help needed Packages and jar" Watch "Help needed Packages and jar" New topic
Author

Help needed Packages and jar

priya anantha
Greenhorn

Joined: Jan 27, 2002
Posts: 5
Hi all,
I have created a package called newtest which has some classes. Now I have created jar file of all the classes in the package. Now how do I make use of the package in a different computer.
That is if I copy the jar file and if I want to make it available in my other computer.Should I have to create a maifest file
What should I do.
Where should I copy the jar file and how can I make use of the package in the java programs in the other computer.
Can any one help me.


Thanks,<br />Priya
Sean MacLean
author
Ranch Hand

Joined: Nov 07, 2000
Posts: 621
Generally, you simply have to specify the jar's location in the classpath variable on the new system or pass the location to the application at start up.
i.e. (for windows) set CLASSPATH=%CLASSPATH%;c:\lib\newtest.jar
This assumes that you put the jar in a folder called c:\lib.
i.e. (windows).
java -classpath=%CLASSPATH%;c:\lib\newtest.jar
It is also common to create set-up scripts, etc that will do this automatically (i.e. .bat files)
Hope this helps.
Sean
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help needed Packages and jar