0

I have a few applications that I am giving to my colleagues on customer support. I made all of these applications using JRE 1.8, and most of the machines that are being used are using a JRE of 1.6 or 1.7. I have refactored the code so that it will work with these versions of Java.

However, how am I supposed to test that these applications will in fact run on a machine with these versions of Java installed? Do I have to use another computer? Is there any way of testing this from my own PC?

I'm using launch4j to create an .exe file that will run the application (they're just tools to help some troubleshooting processes)

Just to try be more clear, I have the latest version of Java installed on my PC, and I want to test that PCs with Java 1.6/1.7 will still run the .exe file generated from launch4j; so how do I do this on my own PC?

DCON
  • 628
  • 5
  • 18
  • Use a virtual machine? – Kayaman May 19 '17 at 09:51
  • That sounds interesting! I'll give that a go now. – DCON May 19 '17 at 09:55
  • [How to run Java in compatibility mode](http://stackoverflow.com/questions/37020344/how-to-run-java-in-compatibility-mode) – FireLight May 19 '17 at 10:02
  • @Wrap2Win That's not asking the same thing. – DCON May 19 '17 at 10:06
  • Oh ok, how is that question different? (Just for my own knowledge) – FireLight May 19 '17 at 10:07
  • That question seems to be asking about backwards compatibility, whereas I am asking how I can test that my application configured to run with JRE 1.6 / 1.7 will actually run with those versions installed. This is provided I actually understood the question you linked :P – DCON May 19 '17 at 10:21

1 Answers1

1

In your IDE (for example eclipse) you can change the project properties for the java compiler "Compiler compliance level" from 1.8 to 1.6. Then build the new code. (By the way, if you like to support Java 1.6 you should only compile with this compliance level)

If you have still installed old Java-JRE-Versions on your PC you can set JAVA_HOME environment to the JRE 1.6 folder (Checks %PATH% too and rename your java 8 JDE and java 8 JRE folder temporaerly for safety).

Norbert
  • 234
  • 1
  • 9