| Author |
NX:How to jar my assignment?
|
Nick Lee
Ranch Hand
Joined: Dec 17, 2002
Posts: 45
|
|
In my instruction,it said: When you submit your assignment, each part (client and server) must be executable using a command of this exact form: java -jar <path_and_filename> [<mode>] Your programs must not require use of command line arguments other than the single mode flag, which must be supported. Your programs must not require use of command line property specifications. All configuration must be done via a GUI, and must be persistent between runs of the program. Such configuration information must be stored in a file called suncertify.properties which must be located in the current working directory. The mode flag must be either "server", indicating the server program must run, "alone", indicating standalone mode, or left out entirely, in which case the network client and gui must run. Can anybody tell me how to jar it,and how to run it with java -jar command?
|
Nick Lee
|
 |
Andrew Monkhouse
author and jackaroo
Marshal Commander
Joined: Mar 28, 2003
Posts: 10895
|
|
Hi Nick You should look at the Sun Jar tutorial. (Note to Jim: That tutorial should probably be on the SCJD FAQ and links page) On this page you will find information on how to create a jar file, and how to make an executable jar file. Regards, Andrew
|
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
|
 |
Jim Yingst
Wanderer
Sheriff
Joined: Jan 30, 2000
Posts: 18670
|
|
Note to Jim: That tutorial should probably be on the SCJD FAQ and links page <cough> Ahem. Yes, right. Along with a few other changes which I seem to have forgetten about, eh? Sorry, I must've been at the wheel. Will update shortly.
|
"I'm not back." - Bill Harding, Twister
|
 |
Nick Lee
Ranch Hand
Joined: Dec 17, 2002
Posts: 45
|
|
Hi Andrew, I know sth about JAR file,but I still confused about what the instructions said.My program now,can be run by command line(both server and client),after jar my classes,I should run both of them with java -jar jarname [mode],am I right about it?
|
 |
Andrew Monkhouse
author and jackaroo
Marshal Commander
Joined: Mar 28, 2003
Posts: 10895
|
|
Hi Jim and Nick
Jim:: Along with a few other changes which I seem to have forgetten about, eh? Sorry, I must've been  at the wheel.
I wasn't suggesting that - I try not to give volunteers a hard time ... whenever you have time is fine.
Nick: after jar my classes,I should run both of them with java -jar jarname [mode],am I right about it?
Yes, that is how you should run them. Regards, Andrew
|
 |
Bigwood Liu
Ranch Hand
Joined: Feb 26, 2003
Posts: 240
|
|
Hey, I put my ServerGUI.class into my suncertify.dbserver package, and ClientGUI.class into suncertify.dbclient package, then my question is : if I should create a main class and put it into suncertify package and run it according to its command line? Damu
|
 |
Andrew Monkhouse
author and jackaroo
Marshal Commander
Joined: Mar 28, 2003
Posts: 10895
|
|
Hi Damu, Are you asking about what package to put it in: if so, that could be a logical place for it. Regards, Andrew
|
 |
 |
|
|
subject: NX:How to jar my assignment?
|
|
|