Android Question Error while compiling with android.jar

Yayou49

Active Member
Licensed User
Hi,

Today I've updated all stuff about Java on my computer.
Remove all and reinstall the last version of Java and SDK (jdk-8u72-windows-x64 and installer_r23.0.2-windows)
I didn't do anything on B4A stuff.
The only different thing is the path where SDK has been installed.
It has been install in C:\Program Files (x86)\Business Objects\javasdk\bin\
(I've ran the install without changing anything)

Now, while compiling, I've got this error:

B4X:
B4A version: 5.50
Parsing code.  (0.04s)
Compiling code.  (0.21s)
Compiling layouts code.  (0.05s)
Generating R file.  (0.04s)
Compiling debugger engine code.  Error
javac 1.5.0_12
shell\src\AN\V1\connexion.java:4: cannot access java.io.IOException
bad class file: C:\Users\Me\AppData\Local\Android\android-sdk\platforms\android-23\android.jar(java/io/IOException.class)
class file has wrong version 51.0, should be 49.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
import java.io.IOException;
  ^
1 error

What to do with this ???

PS: My path are well set
Javac.exe:
C:\Program Files (x86)\Business Objects\javasdk\bin\javac.exe
android.jar:
C:\Users\Me\AppData\Local\Android\android-sdk\platforms\android-23\android.jar
 

Yayou49

Active Member
Licensed User
Android SDK Tools: Rev.24.4.1
Android SDK Platform-Tools Rev.23.1
Android SDK Build Tools Rev.23.0.2
 
Upvote 0

lemonisdead

Well-Known Member
Licensed User
Longtime User
Hello,
Unsure but from what I can read on the error message, it could be that the SDK is not the one you have installed in "C:\Program Files (x86)\Business Objects\javasdk\bin\" ? Perhaps could you take a look to your Windows system globals ?
 
Upvote 0

Yayou49

Active Member
Licensed User
I agree, but after the install of the last Java, I cannot find javaC.exe ... (the one needed by b4A)
I can see only java.exe or javacpl.exe
(java.exe is a version 8)
Do you have a link to be sure to download the good version of java ?
 
Upvote 0

Yayou49

Active Member
Licensed User
I'm in a big mess ....

Well, I've removed everything about java once again.

I've done step by step what is in your link:
- download jdk-8u72-windows-x64
- run it in a specific folder
First problem:
javac.exe is not in this folder ....

- run the installer_r23.0.2-Windows
and set the appropriate things whith API23

The only way for me to retreive javac.exe is to run JavaSetup8u71.exe and then I found it in path C:\Program Files\Java\jdk1.8.0_72\bin

If I try to compile my project, now I've got a new error:
B4X:
B4A version: 5.50
Parsing code.    (0.02s)
Compiling code.    (0.16s)
Compiling layouts code.    (0.02s)
Generating R file.    (0.03s)
Compiling debugger engine code.    (1.93s)
Compiling generated Java code.    Error
javac 1.8.0_72
src\AN\V1\connexion.java:44: error: cannot find symbol
                BA.LogInfo("Killing previous instance (connexion).");
                  ^
  symbol:   method LogInfo(String)
  location: class BA
Note: src\AN\V1\starter.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error

What's wrong with my install ????
 
Upvote 0

Yayou49

Active Member
Licensed User
Well, I've uninstall B4A and then reinstall and now IT WORKS !!!!
However, I need to know why javac.exe is not in SDK folder ???
Because without using JavaSetup8u71.exe, I was not able to set the correct path in B4A for the javac.exe ....

Now it works, so it's not a big problem, but it's just for me to understand ;)

Anyway, thanks Erel for your help, you were still MASTER of MASTER
 
Upvote 0
Top