Reputation: 147
I would like to distribute a program I'm halfway done writing but I'm having trouble figuring a few things out...
needs to check for latest JRE and check for updates/patches to my app (jnlp?)
the program will have one or two built in encryptions so I need to somehow wrap it in an .exe shell maybe..? (NSIS?) How do I lock down my code?
Upon install I need to create a directory where my app can read and write from automatically so I can save settings and log in info to the client's computer, and then be able to automatically reference it from then forward.
I feel like the jump to being able to do a few things with Java to distributing an app with these prerequisites is a large one, I'd appreciate any advice or wisdom you can share.
Upvotes: 4
Views: 680
Reputation: 86381
You can build the executable with a third-party tool like exe4j. It will check for compatible versions of Java, and supports a bundled JRE. An overview of signing and verifying jar files is here. You may also choose to obfuscate your code to protect it from prying eyes.
To store user settings in files with Java SE, you can get the user's home directory via the system property "user.home". Alternatively, you can store user settings with the Java Preferences API; on Windows, this stores in the registry.
I'm guessing you're using Swing. But if you happen to be using the Eclipse rich-client platform:
Upvotes: 2