File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Developer Certification (I have a question about nested jar files???)

 
Jim Martin
Ranch Hand
Posts: 80
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
I am about done with my assignment, but I am totally confused about the nested jar files. I have a Server.jar and a Client.jar. Each of these two have their own main methods, one for the server and one for the client. I am trying to put these two in a main jar file, for example Outer.jar. However, I don't know how to run this from the java command line, so that each of the inner two jar files can be accessed. I would greatly appreciate any help you can give me.
Also, I used the XYlayaout of JBuilder6 for my application and I have included the com.borland.jbcl.layout.*;
It works perfectly fine from the MSDos command prompt using java -jar Client.jar.
My concern is that residual dependency clause, although my application does run under a production environment (java command line in a MSDos window)???
Thank you very very much
Regards
ahoo
 
Andrea Gazzarini
Ranch Hand
Posts: 125
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you're not allowed to use external packages (borland jbuilder) in your application...
Check your instructions.html...
About the jar, regarding always instructions.html, I think you must explain in your README how to extract the two main jar, set the CLASSPATH and finally run the application(s).
Hope it helps.
 
Pete Lyons
Ranch Hand
Posts: 109
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot use the Borland XYLayout. This is considered a residual dependency. All classes used must either come with the JDK or be written by you. You can use JBuilder for the GUI, but you must stick to the layout manager provided by Sun.
As for the jar files, the big outer jar is just to simplify the file transfer, and the assesor will extract it first using 'jar xf yourfile.jar', and then use 'java -jar server.jar' style commands to launch your server and client. ALl you need to do is make sure your outer jar has all the right files in the right places, but only your server and client jars need to have a manifest entry that makes them "executable".
 
Jim Martin
Ranch Hand
Posts: 80
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much for your responses.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic