Originally posted by Cathy Young:
How to make it work on different platforms--"/" vs. "\" issue?
scwcd, scjd, scjp<br /><a href="http://natejohnson.us" target="_blank" rel="nofollow">http://natejohnson.us</a><br /><a href="http://rice.kuali.org" target="_blank" rel="nofollow">http://rice.kuali.org</a>
Originally posted by Cathy Young:
I just want to know if we can put db.db under a specific directory (say, under classes, for example), and hardcode the path of db.db?
scwcd, scjd, scjp<br /><a href="http://natejohnson.us" target="_blank" rel="nofollow">http://natejohnson.us</a><br /><a href="http://rice.kuali.org" target="_blank" rel="nofollow">http://rice.kuali.org</a>
Originally posted by Nate Johnson:
Here are two very useful commands that you might find handy...
System.getProperty("user.dir")
System.getProperty("file.separator")
The first gives the working directory and the second gives a OS specific file separator.
scwcd, scjd, scjp<br /><a href="http://natejohnson.us" target="_blank" rel="nofollow">http://natejohnson.us</a><br /><a href="http://rice.kuali.org" target="_blank" rel="nofollow">http://rice.kuali.org</a>
Originally posted by Nate Johnson:
About your first question... I did that but also provided a command line option for the path just in case Sun wanted to point to another db for grading purposes. I cant remember if that is a requirement.
Originally posted by Cathy Young:
This sounds a good idea. But I am curious to know how you check if the user input the path of the file. What I want to do is allow for 0 or 1 input args. If there is no args, it is local mode, and the database file is as specified in the source, but if it has 1 arg, how to check if it is filename or hostname? I do not think deliminator is good enough to test.
scwcd, scjd, scjp<br /><a href="http://natejohnson.us" target="_blank" rel="nofollow">http://natejohnson.us</a><br /><a href="http://rice.kuali.org" target="_blank" rel="nofollow">http://rice.kuali.org</a>
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Originally posted by Nate Johnson:
Well what I did was to have prefixes to all of my args on the command line... so my command line looked like this...
java -jar client.jar -fc:\scjd\db.db
or
java -jar client.jar -u127.0.0.1 -p12345
[ August 29, 2002: Message edited by: Nate Johnson ]
Originally posted by Cathy Young:
Thanks, this helps a lot! BTW, just curious, is -p12345 port number? Can't we just use the default port number for RMI?
scwcd, scjd, scjp<br /><a href="http://natejohnson.us" target="_blank" rel="nofollow">http://natejohnson.us</a><br /><a href="http://rice.kuali.org" target="_blank" rel="nofollow">http://rice.kuali.org</a>
Can I ask the user to supply the command line arguments in a simple dialog instead during program startup instead of supply them in the
command prompt
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Originally posted by CyJenny Wong:
Hi,
Can I ask the user to supply the command line arguments in a simple dialog instead during program startup instead of supply them in the
command prompt
scwcd, scjd, scjp<br /><a href="http://natejohnson.us" target="_blank" rel="nofollow">http://natejohnson.us</a><br /><a href="http://rice.kuali.org" target="_blank" rel="nofollow">http://rice.kuali.org</a>
Originally posted by Patrick Li:
Is it good idea to provide System Properties on client side command line? for instance:
java -jar FBNClient.jar -DdbFileName="db.db" -DhostName="localhost" -DportNumber="1099"
in such way that number and order of parameters on the command line are not significant.
scwcd, scjd, scjp<br /><a href="http://natejohnson.us" target="_blank" rel="nofollow">http://natejohnson.us</a><br /><a href="http://rice.kuali.org" target="_blank" rel="nofollow">http://rice.kuali.org</a>
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher