Bug? Error while invoking Sdk Manager

cimperia

Active Member
Licensed User
Longtime User
When I invoke B4A Sdk Manager, it always displays this error:
Error Could not find or load main class Dell\AppData\Local\Temp

OS: Windows 10
b4A: 9.30

I believe the error might be caused because the user's folder contains a space. It's located in

C:\Users\userName Dell\

upload_2019-7-14_16-26-28.png
 

Attachments

  • upload_2019-7-14_16-25-34.png
    upload_2019-7-14_16-25-34.png
    50.4 KB · Views: 290

cimperia

Active Member
Licensed User
Longtime User
The error is indeed caused by the space in the user's folder. I've temporally changed the folder name to remove the space and no more errors. But, I need to keep the folder name as it was, ie with a space.

Any possibility of a quick fix?

There's the same issue with avd manager.
 
Last edited:

cimperia

Active Member
Licensed User
Longtime User
I did that and the error is still there.

The issue is with B4ASdkManager.b4j.

The fix is passing the Java Option(s) as an array.

I suppose it'll prevent the tokeniser from splitting strings at spaces.

B4X:
Public Sub SetEnvironment(s As Shell)
    s.SetEnvironmentVariables(CreateMap("JAVA_HOME": FindJava, _
        "JAVA_OPTS[@]": $"-Djava.io.tmpdir=${File.DirTemp}"$))
 
'    s.SetEnvironmentVariables(CreateMap("JAVA_HOME": FindJava, _
'        "JAVA_OPTS": $"-Djava.io.tmpdir=${File.DirTemp}"$))
End Sub

AVD manager is working ok, too.
 
Last edited:

cimperia

Active Member
Licensed User
Longtime User
Yes, I get this result and notice the space in the path.

TempFolder: C:\Users\User Dell\AppData\Local\Temp\

When I check TempFolder, no log gets created there when running SDK manager or by B4A.

I suggested a fix in a post above, would it still be applicable?
 

cimperia

Active Member
Licensed User
Longtime User
That fixed it. SDK & AVD managers now run correctly. Thank you.
 
Top