A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Java in General
Joined: Dec 24, 2002
Dec 24, 2002 07:10:00
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
Joined: May 25, 2001
Dec 24, 2002 08:24:00
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)
jar -cf NewJar.jar .
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:
java -cp %CLASSPATH%;NewJar.jar MainClass
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)
Joined: May 06, 2002
Dec 24, 2002 09:32:00
thanks karl and is this command line that of ms dos?
it will help to know
i appreciate it
Joined: Nov 04, 2001
Dec 25, 2002 11:16:00
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,
-cp $CLASSPATH:NewJar.jar MainClass
change Border color of JTAbbedPane and selection of TabbedPane..Plz solve Problem
JDBC-ODBC with Access : Error in Execution
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015