This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
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:About entrance of runme.jar

 
xi ruo
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a section saying from this thread by Andrew.

The user selects what mode to run it in by using a parameter on the command line:
  • java -jar runme.jar - the client starts up in networked mode
  • java -jar runme.jar alone - the client starts up in non networked mode
  • java -jar runme.jar server - the server starts up


  • Is there a direct way to implement?
    I have a indirect way,following:

    MANIFEST.MF

    a command of this exact form:

    Please comment,thanks.
    [ September 19, 2003: Message edited by: xi ruo ]
     
    xi ruo
    Ranch Hand
    Posts: 40
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Another question:
    What's the single mode flag?
     
    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 Xi,
    I think the way you handled this is fine.
    At some point in everyone's program they will need to look at the command line argument and decide what to do. I believe it makes sense to have a wrapper class just like yours to do this.
    I don't believe you need the "return" statements in your code.
    What's the single mode flag?

    The command line parameter: "alone", "server", <nothing>
    Regards, Andrew
     
    xi ruo
    Ranch Hand
    Posts: 40
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hi Andrew,thanks for your comment.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic