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

command line params and executable jars

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my project, I decided to use -D params on the command line to pass the hostname, port and database file. I mainly did this because I felt it provides for more readable startup scripts and seems to be the way BEA and other major vendors pass startup parameters. I'm a little worried that the graders will not like this style as much. Has anyone else used the -D param style instead of passing ordered command line parameters?
Also, I've read that some people have been creating executable jar files for the client and server. Does this seem to gain more points? If so, how do you specify the policy file and the codebase within the jar? Or is the still entered when executing the jar file?
Any help is greatly appreciated!
Thanks,
Jeremy
 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jeremy-
For what its worth, I am creating executable jars and I am passing the -D options as well. I chose to do this not for extra points, but I felt that it was better way to get my project to the grader and have a bit more control over how its executed. I haven't had a great deal of luck with my RMI, it seems very fragile, so I figured the more I can control the better.
Hope that helps. If you want particulars, I'd be more than happy to share more ideas about this.
- Eric
 
eric mcentee
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh, I forgot to mention, I don't think you need the codebase. Someone can correct me if I'm wrong, but I generated the stub with the rmic -v1.2 option, and include that file in the client.jar. Then when the main class in the client manifest is executed, everything is good. To specify policy file, just do it the same way as if you were starting a class with just the java command.
- Eric
 
Jeremy Anderson
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the quick reply Eric. I seemed to need to specify the codebase when executing the server so the rmiregistry could download it. Otherwise, the rmiregistry would complain that it couldn't find the stub class. I guess what makes it work is what I'll stick with. I'm just putting on the finishing touches before I upload, and I'm afraid I'll just keep knitpicking and never go through with it.
I will try to use executable jars simply because the command for starting up the server cannot be typed in a WinME DOS prompt because it's too long (works fine on Win2000).
Thanks again!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic