0

I'm working on a little Java app and I'm currently putting the installer together. This checks for perquisites, such as Java being installed, and prompts the user to download anything that's required.

I need to set a requirement for the minimum Java version I support (I'm building with 7). Is there a simple way I can detect what this would be? So if I'm using any classes etc. not available in earlier versions. BTW I'm using IntelliJ.

Mark Bridges
  • 8,228
  • 4
  • 50
  • 65
  • What sort of application is it? Does it have a GUI? – Andrew Thompson Dec 11 '13 at 11:16
  • *"minimum Java version I support (I'm building with 7)."* As an aside, using Java 7 it is possible to create code compatible with previous versions. It just takes some tweaking of compile time parameters and an rt.jar from the target version. – Andrew Thompson Dec 11 '13 at 11:22
  • It sits in the system tray and listens for connections from an iOS app. It's got a couple of text entry views it pops up, made with swing. – Mark Bridges Dec 11 '13 at 11:26
  • Thanks. JWS sounds good. I'll take a look at it and see if it'll work for me. – Mark Bridges Dec 11 '13 at 11:33

1 Answers1

0

I'm not sure if the entire 'system tray' complicates things, but..

  1. For deploying Java desktop apps., the best option is usually to install the app. using Java Web Start. JWS works on Windows, OS X & *nix.
  2. The best way to deploy a JWS app. or applet is to use the Deployment Toolkit Script. (That script will do the 'version checking').
Community
  • 1
  • 1
Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
  • That works, if the end-user has a proper runtime installed of course, the browser plugin has not been systematically deactivated, the user is not using a browser that does not match the CPU architecture of the installed runtime (32/64 bits) and there are no issues with user system rights and the auto-updating hasn't broken the runtime installation. Alas, that is not as common as Sun wanted it to be when JWS was first designed :( Me personally, I'd only deploy applications with a minimized 32-bits runtime bundled with it. Its not perfect but it minimizes tech-support needs. – Gimby Dec 11 '13 at 12:06
  • @Gimby *"if the end-user has a proper runtime installed of course"* That's complete nonsense. It works just fine when no Java is installed. Perhaps you should revisit the script and correct your misunderstandings before abandoning it. – Andrew Thompson Dec 13 '13 at 03:42