Android - Can't create the app: Usage: java

Just starting out? Need help? Post your questions and find answers here.
mgperry
Posts: 12
Joined: Fri May 13, 2016 5:38 am

Android - Can't create the app: Usage: java

Post by mgperry »

For Compiler-->Create App...--->Android-->Create App

[19:10:37] [COMPILER] Can't create the app: Usage: java [-options] class [args...].

From the 1st time I saw this I assumed there was something syntactically wrong with the java command line/parms being passed by SB. But as an end user how to tell, there is little diagnostic info here. :(

I played around with various parms paths on the Create App panel, using quotes etc. I uninstalled by 64bit Java and installed the 32 bit Java all to no avail :(

Finally I tried using very basic paths (not what I wanted, but I needed a solution), by allowing all paths on the Create App panel to be relative to the source path - hence avoiding D:\a\b\c\... and typically using the last level or just a filename it works :D

:!: But the bug here is that SB should correctly handle quoting/escaping or what ever is needed when invoking Java.

For the record I am using SB 2.0, Windows 10 Home 64bit , Java 1.8 (C:\Program Files (x86)\Java\jdk1.8.0_121\)
falsam
Posts: 286
Joined: Mon May 05, 2014 9:49 pm
Location: France
Contact:

Re: Android - Can't create the app: Usage: java

Post by falsam »

Hello mgperry. Have you specified the location of Java SDK?

Image

➽ Windows 11 - jdk-11.0.2 - SB 3.00 - Android 15
https://falsam.com

Sorry for my poor english
mgperry
Posts: 12
Joined: Fri May 13, 2016 5:38 am

Re: Android - Can't create the app: Usage: java

Post by mgperry »

Yes, I supplied the 32 bit Java JDK directory in the File-->Preferences-->Compiler--->JDK1.8+ path

But please read my original post in full, I did succeed in making an app, its the path(s) that I have issues with.
User avatar
MrTAToad
Posts: 291
Joined: Sun Apr 20, 2014 11:43 am
Location: Chichester, England
Contact:

Re: Android - Can't create the app: Usage: java

Post by MrTAToad »

My path is C:\Program Files (x86)\Java\jdk1.8.0_121\ which works fine.

It sounds like to linked to the bin directory...
mgperry
Posts: 12
Joined: Fri May 13, 2016 5:38 am

Re: Android - Can't create the app: Usage: java

Post by mgperry »

Why does it sound like its linked to the bin directory.

You did read that I CAN create an app?
mgperry
Posts: 12
Joined: Fri May 13, 2016 5:38 am

Re: Android - Can't create the app: Usage: java

Post by mgperry »

On the Create App panel in field "Output filename" - try typing in a path (e.g. c:\myapp.apk) rather than just a filename - its accepted but you then get the Java Usage error....

If however the path is relative (using ..\..\) it works, so the colon ":' is not being handled correctly. Most likely the actual Java command requires the path to be quoted correctly.
User avatar
MrTAToad
Posts: 291
Joined: Sun Apr 20, 2014 11:43 am
Location: Chichester, England
Contact:

Re: Android - Can't create the app: Usage: java

Post by MrTAToad »

mgperry wrote:Why does it sound like its linked to the bin directory.

You did read that I CAN create an app?
Yes, and I didn't get any problems - or did I have to make anything relative.
mgperry
Posts: 12
Joined: Fri May 13, 2016 5:38 am

Re: Android - Can't create the app: Usage: java

Post by mgperry »

MrTAToad wrote:Yes, and I didn't get any problems - or did I have to make anything relative.
Are you saying that you tried a fullpath in Output filename (e.g. C:\mydir\myapp.apk) ?
User avatar
MrTAToad
Posts: 291
Joined: Sun Apr 20, 2014 11:43 am
Location: Chichester, England
Contact:

Re: Android - Can't create the app: Usage: java

Post by MrTAToad »

mgperry wrote:
MrTAToad wrote:Yes, and I didn't get any problems - or did I have to make anything relative.
Are you saying that you tried a fullpath in Output filename (e.g. C:\mydir\myapp.apk) ?
Yes. I used C:\Users\Home\Documents\Programming\SpiderBasic\assembloids_go

It finishes with :
[18:32:36] Export successful (C:\Users\Home\Documents\Programming\SpiderBasic\assembloids_go).
[18:33:49] Export successful (C:\Users\Home\Documents\Programming\SpiderBasic\assembloids_go.apk).
mgperry
Posts: 12
Joined: Fri May 13, 2016 5:38 am

Re: Android - Can't create the app: Usage: java

Post by mgperry »

MrTAToad wrote: Yes. I used C:\Users\Home\Documents\Programming\SpiderBasic\assembloids_go

It finishes with :
[18:32:36] Export successful (C:\Users\Home\Documents\Programming\SpiderBasic\assembloids_go).
[18:33:49] Export successful (C:\Users\Home\Documents\Programming\SpiderBasic\assembloids_go.apk).
OK I tried with a Users subdirectory and I agree it works, but I tried with D:\myapp.apk and I get the Java usage error.....?
(I used Explorer to copy a file to D:\ without any problems)
Post Reply