This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes packaging of beta Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "packaging of beta" Watch "packaging of beta" New topic
Author

packaging of beta

Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
The deadline of the beta is coming fast and I'd like to be sure of something...
The (my) assignment states that the submission should be packaged in a single JAR file having the following content:

...
The executable JAR containing the programs. This must be called runme.jar
...

Now, my problem is that there are two programs, the client and the server. Only one program can be run from a JAR file. What I did is to include the client program in runme.jar and the server program in server.jar. Does this seem correct? Or am I missing something here?
Thanks for your enlightenment


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
Tybon Wu
Ranch Hand

Joined: Jun 18, 2002
Posts: 84
The client and server should both be in runme.jar
You should be able to run the client with:
java -jar runme.jar
You should be able to run the server with:
java -jar runme.jar server
You should be able to run non-networked mode version with:
java -jar runme.jar alone


SCJP2
Tybon Wu
Ranch Hand

Joined: Jun 18, 2002
Posts: 84

Only one program can be run from a JAR file.

Oh yeah I used a main class for the jar file that takes the command line argument and runs the appropriate program.
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
Thanks Tybon. That's crystal clear
 
 
subject: packaging of beta
 
Similar Threads
jar file
Properties packaging
Final Packaging "scjda-srXXXXXXX.jar" question!
NX:Contractors: Structure of package
packaging runme.jar