Skip to content

Instantly share code, notes, and snippets.

@rkuzsma
Created April 1, 2017 21:53
Show Gist options
  • Save rkuzsma/be317a3c07f835e6d0593b70ecd81d0e to your computer and use it in GitHub Desktop.
Save rkuzsma/be317a3c07f835e6d0593b70ecd81d0e to your computer and use it in GitHub Desktop.
Demonstrate failed attempt to build and run Jamvm with OpenJDK 8 inside Docker
FROM openjdk:8
# Download jamvm from source and apply this patch to src/classlib/openjdk/natives.c:
# https://sourceforge.net/u/tdaitx/jamvm/ci/f342a84116edfe28ab75ebfa17fcf929bafb02c1/tree/src/classlib/openjdk/natives.c?diff=236f9d849cf52faeb150a6cd5ba6fbeb61bd2f1f
RUN apt-get update -qq && apt-get install -y \
vim build-essential zlib1g-dev \
openjdk-8-jre-jamvm libtool autoconf automake
RUN git clone https://git.code.sf.net/p/jamvm/code jamvm-code
WORKDIR jamvm-code
RUN ./autogen.sh && \
wget -O src/classlib/openjdk/natives.c https://sourceforge.net/u/tdaitx/jamvm/ci/f342a84116edfe28ab75ebfa17fcf929bafb02c1/tree/src/classlib/openjdk/natives.c?format=raw && \
./configure --with-java-runtime-library=openjdk8 && make && make install && \
cp /usr/local/jamvm/lib/libjvm.so /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/jamvm
RUN java -jamvm -version
# ^^^ fails with error:
# Error initialising VM (initialiseMainThread)
# Check the README for compatible class-libraries/versions
# Error: Could not create the Java Virtual Machine.
# Error: A fatal exception has occurred. Program will exit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment