• Post Reply Bookmark Topic Watch Topic
  • New Topic

Jar and exe working with paths what is commonly used?  RSS feed

 
Niklas Karlsson
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I have 2 java projects that I want to access some files.
and i whant those files to be editable by user for example change a picture and so on in the folder "pictures for my program"

What is the most commonly used solutions for this?
And is the only thing to make it a strict path like c:/my program / files / pictures ?
 
Richard Tookey
Bartender
Posts: 1166
17
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use as root directory the user's home directory which can be obtained from the "user.home" system property . See https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html .
 
Niklas Karlsson
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perfect :-)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!