• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

windows Registry in java

 
Ami Choc
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can any one please tell me how to save the folder name in windows registry using java

want to write and read the folder name from registry

I cannot use properties files because i assume we cannot use it for program started with the WebStart technology. Please correct me i am wrong

Appreciate your help

Thanks in advance !!

 
Paul Clapham
Sheriff
Pie
Posts: 20969
31
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your Web Start application can't use a properties file on the client machine, then chances are you can't use the Windows registry there either. And anyway you can't access the registry (easily) from Java anyway. However, you could try using the Preferences class in the java.util.prefs package. (That's an excellent alternative to properties files in any Java application.) To tell you the truth I'm not sure whether that will work either, but you should try it.

However what's this folder name you want to save? If your Web Start application can't access the file system on the client machine, then what folder is that?
 
Ami Choc
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Basically want to define a folder on client machine where we should keep all the files now there are couple of ways to achieve

but we are choosing registry because we do not want to force client to install on C:..it can be any DRIVE as per client computer

so how to dynamically detect the primary drive and create folder if does not exist?
 
Paul Clapham
Sheriff
Pie
Posts: 20969
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you use a JFileChooser then the user can choose any folder they like, on any drive, and create a new one if they want to do that. So I would leave it to the user to do that.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic