Android Question Change JDK version

nobbi59

Active Member
Licensed User
Longtime User
Hello,

I got a problem with using another Java version. Until yesterday I used JDK 1.8 but now it doesnt work on my computer anymore (idk why). I tried reinstalling it but it simply doesnt work. So I changed my PATH variable to point to JDK 1.7 and also changed the symlinks in "javapath" to point to JDK 1.7. I also changed the path to the javac.exe to javac 1.7.

So I wanted to compile my B4A code and it always says "java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main : Unsupported major.minor version 52.0". I tried also renaming JDK 1.8 Folder but it also doesnt work.

My Question: Where can I define which Java version B4A uses?

Best regards
 

DonManfred

Expert
Licensed User
Longtime User
In the IDE under Tools -> Configure Paths
 
Upvote 0

nobbi59

Active Member
Licensed User
Longtime User
Yes I did change the path to point to jdk 1.7 but this doesnt seem to work
 
Upvote 0

nobbi59

Active Member
Licensed User
Longtime User
It seems like the .java files built by B4A are for JDK 1.8 (im a noob in JAVA)
And I want to know if there is a way to change this.
 
Upvote 0

nobbi59

Active Member
Licensed User
Longtime User
Thank you first for your reply.

I got the code when compiling, but I found out the solution on my own.

To everyone whos got this problem, too:

This is a conflict between the JVM that is running on your computer and the JDK you are using. So you have to have the same version of JRE and JDK running on your PC. I could fix it with uninstalling all versions of JAVA on my PC and reinstalling JDK and JRE of the same version.
 
Upvote 0
Top