• 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
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

NX:About entrance of runme.jar

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Another question:
    What's the single mode flag?
     
    author and jackaroo
    Posts: 12200
    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 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
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi Andrew,thanks for your comment.
     
    I think she's lovely. It's this tiny ad that called her crazy:
    Smokeless wood heat with a rocket mass heater
    https://woodheat.net
    reply
      Bookmark Topic Watch Topic
    • New Topic