B4J Question get output from b4j

tkstarir

Member
hi b4x community


i wrote a "keyboard overlay" application for game streamers with b4j
my app is a plugin for stream apps such obs

everything was ok in Debug Compilation


but now i wanna get an output from project

when i set compilation mode to Release, b4j gave me a jar file


what i must do with it ? there is any way to run it without java -jar file.jar ?


if there is not way for it, how can i run jar file into an UI Application in B4j ?

mean i to create an ui application to execute jar file into it !
 
Last edited:

tkstarir

Member
You can not execute another app "in your app". You can start the other pp with JShell for sure.

hi DonManfred

thanks for your help

i made my decision to write a .bat file for it
but there is another problem
when i launch .jar file with java command, the following error writed and my server (localhost:1111) won't launch:

B4X:
$ java -jar Main.jar
Keyboard overlay screen Lunach !


2020-05-27 16:39:53.751:INFO::main: Logging initialized @2283ms to org.eclipse.jetty.util.log.StdErrLog
main._appstart (java line: 74)
java.lang.NoSuchMethodException: tkstarir.keyboard.overlay.ir.overlay_websocket.innerInitializeHelper(anywheresoftware.b4a.BA)
        at java.base/java.lang.Class.getDeclaredMethod(Class.java:2476)
        at anywheresoftware.b4j.object.JServlet.getInitializeMethod(JServlet.java:56)
        at anywheresoftware.b4j.object.WebSocketModule$Servlet.<init>(WebSocketModule.java:42)
        at anywheresoftware.b4j.object.ServerWrapper.Start(ServerWrapper.java:187)
        at tkstarir.keyboard.overlay.ir.main._appstart(main.java:74)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91)
        at anywheresoftware.b4a.BA.raiseEvent(BA.java:78)
        at tkstarir.keyboard.overlay.ir.main.main(main.java:28)

main.main (java line: 28)
java.lang.RuntimeException: java.lang.NoSuchMethodException: tkstarir.keyboard.overlay.ir.overlay_websocket.innerInitializeHelper(anywheresoftware.b4a.BA)
        at anywheresoftware.b4a.BA.raiseEvent2(BA.java:120)
        at anywheresoftware.b4a.BA.raiseEvent(BA.java:78)
        at tkstarir.keyboard.overlay.ir.main.main(main.java:28)
Caused by: java.lang.NoSuchMethodException: tkstarir.keyboard.overlay.ir.overlay_websocket.innerInitializeHelper(anywheresoftware.b4a.BA)
        at java.base/java.lang.Class.getDeclaredMethod(Class.java:2476)
        at anywheresoftware.b4j.object.JServlet.getInitializeMethod(JServlet.java:56)
        at anywheresoftware.b4j.object.WebSocketModule$Servlet.<init>(WebSocketModule.java:42)
        at anywheresoftware.b4j.object.ServerWrapper.Start(ServerWrapper.java:187)
        at tkstarir.keyboard.overlay.ir.main._appstart(main.java:74)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91)
        ... 2 more
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…