Closed tobias47n9e closed 3 years ago
Using this in the manifest I could get the number of errors down:
build-options:
env:
PATH: /app/bin:/usr/bin:/usr/lib/sdk/openjdk11/bin
JAVA_HOME: /app/jre
CMAKE_JAVA_INCLUDE_PATH: /usr/lib/sdk/openjdk11/
JAVA_AWT_LIBRARY: /usr/lib/sdk/openjdk11/jvm/openjdk-11/lib/libawt.so
JAVA_JVM_LIBRARY: /app/jre/lib/server/libjvm.so
JAVA_INCLUDE_PATH: /usr/lib/sdk/openjdk11/jvm/openjdk-11/include
JAVA_INCLUDE_PATH2: /usr/lib/sdk/openjdk11/jvm/openjdk-11/include/linux
JAVA_AWT_INCLUDE_PATH: /app/jre/lib
Now it is only complaining about 3 env variables:
Could NOT find JNI (missing: JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
Perhaps all is solved by setting:
build-options:
env:
JAVA_HOME: /usr/lib/sdk/openjdk11/jvm/openjdk-11/
Yes JNI is shipped as part of this extension.
The extension also ships a "enable.sh" script to set up your environment if needed.
Sourcing it will set up your JAVA_HOME and PATH variables appropriately. E.g. you should be able to do:
source /usr/lib/sdk/openjdk11/enable.sh && my_build_command
Hope that helps
Not sure if this is a Bug or me not knowing enough about Cmake and Java. When I add the extension
I run into this error while building a CMAKE module:
Is JNI part of this extension or is there a way of adding it? Sorry for using the issue tracker for support question.