Main Page » Developer Section » macOS
macOS
Tested using Amazon Corretto JDK on an M1 MacBook Air.
Java version when tested:
% java --version
openjdk 17.0.2 2022-01-18 LTS
OpenJDK Runtime Environment Corretto-17.0.2.8.1 (build 17.0.2+8-LTS)
OpenJDK 64-Bit Server VM Corretto-17.0.2.8.1 (build 17.0.2+8-LTS, mixed mode, sharing)
- Create a working folder.
- Download the ZIP distribution of the version of BaseX that you would like to use.
- Unzip the archive so you have the
basex
folder. - Remove the
.basex
configuration files from the folder to ensure that each user gets a personal file generated automatically:% rm ./basex/.basex*
- Create a new file
basex-config.cfg
in your working folder and add the content. Remember to change the app-version to your selected version:[Application] app.classpath=$APPDIR/BaseX.jar app.mainclass=org.basex.BaseXGUI app.classpath=$APPDIR/lib/* app.classpath=$APPDIR/lib/custom/* [JavaOptions] java-options=-Djpackage.app-version=11.0
- If you would like to include some custom libraries in the build, add them to the folder in basex/lib/custom.
- Add a
basex.icns
file to your working folder. - Run the command to make a
.dmg
disk image of BaseX. Remember to set the app version to match your selected version: - A disk image will be created in your working folder. Open it, and you can copy the application to your Applications folder or any chosen location.
- Optional: If you want to add custom libraries later, show the package contents of the application. Replace the content of the file
BaseX {version}.cfg
with the original from step 5. Now you can add and remove libraries, and they will be loaded/unloaded with application restart.
jpackage --input target/ \
--input basex \
--name "BaseX" \
--main-jar BaseX.jar \
--main-class org.basex.BaseXGUI \
--type dmg \
--icon "basex.icns" \
--app-version "11.0" \
--vendor "BaseX GmbH" \
--copyright "Copyright 2024 BaseX GmbH" \
--mac-package-name "BaseX" \
--module-path "lib" \
--verbose
⚡Generated with XQuery