after building the static libs, I want to build the launchers (e.g. java) This does not mean we are going to use these launchers at runtime, but it is good to have them for development/testing.
May 24
Hello, World running on linux-x86_64.
The launcher is now linked with libjvm.a, libjava.a and libnio.a. I explicitly
add the symbols that are used in JNI calls (they are not directly referred to,
so have to add them in the link script which is here
The launcher is here
The java.base module need to be copied into
Before linking, we need to have a build of OpenJDK.
My experimental work is in https://github.com/johanvos/jdk/tree/statichotspot
Build it as follows:
May 24
May 23:
May 22:
all required libs are build for linux-x86_64.
Now creating an own launcher and linking it with those libs.
May 21:
sh configure \
--with-jvm-variants=minimal \
--with-build-jdk=/opt/jdk-23 \
--enable-static-build \
--enable-debug \
--with-native-debug-symbols=internal
Next, make the libs:
make LOG=info,cmdlines static-libs-image
I can now print a Java stacktrace:
Caused by: java.lang.NullPointerException
at jdk.internal.util.StaticProperty.getProperty(java.base/StaticProperty.java:117)
at jdk.internal.util.StaticProperty.
Work on creating/starting the VM
command:
make launchers
-> fails since it is trying to build a shared lib (instead of a dynamic) for
x86_64 (instead of arm64)
[in parallel]: one of the changes for mobile doesn't seem mobile-specific to me, see https://mail.openjdk.org/pipermail/build-dev/2024-May/045035.html