codenameone / CodenameOne

Cross-platform framework for building truly native mobile apps with Java or Kotlin. Write Once Run Anywhere support for iOS, Android, Desktop & Web.
https://www.codenameone.com/
Other
1.71k stars 408 forks source link

Sample Runner App bug #2830

Open jsfan3 opened 5 years ago

jsfan3 commented 5 years ago

I've read this article: https://www.codenameone.com/blog/sheets-samples.html

After tapping on "View Source" on the first item (JavascriptCapturePhotoExample) I get an java.lang.UnsupportedOperationException: The EDIT action is not supported on the current platform!. I have Oracle Java "1.8.0_212" on Linux Mint 19, with Netbeans 10.

This is the full log:

Buildfile: /home/francesco/CodenameOne/build.xml

get-cn1-binaries:

get-codenameone-skins:

install-deps:

core:

-pre-init:

-init-private:

-init-user:

-init-project:

-init-macrodef-property:

-do-init:

-post-init:

-init-check:

-init-ap-cmdline-properties:

-init-macrodef-javac-with-processors:

-init-macrodef-javac-without-processors:

-init-macrodef-javac:

-init-macrodef-test-impl:

-init-macrodef-junit-init:

-init-macrodef-junit-single:

-init-test-properties:

-init-macrodef-junit-batch:

-init-macrodef-junit:

-init-macrodef-junit-impl:

-init-macrodef-testng:

-init-macrodef-testng-impl:

-init-macrodef-test:

-init-macrodef-junit-debug:

-init-macrodef-junit-debug-batch:

-init-macrodef-junit-debug-impl:

-init-macrodef-test-debug-junit:

-init-macrodef-testng-debug:

-init-macrodef-testng-debug-impl:

-init-macrodef-test-debug-testng:

-init-macrodef-test-debug:

-init-debug-args:

-init-macrodef-nbjpda:

-init-macrodef-debug:

-init-macrodef-java:

-init-presetdef-jar:

-init-ap-cmdline-supported:

-init-ap-cmdline:

init:

-deps-jar-init:

deps-jar:

-warn-already-built-jar:
[propertyfile] Updating property file: /home/francesco/CodenameOne/CodenameOne/build/built-jar.properties

-check-call-dep:

-maybe-call-dep:

-pre-init:

-init-private:

-init-user:

-init-project:

-init-macrodef-property:

-do-init:

-post-init:

-init-check:

-init-ap-cmdline-properties:

-init-macrodef-javac-with-processors:
Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/3:javac

-init-macrodef-javac-without-processors:

-init-macrodef-javac:
Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/3:depend

-init-macrodef-test-impl:

-init-macrodef-junit-init:

-init-macrodef-junit-single:

-init-test-properties:

-init-macrodef-junit-batch:

-init-macrodef-junit:

-init-macrodef-junit-impl:

-init-macrodef-testng:

-init-macrodef-testng-impl:

-init-macrodef-test:

-init-macrodef-junit-debug:

-init-macrodef-junit-debug-batch:

-init-macrodef-junit-debug-impl:

-init-macrodef-test-debug-junit:

-init-macrodef-testng-debug:

-init-macrodef-testng-debug-impl:

-init-macrodef-test-debug-testng:

-init-macrodef-test-debug:

-init-debug-args:

-init-macrodef-nbjpda:
Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/1:nbjpdastart

-init-macrodef-debug:
Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/3:debug

-init-macrodef-java:
Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/1:java

-init-presetdef-jar:

-init-ap-cmdline-supported:

-init-ap-cmdline:

init:

-deps-jar-init:

deps-jar:

-warn-already-built-jar:
[propertyfile] Updating property file: /home/francesco/CodenameOne/CodenameOne/build/built-jar.properties

-check-automatic-build:

-clean-after-automatic-build:

-verify-automatic-build:

-pre-pre-compile:

-pre-compile:

-copy-persistence-xml:

-compile-depend:

-do-compile:

-post-compile:

compile:

-pre-jar:

-pre-pre-jar:

-do-jar-create-manifest:

-do-jar-copy-manifest:

-do-jar-set-mainclass:

-do-jar-set-profile:

-do-jar-set-splashscreen:

-do-jar-jar:

-init-macrodef-copylibs:

-do-jar-copylibs:

-do-jar-delete-manifest:

-do-jar-without-libraries:

-do-jar-with-libraries:

-post-jar:

-do-jar:

jar:

-check-automatic-build:

-clean-after-automatic-build:

-verify-automatic-build:

-pre-pre-compile:

initEnv:
     [echo] Init env executing with cn1env = ${cn1env} for ../../CodenameOne/GUIBuilder/src

stamp:

-pre-compile:

-copy-persistence-xml:

-compile-depend:

-do-compile:
    [javac] Compiling 6 source files to /home/francesco/CodenameOne/CodenameOne/build/classes
    [javac] Note: /home/francesco/CodenameOne/CodenameOne/src/com/codename1/processing/HashtableContent.java uses or overrides a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: /home/francesco/CodenameOne/CodenameOne/src/com/codename1/processing/HashtableContent.java uses unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.

-post-compile:

compile:

-pre-jar:

-pre-pre-jar:

-do-jar-create-manifest:

-do-jar-copy-manifest:

-do-jar-set-mainclass:

-do-jar-set-profile:

-do-jar-set-splashscreen:

-do-jar-jar:
[j2seproject1:jar] Building jar: /home/francesco/CodenameOne/CodenameOne/dist/CodenameOne.jar

-init-macrodef-copylibs:

-do-jar-copylibs:

-do-jar-delete-manifest:

-do-jar-without-libraries:

-do-jar-with-libraries:

-post-jar:

-do-jar:

jar:

javase:

-pre-init:

-init-private:

-init-user:

-init-project:

-init-macrodef-property:

-do-init:

-post-init:

-init-check:

-init-ap-cmdline-properties:

-init-macrodef-javac-with-processors:

-init-macrodef-javac-without-processors:

-init-macrodef-javac:

-init-macrodef-test-impl:

-init-macrodef-junit-init:

-init-macrodef-junit-single:

-init-test-properties:

-init-macrodef-junit-batch:

-init-macrodef-junit:

-init-macrodef-junit-impl:

-init-macrodef-testng:

-init-macrodef-testng-impl:

-init-macrodef-test:

-init-macrodef-junit-debug:

-init-macrodef-junit-debug-batch:

-init-macrodef-junit-debug-impl:

-init-macrodef-test-debug-junit:

-init-macrodef-testng-debug:

-init-macrodef-testng-debug-impl:

-init-macrodef-test-debug-testng:

-init-macrodef-test-debug:

-init-debug-args:

-init-macrodef-nbjpda:

-init-macrodef-debug:

-init-macrodef-java:

-init-presetdef-jar:

-init-ap-cmdline-supported:

-init-ap-cmdline:

init:

-deps-jar-init:

deps-jar:

-warn-already-built-jar:
[propertyfile] Updating property file: /home/francesco/CodenameOne/Ports/JavaSE/build/built-jar.properties

-check-call-dep:

-maybe-call-dep:

-pre-init:

-init-private:

-init-user:

-init-project:

-init-macrodef-property:

-do-init:

-post-init:

-init-check:

-init-ap-cmdline-properties:

-init-macrodef-javac-with-processors:
Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/3:javac

-init-macrodef-javac-without-processors:

-init-macrodef-javac:
Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/3:depend

-init-macrodef-test-impl:

-init-macrodef-junit-init:

-init-macrodef-junit-single:

-init-test-properties:

-init-macrodef-junit-batch:

-init-macrodef-junit:

-init-macrodef-junit-impl:

-init-macrodef-testng:

-init-macrodef-testng-impl:

-init-macrodef-test:

-init-macrodef-junit-debug:

-init-macrodef-junit-debug-batch:

-init-macrodef-junit-debug-impl:

-init-macrodef-test-debug-junit:

-init-macrodef-testng-debug:

-init-macrodef-testng-debug-impl:

-init-macrodef-test-debug-testng:

-init-macrodef-test-debug:

-init-debug-args:

-init-macrodef-nbjpda:
Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/1:nbjpdastart

-init-macrodef-debug:
Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/3:debug

-init-macrodef-java:
Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/1:java

-init-presetdef-jar:

-init-ap-cmdline-supported:

-init-ap-cmdline:

init:

-deps-jar-init:

deps-jar:

-warn-already-built-jar:
[propertyfile] Updating property file: /home/francesco/CodenameOne/Ports/JavaSE/build/built-jar.properties

-check-call-dep:

-maybe-call-dep:

-pre-init:

-init-private:

-init-user:

-init-project:

-init-macrodef-property:

-do-init:

-post-init:

-init-check:

-init-ap-cmdline-properties:

-init-macrodef-javac-with-processors:
Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/3:javac

-init-macrodef-javac-without-processors:

-init-macrodef-javac:
Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/3:depend

-init-macrodef-test-impl:

-init-macrodef-junit-init:

-init-macrodef-junit-single:

-init-test-properties:

-init-macrodef-junit-batch:

-init-macrodef-junit:

-init-macrodef-junit-impl:

-init-macrodef-testng:

-init-macrodef-testng-impl:

-init-macrodef-test:

-init-macrodef-junit-debug:

-init-macrodef-junit-debug-batch:

-init-macrodef-junit-debug-impl:

-init-macrodef-test-debug-junit:

-init-macrodef-testng-debug:

-init-macrodef-testng-debug-impl:

-init-macrodef-test-debug-testng:

-init-macrodef-test-debug:

-init-debug-args:

-init-macrodef-nbjpda:
Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/1:nbjpdastart

-init-macrodef-debug:
Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/3:debug

-init-macrodef-java:
Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/1:java

-init-presetdef-jar:

-init-ap-cmdline-supported:

-init-ap-cmdline:

init:

-deps-jar-init:

deps-jar:

-warn-already-built-jar:
[propertyfile] Updating property file: /home/francesco/CodenameOne/Ports/JavaSE/build/built-jar.properties

-check-automatic-build:

-clean-after-automatic-build:

-verify-automatic-build:

-pre-pre-compile:

-pre-compile:

-copy-persistence-xml:

-compile-depend:

-do-compile:

-post-compile:

compile:

-pre-jar:

-pre-pre-jar:

-do-jar-create-manifest:

-do-jar-copy-manifest:

-do-jar-set-mainclass:

-do-jar-set-profile:

-do-jar-set-splashscreen:

-do-jar-jar:

-init-macrodef-copylibs:

-do-jar-copylibs:

-do-jar-delete-manifest:

-do-jar-without-libraries:

-do-jar-with-libraries:

-post-jar:

-do-jar:

jar:

-check-automatic-build:

-clean-after-automatic-build:

-verify-automatic-build:

-pre-pre-compile:

initEnv:
     [echo] Init env executing with cn1env = ${cn1env} for ../../CodenameOne/GUIBuilder/src

stamp:

-pre-compile:

-copy-persistence-xml:

-compile-depend:

-do-compile:
    [javac] Compiling 6 source files to /home/francesco/CodenameOne/CodenameOne/build/classes
    [javac] Note: /home/francesco/CodenameOne/CodenameOne/src/com/codename1/processing/HashtableContent.java uses or overrides a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: /home/francesco/CodenameOne/CodenameOne/src/com/codename1/processing/HashtableContent.java uses unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.

-post-compile:

compile:

-pre-jar:

-pre-pre-jar:

-do-jar-create-manifest:

-do-jar-copy-manifest:

-do-jar-set-mainclass:

-do-jar-set-profile:

-do-jar-set-splashscreen:

-do-jar-jar:

-init-macrodef-copylibs:

-do-jar-copylibs:

-do-jar-delete-manifest:

-do-jar-without-libraries:

-do-jar-with-libraries:

-post-jar:

-do-jar:

jar:

-check-automatic-build:

-clean-after-automatic-build:

-verify-automatic-build:

-pre-pre-compile:

-pre-compile:

-copy-persistence-xml:

-compile-depend:

-do-compile:

build-skins:

init-skins:

-post-compile:
  [copydir] DEPRECATED - The copydir task is deprecated.  Use copy instead.
  [copydir] Copying 1 file to /home/francesco/CodenameOne/Ports/JavaSE/build/classes
    [unjar] Expanding: /home/francesco/cn1-binaries/javase/sqlite-jdbc-3.7.15-M1.jar into /home/francesco/CodenameOne/Ports/JavaSE/build/classes
    [unjar] Expanding: /home/francesco/cn1-binaries/javase/Filters.jar into /home/francesco/CodenameOne/Ports/JavaSE/build/classes

compile:

-pre-jar:

-pre-pre-jar:

-do-jar-create-manifest:

-do-jar-copy-manifest:

-do-jar-set-mainclass:

-do-jar-set-profile:

-do-jar-set-splashscreen:

-do-jar-jar:
[j2seproject1:jar] Building jar: /home/francesco/CodenameOne/Ports/JavaSE/dist/JavaSE.jar
     [echo] To run this application from the command line without Ant, try:
     [echo] /usr/lib/jvm/oracle-java8-jdk-amd64/jre/bin/java -cp /home/francesco/CodenameOne/CodenameOne/dist/CodenameOne.jar:/home/francesco/cn1-binaries/javase/sqlite-jdbc-3.7.15-M1.jar:/home/francesco/cn1-binaries/javase/Filters.jar:/home/francesco/cn1-binaries/javafx/lib/javafx.base.jar:/home/francesco/cn1-binaries/javafx/lib/javafx.controls.jar:/home/francesco/cn1-binaries/javafx/lib/javafx.swing.jar:/home/francesco/cn1-binaries/javafx/lib/javafx.web.jar:/home/francesco/cn1-binaries/javafx/lib/javafx.media.jar:/home/francesco/cn1-binaries/javafx/lib/javafx.graphics.jar:/home/francesco/cn1-binaries/javafx/lib/javafx.fxml.jar:/home/francesco/cn1-binaries/javafx/lib:/home/francesco/CodenameOne/Ports/JavaSE/dist/JavaSE.jar com.codename1.impl.javase.Simulator

-init-macrodef-copylibs:

-do-jar-copylibs:

-do-jar-delete-manifest:

-do-jar-without-libraries:

-do-jar-with-libraries:

-post-jar:

-do-jar:

jar:

samples:

-pre-init:

-init-private:

-init-user:

-init-project:

-init-macrodef-property:

-do-init:

-post-init:

-init-check:

-init-ap-cmdline-properties:

-init-macrodef-javac-with-processors:

-init-macrodef-javac-without-processors:

-init-macrodef-javac:

-init-macrodef-test-impl:

-init-macrodef-junit-init:

-init-macrodef-junit-single:

-init-test-properties:

-init-macrodef-junit-batch:

-init-macrodef-junit:

-init-macrodef-junit-impl:

-init-macrodef-testng:

-init-macrodef-testng-impl:

-init-macrodef-test:

-init-macrodef-junit-debug:

-init-macrodef-junit-debug-batch:

-init-macrodef-junit-debug-impl:

-init-macrodef-test-debug-junit:

-init-macrodef-testng-debug:

-init-macrodef-testng-debug-impl:

-init-macrodef-test-debug-testng:

-init-macrodef-test-debug:

-init-debug-args:

-init-macrodef-nbjpda:

-init-macrodef-debug:

-init-macrodef-java:

-init-presetdef-jar:

-init-ap-cmdline-supported:

-init-ap-cmdline:

init:

-deps-jar-init:
   [delete] Deleting: /home/francesco/CodenameOne/Samples/build/built-jar.properties

deps-jar:

-warn-already-built-jar:
[propertyfile] Updating property file: /home/francesco/CodenameOne/Samples/build/built-jar.properties

-check-automatic-build:

-clean-after-automatic-build:

-verify-automatic-build:

-pre-pre-compile:

-pre-compile:

-copy-persistence-xml:

-compile-depend:

-do-compile:

-post-compile:

compile:

run:
     [java] {java.runtime.name=Java(TM) SE Runtime Environment, sun.boot.library.path=/usr/lib/jvm/oracle-java8-jdk-amd64/jre/lib/amd64, java.vm.version=25.212-b10, java.vm.vendor=Oracle Corporation, java.vendor.url=http://java.oracle.com/, path.separator=:, java.vm.name=Java HotSpot(TM) 64-Bit Server VM, file.encoding.pkg=sun.io, user.country=IT, sun.java.launcher=SUN_STANDARD, sun.os.patch.level=unknown, java.vm.specification.name=Java Virtual Machine Specification, user.dir=/home/francesco/CodenameOne/Samples, java.runtime.version=1.8.0_212-b10, java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment, java.endorsed.dirs=/usr/lib/jvm/oracle-java8-jdk-amd64/jre/lib/endorsed, os.arch=amd64, java.io.tmpdir=/tmp, line.separator=
     [java] , java.vm.specification.vendor=Oracle Corporation, os.name=Linux, sun.jnu.encoding=UTF-8, java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib, java.specification.name=Java Platform API Specification, java.class.version=52.0, sun.management.compiler=HotSpot 64-Bit Tiered Compilers, os.version=4.15.0-51-generic, user.home=/home/francesco, user.timezone=, java.awt.printerjob=sun.print.PSPrinterJob, file.encoding=UTF-8, java.specification.version=1.8, java.class.path=/home/francesco/CodenameOne/Samples/build/classes, user.name=francesco, java.vm.specification.version=1.8, sun.java.command=com.codename1.samples.SamplesRunner, java.home=/usr/lib/jvm/oracle-java8-jdk-amd64/jre, sun.arch.data.model=64, user.language=it, java.specification.vendor=Oracle Corporation, awt.toolkit=sun.awt.X11.XToolkit, java.vm.info=mixed mode, java.version=1.8.0_212, java.ext.dirs=/usr/lib/jvm/oracle-java8-jdk-amd64/jre/lib/ext:/usr/java/packages/lib/ext, sun.boot.class.path=/usr/lib/jvm/oracle-java8-jdk-amd64/jre/lib/resources.jar:/usr/lib/jvm/oracle-java8-jdk-amd64/jre/lib/rt.jar:/usr/lib/jvm/oracle-java8-jdk-amd64/jre/lib/sunrsasign.jar:/usr/lib/jvm/oracle-java8-jdk-amd64/jre/lib/jsse.jar:/usr/lib/jvm/oracle-java8-jdk-amd64/jre/lib/jce.jar:/usr/lib/jvm/oracle-java8-jdk-amd64/jre/lib/charsets.jar:/usr/lib/jvm/oracle-java8-jdk-amd64/jre/lib/jfr.jar:/usr/lib/jvm/oracle-java8-jdk-amd64/jre/classes, java.vendor=Oracle Corporation, file.separator=/, java.vendor.url.bug=http://bugreport.sun.com/bugreport/, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, sun.cpu.isalist=}
     [java] java.lang.UnsupportedOperationException: The EDIT action is not supported on the current platform!
     [java]     at java.awt.Desktop.checkActionSupport(Desktop.java:221)
     [java]     at java.awt.Desktop.edit(Desktop.java:298)
     [java]     at com.codename1.samples.Sample.openJavaSourceFile(Sample.java:564)
     [java]     at com.codename1.samples.SamplesRunner.viewSource(SamplesRunner.java:155)
     [java]     at com.codename1.samples.SamplesPanel.lambda$createCell$3(SamplesPanel.java:178)
     [java]     at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
     [java]     at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
     [java]     at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
     [java]     at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
     [java]     at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
     [java]     at java.awt.Component.processMouseEvent(Component.java:6539)
     [java]     at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
     [java]     at java.awt.Component.processEvent(Component.java:6304)
     [java]     at java.awt.Container.processEvent(Container.java:2239)
     [java]     at java.awt.Component.dispatchEventImpl(Component.java:4889)
     [java]     at java.awt.Container.dispatchEventImpl(Container.java:2297)
     [java]     at java.awt.Component.dispatchEvent(Component.java:4711)
     [java]     at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
     [java]     at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
     [java]     at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
     [java]     at java.awt.Container.dispatchEventImpl(Container.java:2283)
     [java]     at java.awt.Window.dispatchEventImpl(Window.java:2746)
     [java]     at java.awt.Component.dispatchEvent(Component.java:4711)
     [java]     at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
     [java]     at java.awt.EventQueue.access$500(EventQueue.java:97)
     [java]     at java.awt.EventQueue$3.run(EventQueue.java:709)
     [java]     at java.awt.EventQueue$3.run(EventQueue.java:703)
     [java]     at java.security.AccessController.doPrivileged(Native Method)
     [java]     at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
     [java]     at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
     [java]     at java.awt.EventQueue$4.run(EventQueue.java:733)
     [java]     at java.awt.EventQueue$4.run(EventQueue.java:731)
     [java]     at java.security.AccessController.doPrivileged(Native Method)
     [java]     at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
     [java]     at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
     [java]     at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
     [java]     at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
     [java]     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
     [java]     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
     [java]     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
     [java]     at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
jsfan3 commented 5 years ago

The same exception is thrown by "File", "Edit Global Build Hint".

In the blog, you wrote "JAVA_HOME must point at a valid JDK for Codename One and ant must by in the system PATH variable. Otherwise this won’t work." This should be ok for me, in fact:

$ echo $JAVA_HOME
/usr/lib/jvm/java-8-oracle
$ which ant
/usr/bin/ant
codenameone commented 5 years ago

Unfortunately this is a limitation of JavaSE on Linux. The app uses the Desktop API in Java to launch file associations but this isn't implemented in Linux platforms. I doubt this is fixable but I'm assigning it to @shannah just to make sure.

shannah commented 5 years ago

I've had to work around this before using Runtime.exec(). I'll try to dig up the code that I used and apply it here.

shannah commented 5 years ago

Note to self.

xdg-open

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package ca.weblite.lamprunner;

import java.awt.Desktop;
import java.net.URI;

/**
 *
 * @author shannah
 */
public class DesktopUtil {
    public static void browse(String url) {
        try {
            Desktop.getDesktop().browse(new URI(url));
        } catch (Exception ex) {
            try {
                Runtime.getRuntime().exec(new String[]{"xdg-open", url});
            } catch (Exception ex2) {
                System.err.println("Failed to open "+url);
                ex2.printStackTrace();
            }
        }
    }
}
jsfan3 commented 5 years ago

I guess that the use of xdg-open is your workaround on Linux... :)