Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8253697

[macos]:Application created with jpackage fails:LSOpenURLsWithRole() failed with error -10810

XMLWordPrintable

    • x86_64
    • os_x

      ADDITIONAL SYSTEM INFORMATION :
      system:
      Darwin glorfindel.local 19.6.0 Darwin Kernel Version 19.6.0: Thu Jun 18 20:49:00 PDT 2020; root:xnu-6153.141.1~1/RELEASE_X86_64 x86_64
      java:
      openjdk 16-ea 2021-03-16
      OpenJDK Runtime Environment (build 16-ea+17-805)
      OpenJDK 64-Bit Server VM (build 16-ea+17-805, mixed mode, sharing)
      jpackage:
      16-ea


      A DESCRIPTION OF THE PROBLEM :
      I created a simple maven application with one only class (the hello world for swing from Oracle site). When I try to start the application created by jpackage the response is simply "LSOpenURLsWithRole() failed with error -10810"

      The same issue with JDK-15, I saw bug JDK-8248501 and relateds, I can see that this bug has been resolved at 2020-07-06, but It seem still be here. I apologize if this is not the right way to signal the issue.






      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      mvn -q package -DskipTests
      jpackage --name jtest --app-version 1.0.0 --icon icona/icona.icns --type dmg --input target/lavoro --dest target --module-path target/lavoro --main-class helloorld.Helloworld --main-jar jtest-1.0.0.jar
      open target/jtest-1.0.0.dmg
      cd /Volumes/jtest/
      open jtest.app

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      application launch
      ACTUAL -
      LSOpenURLsWithRole() failed with error -10810 for the file /Volumes/jtest/jtest.app.

      ---------- BEGIN SOURCE ----------
      ----- HelloWorld.java ------------------------------------------------------------
      package helloworld;

      /*
       * HelloWorldSwing.java requires no other files.
       */
      import javax.swing.*;

      public class HelloWorld {
          /**
           * Create the GUI and show it. For thread safety,
           * this method should be invoked from the
           * event-dispatching thread.
           */
          private static void createAndShowGUI() {
              //Create and set up the window.
              JFrame frame = new JFrame("HelloWorldSwing");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

              //Add the ubiquitous "Hello World" label.
              JLabel label = new JLabel("Hello World");
              frame.getContentPane().add(label);

              //Display the window.
              frame.pack();
              frame.setVisible(true);
          }

          public static void main(String[] args) {
              //Schedule a job for the event-dispatching thread:
              //creating and showing this application's GUI.
              javax.swing.SwingUtilities.invokeLater(new Runnable() {
                  public void run() {
                      createAndShowGUI();
                  }
              });
          }
      }
      -------------------pom.xml-------------------------------------------------------------
      <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
          <modelVersion>4.0.0</modelVersion>
          
          <groupId>it.aspix.</groupId>
          <artifactId>jtest</artifactId>
          <version>1.0.0</version>
          <name>jtest</name>
          
          <properties>
              <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
              <maven.compiler.release>14</maven.compiler.release>
              <progetto.jars>${project.build.directory}/jars</progetto.jars>
          </properties>
          
          <build>
              <plugins>
                  <!-- per controllare le verisoni di java in compilazione -->
                  <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-compiler-plugin</artifactId>
                      <version>3.8.1</version>
                      <configuration>
                          <release>${maven.compiler.release}</release>
                      </configuration>
                  </plugin>
                  <!-- gestione delle dipendenze, e in particolare per copiare i jar in una unica cartella -->
                  <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-dependency-plugin</artifactId>
                      <version>3.1.1</version>
                      <configuration>
                          <outputDirectory>${progetto.jars}</outputDirectory>
                          <overWriteReleases>false</overWriteReleases>
                          <overWriteSnapshots>false</overWriteSnapshots>
                          <overWriteIfNewer>true</overWriteIfNewer>
                      </configuration>
                      <executions>
                          <execution>
                              <id>copy-dependencies</id>
                              <phase>package</phase>
                              <goals>
                                  <goal>copy-dependencies</goal>
                              </goals>
                          </execution>
                      </executions>
                  </plugin>
                  <!-- impostare la cartella di destinazione del progetto -->
                  <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-jar-plugin</artifactId>
                      <version>2.3.1</version>
                      <configuration>
                          <outputDirectory>${progetto.jars}</outputDirectory>
                      </configuration>
                  </plugin>
              </plugins>

          </build>
      </project>
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      can't find.

      FREQUENCY : always


        1. pom.xml
          3 kB
        2. helloworld.zip
          0.8 kB
        3. jpackage_log.txt
          28 kB

            herrick Andy Herrick (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: