-
Couldn't load subscription status.
- Fork 0
Guide on building OpenJDK for Zinc Native
Zinc Native is a module that helps Zinc to operate performance-intensive tasks and to support multithreading since NodeJS doesn't support multithreading. However, Zinc Native is written Java so it needs OpenJDK to run. Using the OpenJDK that is available to download on the Internet is too big and heavy for Zinc Native although you can use it if you don't mind the problem of size.
- OpenJDK 15(recommended) installed and is added to PATH
- Python(If you are using method 2) and is added to PATH
- NodeJS (It is required for developing Zinc although it is not used in this guide)
-
Navigate to any directory e.g. Desktop
cd Desktop -
Build OpenJDK 15 into
java-runtimefolder (Actually the name doesn't matter)jlink --verbose --no-header-files --no-man-pages --compress=2 --strip-debug --add-modules="jdk.unsupported,java.sql,java.desktop,java.naming,java.management,java.instrument,java.security.jgss" --output="./java-runtime"
-
Move the
binandlibfolder into a new folder namedjavaunder Zinc's project directory which should looks like thisZinc -... -java -bin -lib -...
-
Make sure you have the latest development scripts
yarn update-submodules
-
Build JDK with prebuilt python script and execute it with a yarn command
yarn jdk-init
-
Hmm that's it 🤔? Err yea, it's that simple. You should now see a folder named
javaplaced in the project directory