Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Metadata and System.getProperty()

$
0
0
I am developing an arithmetic game, and I realize that, in order to go further with this game (and do it "for real"), I would need to "hide" the files from where someone could accidentally delete them (and mess up either the program itself or the data for this second stage of the beta-test). I came across a really good article on files that are actually hidden, http://stackoverflow.com/questions/2875280/modify-a-hidden-file-in-java , and realize that just simply hiding the files isn't going to stop someone who has made hidden files visible. So, according to that article, I will just make folder for it in AppData folder. I realize that Windows XP and Windows Vista/7/8 have two different names for this folder (AppData is the name for the latter). I am assuming that, of course, the name to the actual folder is inconsequential.

What I really need help on is that I know that
System.getProperty(String)
returns String (and so does
System.getProperty(String, String)
. I also know that you could get the home directory with
System.getProperty("user.home");
, and according to the aforementioned article, I could use
File workingDir = new File(System.getProperty("user.home"), "AppData/MyProgramsData");[code], but would that essentially just be the same as [code]File workingDir = new File(System.getProperty("user.home") + "/AppData/MyProgramsData")
?

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>