Java -- Which version/s to use? (June 2015)

I appear to have messed up JAVA setup, after installing the new version of Flashdevelop (version 5) the other day. I had those various error messages when attempting to compile about having version 1.8 when 1.7 was expected which pop up from time to time, So this time i thought i’d uninstall everything Java (there were lots including obsolete updates) and get it sorted out once and for all, Alas, I’ve have been attempting to get everything working since without total success.

FlashDevelop still requires the Java JRE 1.6 32-bit, so i installed that first (update 5). once it’s installed i can build in flashdevelop for many targets like flash etc, and my older Flash only AS3 projects compile too.

But I’m completely unsure what is needed to be able to compile to Android using OpenFL ? - I’ve tried the latest JDK and JRE (version 1.8), both 64 and 32 bit versions, and tweeking the JAVA_HOME variable, and path to tthe JDK, but still can’t compile to android. It’s completely baffling me as there are so many versions.

So the opening question - what do i need to have, and what should my JAVA_HOME=?

my choices seems to be (am running Windows 7 64 Bit)

1.6 JRE (32 bit)
1.6 JDK (32 bit)
1.6 JRE (64 bit)
1.6 JDK (64 bit)
1.7 JRE (32 bit)
1.7 JDK (32 bit)
1.7 JRE (64 bit)
1.7 JDK (64 bit)
1.8 JRE (32 bit)
1.8 JDK (32 bit)
1.8 JRE (64 bit)
1.8 JDK (64 bit)
JAVA_HOME= ?
PATH= ?

the big list of downloads (aka the minefield) http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html#jdk-6u45-oth-JPR

from nothing - which of the above would i need ?

I think Java 6 should still work, and that the Android tools do work with Java 7 now, not sure about Java 8, so try 1.6 or 1.7? It’s about what Android is happy with, the tools don’t rely on Java otherwise

Are you using the C:\Users(your name).hxcpp_config.xml file to set the Java path? (that’s what’s set using openfl setup android)

would that be "Java SE Development Kit 6u45 - Windows x64 " ?

I’ve been re running openfl setup android, to set the path, but when i’ve tried having java 8 installed, i get an error that tools.jar is missing (but the location it is missing from isn’t the location i set during setup !!)

having tried many java’s many times, my searching is now showing java failures as a result of the latest Android SDK. I still have no idea which version i need for compiling to Android, i dont care which, i’d just like to know a combination of JRE’s, JDK, Jave_Home and paths will owrk. (I checked in hxcpp_config.xml, it just showed c:\program files\java , so haev been changing that line to e.g. c:\program files\java\jdk1.6.0_45 when testing the 64 bit, c:\program files (x86)\java\jdk1.6.0_45 when trialing 32 bit , along with altering JAVE_HOME system variable, and paths etc.

OK, with “c:\program files\java\jdk1.6.0_45” i’m finally able to build to android again, after downgrading certain AndroidSDK elements, namely

downgrading “Android Tools” from 24.3.2, back to 24.0.2
downgrading “platform tools” from 22, back to 20

sigh, why do i ever upgrade anything !

1 Like