Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jar to Send

 
Roberto Demestri
Greenhorn
Posts: 10
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got doubts about the file to send. The client and server must be two differents programas?
Inside the fileToSend.jar I got a runme.jar and inside that also got a server.jar and client.jar?
Thanks for replying.
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, you don't!

You create 1 runme.jar (which will be a part of your submission jar) and this runme.jar will be started with a different argument:
  • java -jar runme.jar (for network client)
  • java -jar runme.jar server (for network server)
  • java -jar runme.jar standalone (for standalone client)


  • The ScjdFaq contains an ant build script (created by me) which will create the submission jar (including the runme.jar) automatically (you might have to alter the script a bit to your instructions and to your situation, because I had a lot of test classes which were also ran automatically with each build)
     
    Roberto Demestri
    Greenhorn
    Posts: 10
    Eclipse IDE Java Oracle
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thanks for the reply. That's exactly how my implementation works.
    the thing is.. when i start a network client; the server starts as a threat... i am kind of confused about the correct behaviour of the components.
    i also implement a command "startserver" just for starting the server (perhaps in other PC)...
    right now both of them (client and server) are instances of a Main thread wich run them according to the command line arguments.
    So when i close the client, the server also get closed. i don't know if that might be an issue or not.
    Regards.
     
    Roel De Nijs
    Sheriff
    Posts: 10662
    144
    AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    When you start your network client, the network client should start. When you start your network server, the network server should start. So no need to start the network server when the network client is started. Network client and network server should start in seperate JVMs (could be on different computers in a LAN, could be on the same computer). And when you close your network client, the network server must keep running!
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic