yo3ggx

Active Member
Licensed User
Longtime User
Hello everybody.
I have a b4j 64bit application working with no issues. I want to make a build for 32bit Windows.
If i just use the jar file with 32bit java8 from Oracle, I get the following error message:
B4X:
Exception in thread "JavaFX Application Thread" Exception in thread "main" java.lang.UnsupportedClassVersionError: ro/bubu/juagx/main has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
So I try to recompile it using the 32bit java8 from Oracle, but I get the error:
B4X:
Could not reserve enough space for 4188160KB object heap
As we are talking about 32bit, I cannot increase MaxRamForDex over 4095.

What other options I have?

Thank you.
 

agraham

Expert
Licensed User
Longtime User
So I try to recompile it using the 32bit java8 from Oracle, but I get the error:
It should work if you compile it with 64 bit Java 8 and then run it on 32bit Java 8. Jar files are word length and hardware independent. It is just the runtime that has to match the hardware it is running on.
 
Upvote 0

teddybear

Well-Known Member
Licensed User
Hello everybody.
I have a b4j 64bit application working with no issues. I want to make a build for 32bit Windows.
If i just use the jar file with 32bit java8 from Oracle, I get the following error message:
B4X:
Exception in thread "JavaFX Application Thread" Exception in thread "main" java.lang.UnsupportedClassVersionError: ro/bubu/juagx/main has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
So I try to recompile it using the 32bit java8 from Oracle, but I get the error:
B4X:
Could not reserve enough space for 4188160KB object heap
As we are talking about 32bit, I cannot increase MaxRamForDex over 4095.

What other options I have?

Thank you.
See here
You should recompile the jar using java 8 32bit
Tools->Configure Path
change path java11 to java 8
 
Upvote 0

yo3ggx

Active Member
Licensed User
Longtime User
It should work if you compile it with 64 bit Java 8 and then run it on 32bit Java 8. Jar files are word length and hardware independent. It is just the runtime that has to match the hardware it is running on.
If I try this, I get again the error " class file has wrong version 55.0, should be 52.0".
 
Upvote 0

yo3ggx

Active Member
Licensed User
Longtime User
Upvote 0

yo3ggx

Active Member
Licensed User
Longtime User
You have compiled it with Java 11 and not java 8
The message is related to one of the own built libraries, In the configured path I have:

C:\Program Files\Java\jdk1.8.0_341\bin\javac.exe
Maybe I have to recreate the library with the same java version.

Full error message is:

B4X:
  bad class file: P:\HAM\B4J\ExtraLibs\jareclib4.3.jar(ro/bubu/juagx/WT.class)
    class file has wrong version 55.0, should be 52.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.
 
Upvote 0
Top