• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Writing to jump drives instead of System System.getProperty("user.home", ".")

 
Steve Howerton
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello.
I have an app that is set up to build a dir tree based on user and profile when
they log in.

Right now it is running in the NETBEANS IDE. It will use properties to
derive the hard drive to mkdir's. I plan on creating a app.jar and
put it on a jump drive. I would like to execute the program from the jump drive
by double clicking it. Instead of creating dir on the hard drive I would like
to create them on the jump drive when the jump drive is plugged in and the
app is executed.
My question is : How can I design the class to derive what drive it is and how
to make it the USER_HOME so I can mkdir on the jump drive? Is there a way to do this?

Right now I do this using public static final String USERHOMEDIR = System.getProperty("user.home", ".")
Thanks.

 
Steve Howerton
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My programs objective is to mkdir and ope dir.

if I ever get it jarred up I would like to run it from a jump drive.



clearly this code will not be valid any more.
Could this USERHOMEDIR be replaced correctly each time the jump drive is moved from one client to the
next?

again the main objective of the program would be to create dir's and place doc in a a file system on the
jump drive and maintain access to those dir no matter where I use the jump drive.

are there other unforseen technical hurdles to jump over?
thanks;
5:10 AM 2/25/2013
 
Tony Docherty
Bartender
Posts: 2939
59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't really understand what you are trying to achieve but if you want to know the directory the app is running from use the system property "user.dir"
 
Steve Howerton
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That will do for now. I am just collecting some code that will allow my app to mkdir on a jump drive where it will hopefully run from as soon as I figure out how to jar it up. thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic