mirror of
https://github.com/penpot/penpot.git
synced 2026-08-09 06:18:47 +00:00
lbug pulls arrow-memory-core and arrow-vector but no allocation-manager implementation, so RootAllocator cannot be constructed; arrow-memory-netty 18.2.0 matches the arrow-vector lbug already brings and pulls only netty-buffer, netty-common, jackson and slf4j-api, all of which the backend already has. --add-opens=java.base/java.nio=ALL-UNNAMED is the second half: without it MemoryUtil's static initializer dies with an InaccessibleObjectException that surfaces as an unhelpful NoClassDefFoundError from anything touching RootAllocator. It has to be present at JVM start, hence all three places. Note app.main/restart will not pick it up — it restarts integrant inside the same JVM, so the process must be restarted. Worth a reviewer's attention: this is a JVM-wide flag added for one subsystem. It is the standard Arrow requirement and grants nothing beyond reflective access to java.nio, but it strengthens the case for putting the whole graph subsystem behind a feature flag.
27 lines
836 B
Bash
27 lines
836 B
Bash
#!/usr/bin/env bash
|
|
|
|
if [[ ! -n "$JAVA_CMD" ]]; then
|
|
if [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then
|
|
JAVA_CMD="$JAVA_HOME/bin/java"
|
|
else
|
|
set +e
|
|
JAVA_CMD=$(type -p java)
|
|
set -e
|
|
if [[ ! -n "$JAVA_CMD" ]]; then
|
|
>&2 echo "Couldn't find 'java'. Please set JAVA_HOME."
|
|
exit 1
|
|
fi
|
|
fi
|
|
fi
|
|
|
|
if [ -f ./environ ]; then
|
|
source ./environ
|
|
fi
|
|
|
|
export JAVA_OPTS="-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager -Dlog4j2.configurationFile=log4j2.xml -XX:-OmitStackTraceInFastThrow --sun-misc-unsafe-memory-access=allow --enable-native-access=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --enable-preview $JVM_OPTS $JAVA_OPTS"
|
|
|
|
ENTRYPOINT=${1:-app.main};
|
|
|
|
set -ex
|
|
exec $JAVA_CMD $JAVA_OPTS -jar penpot.jar -m $ENTRYPOINT
|