B4J Question JRDC.jar get error Java Virtual Machine Launcher

Dear,
JRDC.jar file is success release
but when running, I get this error when running..
i have create folder " libs " that included library that used
please help any solution.. ?
 

Attachments

  • jrdc open.jpg
    jrdc open.jpg
    165.2 KB · Views: 186
  • error run jrdc.jpg
    error run jrdc.jpg
    103.8 KB · Views: 194
  • jrdclib.jpg
    jrdclib.jpg
    287 KB · Views: 202
  • jrdc lib folder.jpg
    jrdc lib folder.jpg
    97.1 KB · Views: 195
  • file lib.jpg
    file lib.jpg
    96.8 KB · Views: 187
I get another Error on Windows 7 (debug, release is oke, but when error in command line )
any solution Sir ?
for more information ( all is well when debug, compile jrdc.jar and running in commnad line when using windows server 2019 )
 

Attachments

  • jrdc win 7 success Run.jpg
    jrdc win 7 success Run.jpg
    423.6 KB · Views: 192
  • use cmd open jRDC in windows 7.jpg
    use cmd open jRDC in windows 7.jpg
    141.1 KB · Views: 196
Upvote 0

OliverA

Expert
Licensed User
Longtime User
Ok. So you configured Java 11 in the IDE. As is, this does not get called when you try to start java from the command line
B4X:
java -jar jRDC.jar
This command will call the previously (most likely Java 8) JRE. In order to use Java 11's JRE, you have to prepend the java command with the path. So for example I have @Erel's mentioned Java 11 installed in
C:\OpenJDK\jdk-11.0.1
to launch the above, I would have to do
B4X:
C:\OpenJDK\jdk-11.0.1\bin\java.exe -jar jRDC.jar
Note: PLEASE don't post screen shots! I cannot copy/paste text from screen shots. I may stop replying to posts that just include screen shots instead of posting text as text. This is not solely directed at you. I'm just getting tired of having to switch back and forth between a graphic and the edit box here to type out stuff that I could just have copied and pasted. And yes, its short text, but sometimes my attention span is shorter...
 
Upvote 0

TILogistic

Expert
Licensed User
Longtime User
first check which version of Java and environment variables

C:\>java -version
java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)

C:\>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.8.0_241

A simple solution to run java 11.
Create a workable environment called JAVA11_HOME that contains the path of JDK11.

EXAMPLE (use set for session or setx for permanent)
C:\>set JAVA11_HOME=C:\OpenJDK\java-11.0.1

C:\>echo %JAVA11_HOME%
C:\OpenJDK\java-11.0.1

C:\>%JAVA11_HOME%/bin/java -version
openjdk version "11.0.1" 2018-10-16
OpenJDK Runtime Environment 18.9 (build 11.0.1+13)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)
 
Last edited:
Upvote 0
Top