B4J Question Wasn't there a handy way to set the java compiler?

sorex

Expert
Licensed User
Longtime User
Hello,

Wasn't there a way to set the compiler to use inside a project?

I'm asking because I have some misery to get an ssd1306 oled display working that's included on a raspberry pi poe hat.

The culprit seems to be the removal of a shared secrets lib ( Caused by: java.lang.ClassNotFoundException: sun.misc.SharedSecrets ).

So I would like to try to compile this to open or oracle jdk 8.x without messing up other things.

Running it via jre8 on the pi doesn't work as it detects that it was compiled with a newer version.
 

agraham

Expert
Licensed User
Longtime User
Forum search for "java compiler" works
Look for
#JavaCompilerPath attribute. Allows setting a JDK other than the one set in the global settings. Syntax: <java version>, <path to javac.exe>. The exact version isn't important
 
Upvote 1

sorex

Expert
Licensed User
Longtime User
indeed, this works

B4X:
#JavaCompilerPath: 8, C:\Program Files\Java\jdk1.8.0_144\bin\javac.exe

can this be done for the execution through the bridge aswell?

now it compiles, runs, quits from the error.

then I have to see what number that AsyncInput file has and then use java -jar AsyncInput<number>

which mean constantly switching between windows, pi os at each compile.
 
Upvote 0
Top