Page 1 of 2

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

Posted: Mon Mar 27, 2017 11:47 am
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\)

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

Posted: Mon Mar 27, 2017 1:59 pm
by falsam
Hello mgperry. Have you specified the location of Java SDK?

Image

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

Posted: Mon Mar 27, 2017 2:20 pm
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.

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

Posted: Mon Mar 27, 2017 3:09 pm
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...

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

Posted: Mon Mar 27, 2017 3:24 pm
by mgperry
Why does it sound like its linked to the bin directory.

You did read that I CAN create an app?

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

Posted: Mon Mar 27, 2017 3:33 pm
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.

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

Posted: Mon Mar 27, 2017 5:21 pm
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.

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

Posted: Mon Mar 27, 2017 5:30 pm
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) ?

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

Posted: Mon Mar 27, 2017 5:34 pm
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).

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

Posted: Mon Mar 27, 2017 5:42 pm
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)