Skip to content

Bundles GraalJS jar files required for the JOSM Scripting Plugin

Notifications You must be signed in to change notification settings

Gubaer/josm-scripting-plugin-graaljs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository assembles the jar files required to use GraalJS on a stock JDK or with the GraalVM for JDK 21 in the JOSM Scripting Plugin.

Available Releases:

How to use

  1. Download an available release

  2. Unzip in a directory

Starting with GraalJS version 23.1.0

On Linux, run JOSM as follows:

$ java -jar \
   --module-path "/path/to/graaljs/jars" \
   --add-modules org.graalvm.polyglot,org.graalvm.word,org.graalvm.collections \
   --add-exports=java.base/sun.security.action=ALL-UNNAMED \
   --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED \
   --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED \
   josm-latest.jar

On Windows, run JOSM as follows:

C:\> java -jar `
   --module-path "\path\to\graaljs\jars" `
   --add-modules org.graalvm.polyglot,org.graalvm.word,org.graalvm.collections `
   --add-opens java.prefs/java.util.prefs=ALL-UNNAMED `
   --add-exports java.base/sun.security.action=ALL-UNNAMED `
   --add-exports java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED `
   --add-exports java.desktop/com.sun.imageio.spi=ALL-UNNAMED `
   josm-latest.jar

Until GraalJS version 23.0.2

  1. On Linux, run JOSM as follows:

    $ java -jar \
       --module-path "/path/to/graaljs/jars" \
       --add-modules org.graalvm.sdk,org.graalvm.js,com.oracle.truffle.regex,org.graalvm.truffle \
       --add-opens java.prefs/java.util.prefs=ALL-UNNAMED \
       --add-exports=java.base/sun.security.action=ALL-UNNAMED \
       --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED \
       --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED \
       josm-latest.jar

    On Windows, run JOSM as follows:

    C:\> java -jar `
       --module-path "\path\to\graaljs\jars" `
       --add-modules org.graalvm.sdk,org.graalvm.js,com.oracle.truffle.regex,org.graalvm.truffle `
       --add-opens java.prefs/java.util.prefs=ALL-UNNAMED `
       --add-exports java.base/sun.security.action=ALL-UNNAMED `
       --add-exports java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED `
       --add-exports java.desktop/com.sun.imageio.spi=ALL-UNNAMED `
       josm-latest.jar

Start JOSM with a stock JDK (i.e. the OpenJDK) and install the JOSM Scripting Plugin. GraalJS is then available as a scripting engine.

About

Bundles GraalJS jar files required for the JOSM Scripting Plugin

Resources

Stars

Watchers

Forks

Packages

No packages published