1

I am developing a small application for work. It is written with Java 7/JavaFX 2, running on computers using windows 7 as an operating system.

However, there are a series of older computers running in a 24/7 production environment. These computers are running Windows Server 2003 as their operating system. My manager has asked me to make the application available on these computers.

My question is, what is the best way to go about converting the application into a format that can run on this OS? According to documentation (and a test I ran), Java 7 will not run on these computers, but Java 6 will. BUT, JavaFX 2 is not bundled with Java 6.

So my questions:

  1. Is there a work-around to run my application as is without having to re-write it in a Java 6 acceptable format?
  2. If not, what is the best way to run JavaFX applications using Java 6? Do I have to install JavaFX as well as Java on the computers? How do you develop in an IDE with this configuration?
  3. If neither of those are possible, how difficult would it be to convert all of the JavaFX features into Swing (which I have no experience with).

I realize "size" and "difficulty" are subjective in a question like this, but this application took me 40-50 hours to write if that means anything. Thank you for any insight you can provide.

erik-sn
  • 2,590
  • 1
  • 20
  • 37
  • JavaFX2 was released during the Java 7 life cycle (JavaFX1 was very different). There is unlikely to be any official support for JavaFX2 on earlier versions of the JVM. It is equally unlikely that there is much documentation for this problem. – scottb Jun 24 '15 at 03:53

2 Answers2

1

Is there a work-around to run my application as is without having to re-write it in a Java 6 acceptable format?

I am of the opinion that you will not need any code changes. If you application is already running on JavaFX 2.2. There might be some features that might be broken on Java 6, but most of them should just run fine.

As stated in JavaFX 2.2 System Requirements, you must make sure that you have a minimum of Java SE 6 Update 33 for things to work smoothly for JavaFX 2.2.

You can go through Install Standalone JavaFX for Java SE 6 for details on how to install JavaFX 2.2 on windows with Java 6.

You can download JDK 6 update 45 from Java Archive Downloads.

You can then download the JavaFX 2.2.21 (the latest version supported) for JDK 6 update 45 from the JavaFX Archive Downloads.

If not, what is the best way to run JavaFX applications using Java 6? Do I have to install JavaFX as well as Java on the computers? How do you develop in an IDE with this configuration?

I think this question doesn't require any answer, but I would recommend just building you application using Java 6 in your system.

On the windows servers, you can install JDK 6 and JavaFX 2.2 and try to run the jar you created on your development machine.

If neither of those are possible, how difficult would it be to convert all of the JavaFX features into Swing (which I have no experience with).

Well, things are possible. Try them out first. But, if none of them works out, the answer to this question is "It depends"

  • It depends on your learning capability.
  • It depends on the size of the application.
  • It depends on many other factors.

N.B. - I have never used Windows Server 2003 and I am not sure on its support of JDK or JavaFX. All the data posted here is wrt to Windows OS.

ItachiUchiha
  • 36,135
  • 10
  • 122
  • 176
  • I should've found this before asking, but unfortunately the JavaFX standalone is not compatible with server 2003. http://docs.oracle.com/javafx/2/system_requirements/jfxpub-system_requirements.htm Someone else mentioned packaging the JRE with the application - would that packaged JRE be usable on the OS that wouldn't necessarily support it by installation? – erik-sn Jun 24 '15 at 22:47
  • I am not sure whether it will run and I cannot confirm it because I do not have a Windows Server 2003, but it might be worth a try. You may want to have a look at [packaging JavaFX 2 applications](http://docs.oracle.com/javafx/2/deployment/packaging.htm) or [this post](http://stackoverflow.com/a/30162808/1759128) as well. – ItachiUchiha Jun 25 '15 at 05:11
0

Java 7 JRE .exe installer will refuse to install JRE on old computers, however you can download JRE bundled as .tar.gz, which is offical Oracle bundle and can be found on the download page: http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html, unpack it and use as private JRE, that is to run your applications with command line:

<jre7dir>\bin\javaw.exe your_app.jar

Though Oracle say JRE 7 doesn't support this or that old system, you can check it practically with your application.

Igor
  • 1
  • 2