• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Submission: one jar file?

 
li wan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i did file by RMI , so i have a server.jar and client.jar;
But in sun file :
Packaging of Submissions
All elements of your submission must be packaged in a single JAR file. The JAR file must have the following layout and contents in its root:
The executable JAR containing the programs. This must be called runme.jar.

what can i do?
 
Bharat Ruparel
Ranch Hand
Posts: 493
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Li,
I don't think that the newer assignments, i.e., URLy Bird and Contractors, require you to create a server.jar and a client.jar. What I am doing is packaging all classes in runme.jar file which uses a manifest file to identify a startup class which has a main method. Now, you give command line parameters to signal to your startup class to run it as a server, or a network client, or a standalone application.
Hope this helps.
Regards.
Bharat
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12014
220
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Li,
Welcome to JavaRanch.
I believe, based on your instructions, that you will have to discard your server.jar and client.jar files, and create a single runme.jar file that contains all the class files that were previously in the two other jar files.
Using RMI should not affect the number of jar files you use.
Regards, Andrew
 
li wan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First thanks , I still have some questions?
In local mode , i can do in jar;
But in remote mode , how can i do ? run a server and a client in
same time?
and if in one jar , how can i write a manifest.mf?
please help me
 
Eduardo Rodrigues
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I think that according your parameters the class declared in manifest will instantiate the proper class
Like this:
Server in port 8080:

Client trying to conect at 200.134.19.3

I hope this helps you!
Bye
 
Terry Martinson
Ranch Hand
Posts: 293
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make sure you know whether or not you can use other parameters in your command line. In my assignment, I can't.
See thread NX: Spec Confusion that talks about both a Client and Server side GUI.
this thread
My plan is to have a dialog box similar to the one in Max's book to allow the user to pick what GUI they want to run. (in the book he was picking between local/network, but I do that on command line for my assignment)
TJ
 
Wilder C Rodrigues
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm worry about arguments in the command line. In my case, I just pass the run mode. Like: server, to start up the server; and alone, to start up standalone mode.
Things like: host name, port number and database file location. You must specify these configurations through the GUI.
Bests,
Wilder Rodrigues
SCPJ
SCWCD
Unimed Fortaleza
Fortaleza/CE/BRZ
"If you look into the sun too long, do the things you see begin to burn your eyes?" Steve Hogarth - Marillion
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic