Can't get Java program running

Trying to get YAAC running in Haiku. YAAC (Yet Another APRS Client) is a cross-platform APRS program that runs under Java. I’m getting errors, but not sure what they mean. The first one regarding “RXTX native libraries” won’t stop the program from running according to the YAAC develepor, so I’m not worried about that one for now. It’s the errors after that which have me stumped. Can anyone advise? I’ve got OpenJDK12 installed. Below is the Terminal output after attempting to run YAAC. Thanks, Jeff KP3FT.

Welcome to the Haiku shell.

~> /boot/system/lib/openjdk12/bin/java -jar /boot/home/YAAC/YAAC.jar
os.name=Haiku
os.version=1
os.arch=amd64
java.version=12.0.1
java.class.version=56.0
java.class.path=/boot/home/YAAC/YAAC.jar
raw boot URL: jar:file:/boot/home/YAAC/YAAC.jar!/org/ka2ddo/yaac/bootstrap/YAACBootstrap.class
boot URL: file:/boot/home/YAAC/YAAC.jar
*** no HAIKU subdirectory
#1: /boot/home/YAAC/YAAC.jar
java.io.FileNotFoundException: couldn’t find directory containing RXTX native libraries
at org.ka2ddo.yaac.bootstrap.YAACBootstrap.hackNativeLibraryPath(YAACBootstrap.java:511)
at org.ka2ddo.yaac.bootstrap.YAACBootstrap.main(YAACBootstrap.java:120)
launching subprocess to run YAAC…
Exception in thread “main” java.io.IOException: Cannot run program “java”: error=-2147483648, Out of memory
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
at java.base/java.lang.Runtime.exec(Runtime.java:589)
at java.base/java.lang.Runtime.exec(Runtime.java:448)
at org.ka2ddo.yaac.bootstrap.YAACBootstrap.main(YAACBootstrap.java:167)
Caused by: java.io.IOException: error=-2147483648, Out of memory
at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
at java.base/java.lang.ProcessImpl.(ProcessImpl.java:344)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:275)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
… 4 more
~>

Forgot to add something. The developer said to try the “-Xmx” switch for the memory errors and suggested “-Xmx512m”. I tried that and it still gives the memory error, but when I try “-Xmx256m”, I get the following:

Welcome to the Haiku shell.

~> /boot/system/lib/openjdk12/bin/java -Xmx256m -jar /boot/home/YAAC/YAAC.jar
os.name=Haiku
os.version=1
os.arch=amd64
java.version=12.0.1
java.class.version=56.0
java.class.path=/boot/home/YAAC/YAAC.jar
raw boot URL: jar:file:/boot/home/YAAC/YAAC.jar!/org/ka2ddo/yaac/bootstrap/YAACBootstrap.class
boot URL: file:/boot/home/YAAC/YAAC.jar
*** no HAIKU subdirectory
#1: /boot/home/YAAC/YAAC.jar
java.io.FileNotFoundException: couldn’t find directory containing RXTX native libraries
at org.ka2ddo.yaac.bootstrap.YAACBootstrap.hackNativeLibraryPath(YAACBootstrap.java:511)
at org.ka2ddo.yaac.bootstrap.YAACBootstrap.main(YAACBootstrap.java:120)
launching subprocess to run YAAC…
Exception in thread “main” java.io.IOException: Cannot run program “java”: error=-2147459069, No such file or directory
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
at java.base/java.lang.Runtime.exec(Runtime.java:589)
at java.base/java.lang.Runtime.exec(Runtime.java:448)
at org.ka2ddo.yaac.bootstrap.YAACBootstrap.main(YAACBootstrap.java:167)
Caused by: java.io.IOException: error=-2147459069, No such file or directory
at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
at java.base/java.lang.ProcessImpl.(ProcessImpl.java:344)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:275)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
… 4 more
~>

It appears YAAC needs some JNI native libraries for your platform. These will probably need to be built from source (likely C/C++.)

Hi waddlesplash, please read full posts before replying :wink:

Right, I misread the backtrace. The real problem is:

 Exception in thread “main” java.io.IOException: Cannot run program “java”: error=-2147459069, No such file or directory

So, that’s very strange. Why can’t it find java? Obviously that is in the PATH

Maybe you need to cd to YAAC directly first?

Seems I’m getting closer. Tried cd’ing to YAAC folder first, but that didn’t work. Then I cd’ed to the Java folder which sort of works. It stops with memory errors, but using the switch “-Xmx256m” to limit memory to 256mb lets it stay running in Terminal, but no YAAC window opens:

Welcome to the Haiku shell.

~> cd /boot/system/lib/openjdk12/bin/
/boot/system/lib/openjdk12/bin> java -Xmx256m -jar /boot/home/YAAC/YAAC.jar
os.name=Haiku
os.version=1
os.arch=amd64
java.version=12.0.1
java.class.version=56.0
java.class.path=/boot/home/YAAC/YAAC.jar
raw boot URL: jar:file:/boot/home/YAAC/YAAC.jar!/org/ka2ddo/yaac/bootstrap/YAACBootstrap.class
boot URL: file:/boot/home/YAAC/YAAC.jar
*** no HAIKU subdirectory
#1: /boot/home/YAAC/YAAC.jar
java.io.FileNotFoundException: couldn’t find directory containing RXTX native libraries
at org.ka2ddo.yaac.bootstrap.YAACBootstrap.hackNativeLibraryPath(YAACBootstrap.java:511)
at org.ka2ddo.yaac.bootstrap.YAACBootstrap.main(YAACBootstrap.java:120)
launching subprocess to run YAAC…
Thu Jun 06 09:11:03 EDT 2019: starting YAAC…
Thu Jun 06 09:11:03 EDT 2019: load cached preferences…
Thu Jun 06 09:11:03 EDT 2019: load beacon definitions…
Thu Jun 06 09:11:03 EDT 2019: load status definition…
Thu Jun 06 09:11:03 EDT 2019: set up raw packet data model…
Thu Jun 06 09:11:03 EDT 2019: YAAC finding installation directory…
Thu Jun 06 09:11:03 EDT 2019: YAAC checking if upgrader needs moving…
executing installation cleaner…
java.io.IOException: Cannot run program “java” (in directory “/boot/home/YAAC”): error=-2147483648, Out of memory
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
at java.base/java.lang.Runtime.exec(Runtime.java:589)
at java.base/java.lang.Runtime.exec(Runtime.java:413)
at org.ka2ddo.yaac.YAAC.moveNewUpgraderToLib(YAAC.java:972)
at org.ka2ddo.yaac.YAAC.main(YAAC.java:533)
Caused by: java.io.IOException: error=-2147483648, Out of memory
at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
at java.base/java.lang.ProcessImpl.(ProcessImpl.java:344)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:275)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
… 5 more
Thu Jun 06 09:11:04 EDT 2019: YAAC loading CoreProvider…
loading plugin --core-- name YAAC version 1.0-beta139(30-May-2019)
unable to load RXTX drivers, not enabling serial ports: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path: [%A/lib, /boot/home/config/non-packaged/lib, /boot/home/config/lib, /boot/system/non-packaged/lib, /boot/system/lib, /usr/java/packages/lib, %A/lib, /boot/home/config/non-packaged/lib, /boot/home/config/lib, /boot/system/non-packaged/lib, /boot/system/lib]
Thu Jun 06 09:11:05 EDT 2019: creating SymAttr objects for 1.0.1…
Thu Jun 06 09:11:05 EDT 2019: filling in text for 1.0.1 symbols…
Thu Jun 06 09:11:05 EDT 2019: YAAC loading plugins…
scanning plugin JAR file /boot/home/YAAC/plugins/sampleplugin.jar
attempting to load provider class org.ka2ddo.yaac.SamplePluginProvider
loading plugin /boot/home/YAAC/plugins/sampleplugin.jar name YAAC Sample Plug-in version V0.0
Thu Jun 06 09:11:05 EDT 2019: YAAC starting digipeater…
Thu Jun 06 09:11:05 EDT 2019: YAAC opening ports…
Thu Jun 06 09:11:05 EDT 2019: no local callsign yet, registering listener
Thu Jun 06 09:11:05 EDT 2019: YAAC starting beacon and persistent objects…

Java can be picky. Try compiling from the parent directory of YAAC.