Win a copy of Spring Boot in Practice this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Submission: one jar file?

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 493
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author and jackaroo
Posts: 12199
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 293
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic