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

[NX Contractor] Package and run application

 
George Fung
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the requiremenet:
When you submit your assignment, each part(client and server) must be executable using a command of this exact form:
java -jar <path_and_filename> [<mode>]
The mode flag must be either "server", indicating the server program must run, "alone", indicating standalone mode, or left out entirely, in which case the network client and gui must run.

1. How to start up server and client? In non-network mode, we can start by "java -jar runme.jar alone". In network mode, we can start client by "java -jar runme.jar server". Then, how can we server?
2. It flag is left out, the network client and gui must run. I can't understand it. DOes it mean "network" mode?
Please give me some ideas about it. thanks.
 
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 George
If you type "java -jar runme.jar alone" then the client application will start up with no networking involved.
If you type "java -jar runme.jar" then the client application will start up and connect to the server over the network.
If you type "java -jar runme.jar server" then the server application will start up.
Regards, Andrew
 
George Fung
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Andrew,
Thank your suggestion. how about pack the db file and suncerify.properties? If I put them into runme.jar, I dunno how to access it without decompress them into working directory.. Here's my manifest file:
Manifest-Version: 1.0
Main-Class: suncertify.gui.ApplicationRunner
Class-Path: runme.jar

Thanks........
 
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 George
I don't think you need the "Class-Path" in your Manifest. Having it there makes your classes "Extension Classes". Do you need that functionality?
Regardless, now that you have your Manifest, once you create you Jar file with that Manifest, you should be able to type "java -jar runme.jar" and the JVM will execute suncertify.gui.ApplicationRunner.
Regards, Andrew
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic