Skip to content

Commit 6282626

Browse files
committed
fix ClassNotFound exception when running on a stock JDK without GraalJS
1 parent cc0cfe4 commit 6282626

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/org/openstreetmap/josm/plugins/scripting/preferences/graalvm/GraalVMConfigurationPanel.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,10 @@ protected JPanel buildInfoPanel() {
6464
protected JPanel buildTabs() {
6565
JPanel pnl = new JPanel(new BorderLayout());
6666
JTabbedPane tpPreferencesTabs = new JTabbedPane();
67-
tpPreferencesTabs.add(tr("ES Module repositories"),
68-
pnlESModuleRepoConfiguration = new ESModuleRepoConfigurationPanel());
67+
if (GraalVMFacadeFactory.isGraalVMPresent()) {
68+
tpPreferencesTabs.add(tr("ES Module repositories"),
69+
pnlESModuleRepoConfiguration = new ESModuleRepoConfigurationPanel());
70+
}
6971
tpPreferencesTabs.add(tr("CommonJS module repositories"),
7072
pnlCommonJSRepoConfiguration = new CommonJSRepoConfigurationPanel());
7173
pnl.add(tpPreferencesTabs, BorderLayout.CENTER);

0 commit comments

Comments
 (0)