After installing openjdk8 and trying to run it fails:
sh
iPad:~# java
OpenJDK Server VM warning: Can't detect initial thread stack location - find_vma failed
Error occurred during initialization of VM
Too small initial heap
On dmesg there is a FIXME message that is probably the first reason why it doesn’t work:
FIXME no support for shared futexes
It would be amazing if one day it works partially or completely :)
Sounds a little like missing /proc/pid/maps
I have the same problem, it will be great to have the jvm running.
Adding -mx512m you can get rid of the Too small initial heap
So I've tried for a while to get any forms of java running, and I was playing around, and I tried these two commands:

Here are the two error logs:
hs_err_pid40.txt
hs_err_pid43.txt
Here are my thoughts, but I could be wrong because I don't have much experience with this:
it seems that running in mixed mode is not the problem, because running in the interactive mode is not working either. The files show that the machine points to LD_LIBRARY_PATH=/usr/lib/jvm/java-1.8-openjdk/jre/lib/i386/server:/usr/lib/jvm/java-1.8-openjdk/jre/lib/i386:/usr/lib/jvm/java-1.8-openjdk/jre/../lib/i386 but ish is i686. I'm hoping for someone with more experience could help.
My error that I get when I run any command (javac, java, javadoc, etc.) is:
./java: line 1: syntax error: unexpected word (expecting ")")
Note that Java 7 seems to work, with apk add openjdk7, you can run:
iPad:~# java -mx256m -version
OpenJDK Client VM warning: Can't detect initial thread stack location - find_vma failed
java version "1.7.0_211"
OpenJDK Runtime Environment (IcedTea 2.6.17) (Alpine 7.211.2.6.17-r0)
OpenJDK Client VM (build 24.211-b02, mixed mode)
iPad:~#
But I can't get Java 8 to work for the same issues you're encountering.
Further, if I set -mx512m, then the Java process spits out the version, and a _split_ second later, Ish crashes. (Using Java 7.)
Does anyone know how to force apk to install a package without its dependencies? I was hoping to play around with Maven, but it has a dependency on openjdk-jre8, which seems to work less well than Java 7.
It would be great to get a JDK/Maven environment up and running on iSH, even for simple projects.
I don't think that's possible with apk. There are other ways to install maven though.
You can download maven in any folder, unpack it and run it, be sure to
download a version compatible with jdk 7
Il giorno lun 24 giu 2019 alle ore 22:59 Theodore Dubois <
[email protected]> ha scritto:
I don't think that's possible with apk. There are other ways to install
maven though.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/tbodt/ish/issues/306?email_source=notifications&email_token=ABSPV2SCL6V767FF6BTAY6LP4EYUJA5CNFSM4GWLRXU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYOGXSI#issuecomment-505179081,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABSPV2UIH36WPQAJOF6DZBLP4EYUJANCNFSM4GWLRXUQ
.
Yep - I was hoping to maintain an apk script for easy reproducibility, but just grabbed the Maven binary from their website and ran it with OpenJDK 7. It failed pretty quickly (there’s more, but it gets less helpful):
iPad:~/apps/apache-maven-3.6.1/bin# ./mvn
OpenJDK Client VM warning: Can't detect initial thread stack location - find_vma failed
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGILL (0x4) at pc=0x00000000, pid=14, tid=4149333376
#
# JRE version: OpenJDK Runtime Environment (7.0_211-b02) (build 1.7.0_211-b02)
# Java VM: OpenJDK Client VM (24.211-b02 mixed mode linux-x86 )
# Derivative: IcedTea 2.6.17
# Distribution: Custom build (Thu Apr 11 13:17:01 UTC 2019)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /root/apps/apache-maven-3.6.1/bin/hs_err_pid14.log
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGILL (0x4) at pc=0x00000000, pid=44, tid=4149333376
#
# JRE version: OpenJDK Runtime Environment (7.0_211-b02) (build 1.7.0_211-b02)
# Java VM: OpenJDK Client VM (24.211-b02 mixed mode linux-x86 )
# Derivative: IcedTea 2.6.17
# Distribution: Custom build (Thu Apr 11 13:17:01 UTC 2019)
# Core dump written. Default location: /root/apps/apache-maven-3.6.1/bin/core or core.44
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
# http://icedtea.classpath.org/bugzilla
#
--------------- T H R E A D ---------------
Current thread (0x56561400): JavaThread "main" [_thread_in_Java, id=61, stack(0xf74cc000,0xf751cd60)]
Stack: [0xf74cc000,0xf751cd60]
[error occurred during error reporting (printing stack bounds), id 0xb]
I’m guessing the ~SIGKILL~ (SIGILL, sorry) is coming from iOS. Is it memory-related? Note also I have $MAVEN_OPTS set to -Xmx384m but most other values (256/512) fail the same way.
That's a SIGILL which is very different from a SIGKILL. dmesg will tell you more, but in all likelihood it's missing sse instructions
I cleared dmesg then ran it immediately after a Maven failure:
iPad:~/apps/apache-maven-3.6.1/bin# ./mvn
OpenJDK Client VM warning: Can't detect initial thread stack location - find_vma failed
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGILL (0x4) at pc=0x00000000, pid=85, tid=4149333376
#
# JRE version: OpenJDK Runtime Environment (7.0_211-b02) (build 1.7.0_211-b02)
# Java VM: OpenJDK Client VM (24.211-b02 mixed mode linux-x86 )
# Derivative: IcedTea 2.6.17
# Distribution: Custom build (Thu Apr 11 13:17:01 UTC 2019)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /root/apps/apache-maven-3.6.1/bin/hs_err_pid85.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
# http://icedtea.classpath.org/bugzilla
#
Aborted
iPad:~/apps/apache-maven-3.6.1/bin# dmesg
unknown ioctl 5413
unknown ioctl 5413
unknown ioctl 5413
unknown ioctl 5413
unknown ioctl 5413
unknown ioctl 5413
unknown ioctl 5413
unknown ioctl 5413
unknown ioctl 5413
unknown ioctl 5413
FIXME no support for shared futexes
102 illegal instruction at 0xf548a247: dd c7 dd c6 dd c5 dd c4
102 page fault on 0x4 at 0xf788452a
102 page fault on 0x4 at 0xf788452a
ffree. The only reason I can think of to do that is to prepare for running MMX code.
Just fixed the warning about not being able to detect initial stack location. Everything else is still broken.
Now tries to use cmpxchg8b
I got java to work after running reboot And letting the app crash, once I opened it, it worked
Just an update on this thread, but using the AppStore version of iSH and OpenJDK8 I was able to compile a quick HelloWorld Java example and execute it successfully (albeit I needed to specify -ms128m to avoid the heap size error previously mentioned, 256/512/1024m also work).
That is a great news! I will check it! Thanks the info :)
I can verify, with that works!
noob question - whats the command to run to install openjdk8?
Most helpful comment
Just an update on this thread, but using the AppStore version of iSH and OpenJDK8 I was able to compile a quick HelloWorld Java example and execute it successfully (albeit I needed to specify
-ms128mto avoid the heap size error previously mentioned, 256/512/1024m also work).