• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help needed Packages and jar

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
author
Posts: 621
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Blood pressure normal? What do I change to get "magnificent"? Maybe this tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic