File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes One or Two Jars? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "One or Two Jars?" Watch "One or Two Jars?" New topic
Author

One or Two Jars?

Julio Cesar Marques
Ranch Hand

Joined: Mar 21, 2009
Posts: 67
Hi everyone!
I receive my assignment and in the "instructions.html" file have a topic: "Packaging of Submissions" it's indicating only runme.jar file. My Question is: I've to write an Server/Client app in a single JAR? Or runme_client.jar and runme_server.jar. Another question is: If the Data Access is made by SERVER what utility have the app in standalone mode? Does nothing?

Sorry about my english! I'll better


Julio Cesar Lopes Marques
Sun Certified Java Developer 5, Sun Certified Java Programmer 5
Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2266
    
    3

Hey, partner!

What you have to do is create only one runme.jar file, and this file should contain all classes of the 3 modes. Take a look at this other thread, which I think will also be helpful.
The standalone mode is another way of utilizing the application. If the application is started in standalone mode, then everything runs locally, but the server code cannot be used at all. In the end, depending on the way you start the application, some classes won't be used.


Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
Julio Cesar Marques
Ranch Hand

Joined: Mar 21, 2009
Posts: 67
Ok i understand,
but on "standalone" one more question is freaking me out. Suppose you start app in standalone mode what is show in JTable? Nothing... i think because the Server would load data is stopped. Or if i click in new button the new data cannot be persisted because the server would be persist data is stopped. What i can do in this case?
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2503
    
    8

Howdy, the stand-alone mode is really bypassing networking (not using the server code). The stand-alone and network mode client use the same GUI. Where to get the data source is depending on how you implement the server code.

Simply put, stand-alone get the data soure directly from say Data class. Network mode get it through server code.


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5 OCPBCD5
Julio Cesar Marques
Ranch Hand

Joined: Mar 21, 2009
Posts: 67
Hi dude!
If i understand in both of cases de data access is made but in standalone mode the data access is directly in the .db file, but if the server is running i'll get data requesting from him. Is it?

Best Regards!
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2503
    
    8

Yup I think you got the gist of it. How you implement your networking (sockets or RMI) should point you to the right direction.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: One or Two Jars?