Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Parameters (command line, preferences, user input)

Reply
Thread Tools

Parameters (command line, preferences, user input)

 
 
Kenneth P. Turvey
Guest
Posts: n/a
 
      02-25-2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm looking for a general way to handle a fairly large number of
parameters used by a program that I can apply to future work I do. These
programs are all command line programs and don't have a GUI.

I started implementing this for a project I'm working on and it just
seemed like something that someone else has to have done.

Ideally, what I would like is something like this:

1) Reads in default parameters from preferences.
2) Overrides these defaults using command line switches (long ones)
3) Prompt the user to input anything that is still required.
4) Writes out any changes the user made to preferences (not including
command line changes, probably). The user should be able to disable
this with a command line switch.

There should be a simple way of handling dependencies e.g. XoverProportion
doesn't matter since Xover wasn't selected so the user isn't prompted for
it.

Access to parameters should be very fast.

Is there some open source code out there for this?

Thank you,

- --
Kenneth P. Turvey <(E-Mail Removed)>
Phone : (314) 255-2199

XMPP IM: http://www.velocityreviews.com/forums/(E-Mail Removed)
Yahoo IM: kpturvey2
AIM IM: kpturvey3
ICQ IM: 320005929
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFEABwni2ZgbrTULjoRAtadAJ91AUwgPKKGztDvI5ApHK T7YN3eFACaA6hp
Owjc/90Yl6x/iJdMXPQvkoE=
=+49/
-----END PGP SIGNATURE-----

 
Reply With Quote
 
 
 
 
Paul Hamaker
Guest
Posts: n/a
 
      02-25-2006
You can use the Properties class for this :
http://java.sun.com/docs/books/tutor...roperties.html
describes exactly what you want.
Using properties on a server from an applet :
http://javalessons.com/cgi-bin/fun/j...b=adv&code=pro
---------------
Paul Hamaker, SEMM, teaching ICT since 1987
http://javalessons.com

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
skipping template parameters inside template parameters kito C++ 2 09-26-2010 12:04 AM
Passing Parameters to user control within another user control hmikki ASP .Net Web Controls 1 10-19-2007 02:00 AM
Class Member Data and Member Function Parameters - Should Parameters Be Data Members? Jason C++ 2 05-13-2006 07:11 AM
does a "parameters"-parameter overwrite the "parameters"-object? Florian Loitsch Javascript 11 03-15-2005 03:33 PM
Servlet parameters different from the command line parameters? Jonck van der Kogel Java 2 05-26-2004 11:34 PM



Advertisments