• 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

package

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
helo all
after writing a programe and putting it in a package how do u get that programe from the pc u worked with and run it on another pc?
pls help me out
i am having problems with it
kelly
 
Ranch Hand
Posts: 388
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
you can put all the classes in a jar file:
on the command line change to the base directory of your classes (but not in the package structure)
ant type:

this will add all files in the jar named NewJar.jar.
then copy this jar file to the other machine and start the app. On the command line:

where MainClass is the class with the main function. If you use packages then use the fully qualified name.
hope this helps (and hopefully the commands are correct. cant try them out here)
karl
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks karl and is this command line that of ms dos?
it will help to know
i appreciate it
thanks
 
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi khella
yes. karl gave command line in MS DOS format. you see that '%' and ';' signs specific to MS DOS Format?
if it were unix then it would have been,
java -cp $CLASSPATH:NewJar.jar MainClass
regards
maulin
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic