Coder Social home page Coder Social logo

shannah / jdeploy Goto Github PK

View Code? Open in Web Editor NEW
344.0 7.0 19.0 333.15 MB

Developer friendly desktop deployment tool

Home Page: https://www.jdeploy.com

License: Apache License 2.0

JavaScript 1.35% Java 96.26% Shell 1.24% HTML 1.06% PHP 0.09%
java javafx javafx-desktop-apps desktop-app deployment

jdeploy's Introduction

jDeploy

Developer friendly desktop deployment tool. See the jDeploy Website for usage instructions.

GitHub Action Instructions

The jdeploy github action allows you to generate native desktop installers for your Java project in a Github workflow. This action can be run for both commits and releases.

If used on a commit to a branch, it will publish the the app installers to a release named after the branch. E.g. For the "master" branch, it would post installers to a tag named "master". If used on a "tag", it will simply add the installers as artifacts of the release. In both cases it will add some download links to the release notes.

Example Usage

IMPORTANT: For this action to work, you must first configure your project with jDeploy, as described in the jDeploy Developer Guide.

Add the following to your workflow in a step after the app has been built.

- name: Build App Installer Bundles
  uses: actions/jdeploy@master
  with:
    github_token: ${{ github.token }}

If this is run on "commit", then it will create or update a release with the same name as the branch. If this is run on a tag or release, it will add the installers as artifacts to the release. In both cases, it appends notes to the release with download links.

See example release

Example Workflow

# This workflow will build a Java project with Maven and bundle them as native app installers with jDeploy
# See https://www.jdeploy.com for more information.

name: jDeploy CI with Maven

on:
  push:
    branches: ['*']
    tags: ['*']

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3
      - name: Set up JDK
        uses: actions/setup-java@v3
        with:
          java-version: '17'
          distribution: 'temurin'
          cache: maven
      - name: Build with Maven
        run: mvn -B package --file pom.xml
      - name: Build App Installer Bundles
        uses: shannah/jdeploy@master
        with:
          github_token: ${{ github.token }}

Example Project

The jDeploy JavaFX Starter Project is a template repository for a JavaFX application. It comes pre-configured with this workflow to generate both snapshot builds for each branch, and release builds.

Learn More

See the jDeploy Developer Guide to learn more.

Supported Parameters

Parameter Description Default
github_token GitHub Action token, e.g. "${{ secrets.GITHUB_TOKEN }}". null
target_repository The repository where releases should be published to, if different than the current repo. ${{ github.repository }}
deploy_target The deployment target. "github" or "npm" github
npm_token The NPM_TOKEN for publishing to npm. Only required if deploy_target==npm null
jdeploy_version The jdeploy version to use for building the installers. 4.0.0-alpha.38

License

Apache2

Contact

Steve Hannah

jdeploy's People

Contributors

josh- avatar muguliebe avatar neworld avatar paul-griffith avatar shannah avatar tomasbjerre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

jdeploy's Issues

Error when running publish

jdeploy install works like a charm, but when I run jdeploy publish I get the following error: npm ERR! f.replace is not a function

Error Running Program: TypeError: Cannot read property '1' of null

I get the following stacktrace when I tried to run my installed java program.

home/vagrant/git/osgi-deployer/jdeploy-bundle/jdeploy.js:16
    var parts = match[1].split('.');
                     ^

TypeError: Cannot read property '1' of null
    at getJavaVersion (/home/vagrant/git/osgi-deployer/jdeploy-bundle/jdeploy.js:16:22)
    at Object.<anonymous> (/home/vagrant/git/osgi-deployer/jdeploy-bundle/jdeploy.js:98:19)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)
    at startup (node.js:148:18)
    at node.js:405:3

This is the output of my java -version command:

vagrant@ubuntu:~/git/osgi-deployer$ java -version
openjdk version "1.8.0_111"
OpenJDK Runtime Environment (build 1.8.0_111-8u111-b14-2ubuntu0.16.04.2-b14)
OpenJDK 64-Bit Server VM (build 25.111-b14, mixed mode)

Sign Windows Installer

I tried to install the demo and Windows Security stopped the installation by detecting the installer as Trojan:Script/Wacatac.B!ml

Colors support for CLI output

Hi,

we are using the Jdeploy library for deploying and running the CLI tool written on Java.

Jdeploy is a great tool and everything is fine except for one little issue with colors.

If I run it as a regular Java application, colors are displayed correctly:

Screenshot from 2020-12-11 17-43-48

But if I run it as a command after installation via Jdeploy, colors are disappeared:

Screenshot from 2020-12-11 17-42-38


Tried to edit the jdeploy.js file and add --colors or --ansi to the command (cmd variable), but it doesn't work:

Exception in thread "main" java.lang.RuntimeException: org.apache.commons.cli.UnrecognizedOptionException: Unrecognized option: --colors
	at ca.weblite.jdeploy.JDeploy.main(JDeploy.java:1174)
Caused by: org.apache.commons.cli.UnrecognizedOptionException: Unrecognized option: --colors
	at org.apache.commons.cli.DefaultParser.handleUnknownToken(DefaultParser.java:347)
	at org.apache.commons.cli.DefaultParser.handleLongOptionWithoutEqual(DefaultParser.java:394)
	at org.apache.commons.cli.DefaultParser.handleLongOption(DefaultParser.java:371)
	at org.apache.commons.cli.DefaultParser.handleToken(DefaultParser.java:239)
	at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:120)
	at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:76)
	at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:60)
	at ca.weblite.jdeploy.JDeploy.main(JDeploy.java:1145)
Exception in thread "main" java.lang.RuntimeException: org.apache.commons.cli.UnrecognizedOptionException: Unrecognized option: --ansi
	at ca.weblite.jdeploy.JDeploy.main(JDeploy.java:1174)
Caused by: org.apache.commons.cli.UnrecognizedOptionException: Unrecognized option: --ansi
	at org.apache.commons.cli.DefaultParser.handleUnknownToken(DefaultParser.java:347)
	at org.apache.commons.cli.DefaultParser.handleLongOptionWithoutEqual(DefaultParser.java:394)
	at org.apache.commons.cli.DefaultParser.handleLongOption(DefaultParser.java:371)
	at org.apache.commons.cli.DefaultParser.handleToken(DefaultParser.java:239)
	at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:120)
	at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:76)
	at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:60)
	at ca.weblite.jdeploy.JDeploy.main(JDeploy.java:1145)

Is there any way to fix this issue?

Runtime.getRuntime().exec doesn't work

When running JAR directly, Runtime.getRuntime().exec("git") works, but running via the installed command, it doesn't work.

Exception in thread "main" java.io.IOException: Cannot run program "git": error=2, No such file or directory
        at java.base/java.lang.ProcessBuilder.start(Unknown Source)
        at java.base/java.lang.ProcessBuilder.start(Unknown Source)
        at java.base/java.lang.Runtime.exec(Unknown Source)
        at java.base/java.lang.Runtime.exec(Unknown Source)

Any idea?

java.lang.ClassNotFoundException when running my app

have built a simple REST server (2 endpoints) in Java that I need to deploy on node. I found this project last night, so I am just diving into using it. I have tried a couple of times and gotten the same result. In my latest attempt I used 'mvn clean package' to build a new copy of my project. I moved the resulting war file that runs on Apache Tomcat as is to a new, otherwise empty directory.

Then I ran 'jdeploy init' with the, by now, expected results:

$ jdeploy init
Creating your package.json file with following content:

{
"bin": {"pub": "jdeploy-bundle/jdeploy.js"},
"author": "",
"description": "",
"main": "index.js",
"preferGlobal": true,
"repository": "",
"version": "1.0.0",
"jdeploy": {"war": "mms.war"},
"dependencies": {"shelljs": "^0.7.5"},
"license": "ISC",
"name": "pub",
"files": ["jdeploy-bundle"],
"scripts": {"test": "echo "Error: no test specified" && exit 1"}
}

Proceed? (y/N)y
Writing package.json...
Complete!

I made no changes to the package.json file and then ran 'jdeploy install':

$ jdeploy install
Executing copy rule CopyRule{dir=., includes=[mms.war], excludes=null}
.\jdeploy-bundle does not match any patterns.
.\package.json does not match any patterns.
.\jdeploy-bundle does not match any patterns.
.\package.json does not match any patterns.
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

added 16 packages from 8 contributors in 0.932s
C:\Users\tullych\AppData\Roaming\npm\pub -> C:\Users\tullych\AppData\Roaming\npm\node_modules\pub\jdeploy-bundle\jdeploy.js
C:\Users\tullych\AppData\Roaming\npm\node_modules\pub -> C:\Users\tullych\Projects\filechanger\maintenance-mode\pub

Since everything appears to have gone ok so far I tried to run my app:

$ pub
Error: Could not find or load main class ca.weblite.jdeploy.WarRunner
Caused by: java.lang.ClassNotFoundException: ca.weblite.jdeploy.WarRunner

What am I missing?

SNAPSHOT Jar files are not deployed when using maven-jar-plugin

By default the maven-jar-plugin replaces all JAR file names with the word SNAPSHOT in them with a time stamp. A jar file called myjar-SNAPSHOT.jar will be renamed to myjar-20220409053011.jar (or something like that). This means that the class-path entry inside the generated manifest.mf file will list JAR files that are actually not present in the libs folder, hence they will not be copied to the jdeploy-bundle/libs directory as jdeploy uses the manifest information for the copying.

Local jdeploy crashes

Hey, I just had this happen when installing jdeploy as a local package and then running ./node_modules/jdeploy/bin/jdeploy

 ./node_modules/jdeploy/bin/jdeploy.js
Launching shellmarks gui.  Use jdeploy -help for help
Exception in thread "AWT-EventQueue-0" org.json.JSONException: JSONObject["name"] not found.
        at org.json.JSONObject.get(JSONObject.java:580)
        at org.json.JSONObject.getString(JSONObject.java:867)
        at ca.weblite.jdeploy.gui.JDeployProjectEditor.show(JDeployProjectEditor.java:298)
        at ca.weblite.jdeploy.JDeploy.lambda$main$0(JDeploy.java:1867)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:771)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:741)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

SwingSet2 and JavaFX Ensemble samples are crashing on Slackware 15

Hi,

I have a fresh, Slackware 15 (gtk 3.24.31 and 4.4.1), installation and both demos are crashing with core dump. I've downloaded .bin files. Here is the output for SwingSet2:

$ ./SwingSet2\ Installer-1.0.5_255W.bin 
2022/02/15 15:45:53 In Launch().  The app is Not loaded yet
2022/02/15 15:45:53 We got through this
Size is -1
Content length -1
2022/02/15 15:45:53 We got through this
Size is -1
Content length -1
2022/02/15 15:45:53 About to install app

Size is -1
Content length -1

(SwingSet2 Installer-1.0.5_255W.bin:27106): GLib-GObject-CRITICAL **: 15:45:53.729: g_value_set_boxed: assertion 'G_VALUE_HOLDS_BOXED (value)' failed

(SwingSet2 Installer-1.0.5_255W.bin:27106): GLib-GObject-CRITICAL **: 15:45:53.729: g_value_set_boxed: assertion 'G_VALUE_HOLDS_BOXED (value)' failed

(SwingSet2 Installer-1.0.5_255W.bin:27106): GLib-GObject-CRITICAL **: 15:45:53.729: g_value_set_boxed: assertion 'G_VALUE_HOLDS_BOXED (value)' failed

(SwingSet2 Installer-1.0.5_255W.bin:27106): dbind-WARNING **: 15:45:53.733: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
free(): invalid pointer
2022/02/15 15:45:53 Failed to launch app. %!(EXTRA *errors.errorString=Failed to update app.%!(EXTRA *errors.errorString=Failed to run update command. %!(EXTRA *exec.ExitError=signal: aborted (core dumped))))

This is backtrace from a core dump, run with gdb ./SwingSet2\ Installer-1.0.5_255W.bin ./core

#0  0x00007fbf4fd5e868 in raise () at /lib64/libc.so.6
#1  0x00007fbf4fd45546 in abort () at /lib64/libc.so.6
#2  0x00007fbf4fda4278 in  () at /lib64/libc.so.6
#3  0x00007fbf4fdac69a in  () at /lib64/libc.so.6
#4  0x00007fbf4fdae09c in _int_free () at /lib64/libc.so.6
#5  0x00007fbf4fdb1d14 in free () at /lib64/libc.so.6
#6  0x0000557df1b89cd7 in _jdeploy_gtk_progress_update ()
#7  0x00007fbf500ebc69 in  () at /usr/lib64/libgdk-3.so.0
#8  0x00007fbf4ff7f504 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#9  0x00007fbf4ff7f868 in  () at /usr/lib64/libglib-2.0.so.0
#10 0x00007fbf4ff7f90f in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#11 0x00007fbf503a65c1 in gtk_main_iteration_do () at /usr/lib64/libgtk-3.so.0
#12 0x0000557df1b8a02d in StartProgress ()
#13 0x0000557df1b8a268 in _cgo_54909660d3e3_Cfunc_StartProgress ()
#14 0x0000557df1949788 in runtime.asmcgocall.abi0 ()
#15 0x00007ffc23f51508 in  ()
#16 0x0000557df19252d8 in runtime.newproc.func1 ()
#17 0x000000c000344060 in  ()
#18 0x0a007fbf4c52a8e8 in  ()
#19 0x00007ffc23f51508 in  ()
#20 0x00000000000004c8 in  ()
#21 0x000000c000000680 in  ()
#22 0x000000c0001f3bb0 in  ()
#23 0x0000557df1947886 in runtime.systemstack.abi0 ()
#24 0x00007ffc23f51518 in  ()
#25 0x0000000000000000 in  ()

OSX DMG File Thoughts

Hi, jDeploy looks like a really cool project!

This isn't a feature request exactly since I don't have a project that needs jDeploy right now, but I thought I'd share what I learned in a past project where I wanted to build Mac apps under Linux - specifically around how to package them as DMG files since I think that isn't currently part of jDeploy...

I found that pretty much all the tools for building DMG files were platform specific and would only run under OSX. The exception to this was libdmg-hfsplus which is/was what Mozilla used to build its Firefox DMG.

In case it's helpful, a lot of what I learned (mostly around getting compression and custom DMG icons to work) is captured in the my fork of libdmg-hfsplus.

Hope that's helpful!

Cheers,
Symbioquine

Application starts and exists quickly on macOS Monterey

I have recently deployed https://www.jdeploy.com/~osgifx application using jdeploy very easily.

The application requires to create a folder when started and that's why I have changed the permission of the folders inside /Applications/jDeploy\ Apps/OSGi.fx.app. If I run, /Applications/jDeploy\ Apps/OSGi.fx.app/Contents/MacOS/Client4JLauncher from command line, the application starts normally without any problem but if I double click on the OSGi.fx.app, it appears on the dock indicating that it starts and exists in 2 seconds.

Any help would be really appreciated.

Obnoxious output from jdeploy.js

I have successfully creating my NPM module w/ jdeploy, but now whenever I execute my application from the CLI, the following mess of warnings gets output to the console:

(node:12456) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:12456) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency
(node:12456) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency
(node:12456) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency
(node:12456) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency
(node:12456) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency
(node:12456) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency
(node:12456) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency
(node:12456) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency
(node:12456) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency
(node:12456) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency
(node:12456) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency
(node:12456) Warning: Accessing non-existent property 'find' of module exports inside circular dependency
(node:12456) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency
(node:12456) Warning: Accessing non-existent property 'head' of module exports inside circular dependency
(node:12456) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency
(node:12456) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency
(node:12456) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency
(node:12456) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency
(node:12456) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency
(node:12456) Warning: Accessing non-existent property 'set' of module exports inside circular dependency
(node:12456) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency
(node:12456) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency
(node:12456) Warning: Accessing non-existent property 'test' of module exports inside circular dependency
(node:12456) Warning: Accessing non-existent property 'to' of module exports inside circular dependency
(node:12456) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency
(node:12456) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency
(node:12456) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency
(node:12456) Warning: Accessing non-existent property 'which' of module exports inside circular dependency

I suspect this must be a side effect of jdeploy.js but haven't been successful in pinpointing exactly where the issue lies.
Just to provide some environment info, I'm running node v14.15.0 on Windows 10.

NOT AN ISSUE

Thank you so much for maintaining this tool 😃

Code-signing support (Not Apple Code-signing)

In order to address security concerns of some users (e.g. #57 ), we should add the option to produce signed apps. I'm not talking about Apple Code-signing - I'm talking about a cross-platform approach that would allow the user to verify the origin of all code running in an app.

How it works

  1. The developer has the option to enable "code-signing" in the package.json file. (Would need to think of word that doesn't confuse it with Apple's code-signing).
  2. With code-signing enabled, the "package" action would use the developer's private key to sign all bundles produced: the installer, the app bundles, and the payload that is published on npm. If they don't have a private key, it will auto-generate a key-pair and store them in a standard location on the developer's machine.
  3. With code-signing enabled, the "package" action would download and embed the JVM directly in the installer and app bundles, and sign them.
  4. With code-signing enabled, the "publish" action would publish the sha1, sha256, md5 hashes for the installer bundles to trusted feed locations, such Twitter, or GitHub.
  5. When the user downloads the installer from either the developer's website, GitHub, or jDeploy.com, they can manually verify it against the hash, and the developer's public key, which could be published in a trusted location, or simply provided to the user out of band.
  6. When the launcher downloads updates from the cloud (e.g. npm), it can compare the signature of the payload against the signature of the app launcher to ensure that they match.
  7. No JVM downloads occur in this scenario because the JVM is embedded into the app bundle.

Draw-backs of this approach

  1. Bundles will be much larger due to embedded JVM.
  2. Space complexity for hosting is exponentially larger for jDeploy.com. Currently all apps use the same installer, so jDeploy.com doesn't actually need to store installer bundles for each app. It just uses the same installer and adds appropriate metadata. With this approach, each app bundle needs to be pre-built and stored somewhere. It might make sense to integrate this with github actions and bind it to the github release process so that the installer bundles are automatically uploaded as artifacts of GitHub releases.

CLI version of the app doesn't start the VM with configured Java options

Recently #56 has been fixed which introduced the use of JPMS-related Java options while starting the VM. This works perfectly but the CLI version of the app which I downloaded using npm install -g osgifx cannot still use the same configured Java options while starting the app using osgifx command.

While starting the application from command line, I encountered the following:

java.lang.IllegalAccessError: class org.eclipse.fx.ui.workbench.fx.DefaultJFXApp (in unnamed module @0x2c84b3d3) cannot access class com.sun.glass.ui.Application (in module javafx.graphics) because module javafx.graphics does not export com.sun.glass.ui to unnamed module @0x2c84b3d3
	at org.eclipse.fx.ui.workbench.fx.DefaultJFXApp.setProductApplicationName(DefaultJFXApp.java:82)
	at org.eclipse.fx.ui.workbench.fx.DefaultJFXApp.<init>(DefaultJFXApp.java:54)
	at org.eclipse.fx.ui.workbench.fx.DefaultJFXApp.<init>(DefaultJFXApp.java:39)
	at com.osgifx.console.application.ConsoleFxStage.<init>(ConsoleFxStage.java:42)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)
	at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
	at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$8(Unknown Source)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(Unknown Source)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source)
	at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)

This clearly indicates that the JPMS-related Java arguments are still not set while starting the VM. If the configured VM options are set, the aforementioned exception will not appear.

The link to the application: https://www.jdeploy.com/~osgifx

CLI invocation with no args prints `-help` instead of `help` as the argument to use

➜  kindling git:(jdeploy) ✗ jdeploy  
Launching shellmarks gui.  Use jdeploy -help for help
Includes: [CopyRule{dir=build/libs, includes=[kindling.jar], excludes=null}]
➜  kindling git:(jdeploy) ✗ jdeploy -help
Exception in thread "main" java.lang.RuntimeException: org.apache.commons.cli.UnrecognizedOptionException: Unrecognized option: -help
        at ca.weblite.jdeploy.JDeploy.main(JDeploy.java:1939)
Caused by: org.apache.commons.cli.UnrecognizedOptionException: Unrecognized option: -help

Looks like jdeploy help does work. This is with [email protected]

Get the latest version of shelljs

I ran into an issue where if I ran the command bellow with shelljs version 0.7.5 I would get a page full of warnings from node, but when I got the latest version of shelljs at the time of writing this is 0.8.4 you could see the second time I ran it there were no warnings. This is not a big issue just one that I thought could help others and could be implemented

Screenshot Of the Output

Portable Applications

As much as I respect your effort to put installers with updaters together, it would be really helpful to be able to provide portable versions of the applications as well.

That way I can provide executables to users without them having to get the installer, but they can use that if they wish.

Would that be an option?

Adding filetype associations not working due to missing JSON key

Ran jdeploy in a fresh repository. Filled out various fields, navigated to the 'Filetypes' tab, tried to add an association, got the error below. Same error if I close and re-open the jdeploy gui.

Exception in thread "AWT-EventQueue-0" org.json.JSONException: JSONObject["documentTypes"] not found.
        at org.json.JSONObject.get(JSONObject.java:580)
        at org.json.JSONObject.getJSONArray(JSONObject.java:773)
        at ca.weblite.jdeploy.gui.JDeployProjectEditor.lambda$initMainFields$27(JDeployProjectEditor.java:862)
        at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
        at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
        at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
        at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
        at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
        at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
        at java.desktop/java.awt.Component.processMouseEvent(Component.java:6626)
        at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3389)
        at java.desktop/java.awt.Component.processEvent(Component.java:6391)
        at java.desktop/java.awt.Container.processEvent(Container.java:2266)
        at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5001)
        at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
        at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
        at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
        at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
        at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
        at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
        at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
        at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
        at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:746)
        at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:744)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:743)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Adding a documentTypes key (with an empty array) in package.json under jdeploy seems to get past the issue.

Bash completion script deploy

I am using jDeploy for the Simple Installation - deploy to NPM and installation via npm install -g <your-app>

My command-line tool also has a Bash completion script.

Is there any way to deploy this script and then install it along with the app?

Deployed npm package doesn't seem to run

I'm able to deploy, and to install the app and run it fine with jdeploy install, however if I install with npm i -g myapp, I get the following when trying to run:

module.js:491
    throw err;
    ^

Error: Cannot find module 'shelljs/global'
    at Function.Module._resolveFilename (module.js:489:15)
    at Function.Module._load (module.js:439:25)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/triggerhippy/.npm-packages/lib/node_modules/kalk/jdeploy-bundle/jdeploy.js:82:13)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)

Pin to particular installer version

Currently the download page on jdeploy.com always uses the latest version of the jdeploy installer to install the apps. In general this is ideal as this makes sure that app owners don't need to republish their apps to benefit from bug-fixes in the installer. However, it may be desirable to pin to a specific version of the installer so that they aren't "surprised" by changes to the way the installer works.

This ability is already built into the app.xml format, but it isn't documented, nor is it connected (I think) to the package.json file yet. Need to add a flag in the GUI and in the package.json file to specify the installer version. E.g.

"installerVersion" : "3.1.9"
or
"installerVersion":"LATEST",

or any other valid semantic version identifier.

JPMS related VM configurations cannot be set

With the introduction of jpms, new java options are introduced:

  • With --add-exports the package is exported, meaning all public types and members therein are accessible at compile and run time.
  • With --add-opens the package is opened, meaning all types and members (not only public ones!) therein are accessible at run time.

In https://www.jdeploy.com/~osgifx application, I need the following java options to be set as well to make it work:

"args": [
            "--add-exports=javafx.base/com.sun.javafx.event=ALL-UNNAMED",
            "--add-exports=javafx.base/com.sun.javafx.runtime=ALL-UNNAMED",
            "--add-exports=javafx.graphics/com.sun.glass.ui=ALL-UNNAMED",
            "--add-exports=javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED",
            "--add-exports=javafx.graphics/com.sun.javafx.application=ALL-UNNAMED",
            "--add-exports=javafx.graphics/com.sun.glass.ui=ALL-UNNAMED",
            "--add-exports=javafx.graphics/com.sun.javafx.css=ALL-UNNAMED",
            "--add-opens=javafx.graphics/javafx.scene=ALL-UNNAMED",
            "--add-opens=javafx.controls/javafx.scene.control.skin=ALL-UNNAMED"
        ],

These options are still not set while running the application by either double clicking on it or by running the executable directly from the command line.

Can't login to NPM due to OTP code

When I try to login to NPM, I receive an OTP code in my email. However Jdeploy does not ask for the OTP code, therefore it cannot login. It just hangs until I cancel.

Delete old versions option

Need to add a way for users to delete old versions of apps/jvms. Propose adding an Advanced section to the installer that allows users to "Delete old versions", and possibly even delete JVMs.

jdeploy install fails

I just tried it and I got an error while running jdeploy install on my application.

Github branch: https://github.com/thatsIch/sublime-rainmeter-image-smoother/tree/jdeploy

while running jdeploy install I get:

Executing copy rule CopyRule{dir=target, includes=[sublime-rainmeter-image-smoother-1.2-jar-with-dependencies.jar], excludes=null}
target\archive-tmp does not match any patterns.
target\classes does not match any patterns.
target\generated-sources does not match any patterns.
target\maven-archiver does not match any patterns.
target\maven-status does not match any patterns.
target\sublime-rainmeter-image-smoother-1.2-jar-with-dependencies.jar does not match any patterns.
target\sublime-rainmeter-image-smoother-1.2.jar does not match any patterns.
target\test-classes does not match any patterns.
    
Exception in thread "main" java.lang.RuntimeException: java.io.IOException: Cannot run program "npm": CreateProcess error=2, Das System kann die angegebene Datei nicht finden
        at ca.weblite.jdeploy.JDeploy.main(JDeploy.java:1252)
Caused by: java.io.IOException: Cannot run program "npm": CreateProcess error=2, Das System kann die angegebene Datei nicht finden
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
        at ca.weblite.jdeploy.JDeploy.install(JDeploy.java:1146)
        at ca.weblite.jdeploy.JDeploy.main(JDeploy.java:1239)
Caused by: java.io.IOException: CreateProcess error=2, Das System kann die angegebene Datei nicht finden
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
        at java.lang.ProcessImpl.start(ProcessImpl.java:137)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
        ... 2 more

I guess the pattern does not match, because it searches for the file directly and it does not work, because the jar is in the target folder? Or am I supposed to install it directly in the target folder (as suggested in the README) (will be cleaned throgh mvn clean though)

Java 8 Not working on Windows

For some reason Zulu 8 seems to have problems with Java 8 on windows. It crashes, complaining about registry keys.
As a workaround, for now, Java 8 apps will be automatically bumped to Java 11. Not ideal. The better workaround will be to use Adoptium for Java8 (which works), and then download JavaFX separately. Should be easy, but, ya know... Murphy's law.

Check NPM Version

In case people are using an old version of NPM. We should check the version and give an appropriate error message.
#35

Support older Mac versions

Right now the Mac versions are 10.14+ (Mojave). This is because of Azul. If we used AdoptOpenJDK, we could support 10.10+. Down-side of AdoptOpenJDK is that they don't have a JRE+FX or JDK+FX option.

Also would be nice to provide support for even older Macs. E.g. The first non-Apple JDK to run on OS X was JDK7 and it supported Lion (10.7+). It would be nice to see how far back we can push that.

And then even further to older Macs with Apple JDK (1.5/1.6).

Modular updates

In some cases apps can be quite large with all of their dependencies, even though most changes are only to the main app jar. It would be nice if updates could be more modular so that only changed jars need to be downloaded.

One solution might be to integrate Maven into the client update process and use some variant of maven depdencies. Need to investigate further.

Version 2 release notes

I can see a new versions in the npm package - https://www.npmjs.com/package/jdeploy (2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4)

What was changed? Could you please create releases in this repo with some release notes? It will be helpful a lot

It is a common practice when a new version is released.

cant add filetypes using the GUI

When I click the '+' button to add a filetype:

Exception in thread "AWT-EventQueue-0" org.json.JSONException: JSONObject["documentTypes"] not found.
        at org.json.JSONObject.get(JSONObject.java:580)
        at org.json.JSONObject.getJSONArray(JSONObject.java:773)
        at ca.weblite.jdeploy.gui.JDeployProjectEditor.lambda$initMainFields$27(JDeployProjectEditor.java:862)
        at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
        at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
        at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
        at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
        at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
        at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
        at java.desktop/java.awt.Component.processMouseEvent(Component.java:6626)
        at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3389)
        at java.desktop/java.awt.Component.processEvent(Component.java:6391)
        at java.desktop/java.awt.Container.processEvent(Container.java:2266)
        at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5001)
        at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
        at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
        at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
        at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
        at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
        at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
        at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
        at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
        at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:746)
        at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:744)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:743)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Publishing is also installing package

I am trying to publish package into npm and got error about missing permissions:

npm ERR! Error: EACCES: permission denied, symlink '/some/path/build/jdeploy' -> '/usr/lib/node_modules/hello-world'                                       
npm ERR!  { [Error: EACCES: permission denied, symlink '/some/path/build/jdeploy' -> '/usr/lib/node_modules/hello-world']                                  
npm ERR!   stack:
npm ERR!    'Error: EACCES: permission denied, symlink \'/some/path/build/jdeploy\' -> \'/usr/lib/node_modules/hello-world\'',                             
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'symlink',
npm ERR!   path:
npm ERR!    '/some/path/build/jdeploy',
npm ERR!   dest: '/usr/lib/node_modules/hello-world' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

This happens, because publish task is also installing packages: https://github.com/shannah/jdeploy/blob/master/src/ca/weblite/jdeploy/JDeploy.java#L1084

sudo for install is default behavior, atleast for Arch Linux or for security reasons. I am not able install anything globally through npm without it.

I am wondering, what is reason to have npm link before publishing?

Possible workaround is to give some random node prefix like:

NPM_CONFIG_PREFIX=~/.npm-global jdeploy publish

Initial thoughts, concerns and feature requests

Hi,

First of all, I love the idea and effort behind this project. As a hobbyist for JavaFx dev, I recognize the single and most important and complex thing is to ensure software is up-to-date and distribution.

Also, I’m playing with the idea of using this as a distribution. Especially this is a problem with updates + code sign on mac.

However, I have a few concerns about the longevity and maintenance of the project. So I had a few questions that maybe you could help me out in solving.

Concerns

  1. Project uses libraries in jars instead of maven repo
    • Won’t this be a problem when libraries will need to be updated?
    • There’s no way of knowing which version is used by the local library 🤷‍️
  2. Project uses other projects from repositories copied over instead of a submodule
    • I guess my concern is, if there is a new fixes / releases, how do you update it?
    • Another concern, the project that you’re using is 4 years old (last commit). Over the years, I’ve had so much trouble in solving platform compatibility on its distribution. I’m think that this library cannot be an exception 🤔
  3. Style of code
    • First of all, this is just my opinion, and I’m not saying its bad. I would love to contribute to the project and tinker with it.

    • I don’t understand empty lines in code and when should use it?

    • Sample code 1

      public class Bundler {
          public static int verboseLevel = 0;
      
      
      
      
          public static void main(String ... args) throws Exception {
              <...method content...>
          }
      
      
      
          /**
           * Returns first non-empty value from candidates
           * @param candidates
           * @return
           */
          private static String val(String... candidates) {
              <...method content...>
          }
      
          private static String toDataURI(URL url) throws IOException {
              <...method content...>
          }
      
          public static BundlerResult runit(AppInfo appInfo, String url,
                  String target,
                  String DEST_DIR,
                  String RELEASE_DIR) throws Exception {
      
      
      
      
      
              AppDescription app = new AppDescription();
              app.setNpmPrerelease(appInfo.isNpmAllowPrerelease());
              app.setName(appInfo.getTitle());
              app.setFork(appInfo.isFork());
              URL iconURL = URLUtil.url(appInfo.getAppURL(), "icon.png");
              app.setIconDataURI(toDataURI(iconURL));
      
      
              if (url == null) throw new IllegalArgumentException("URL is required. It can be a file: url");
      
      <...rest of class...>
      

Feature requests

Also, I was thinking about a few feature requests. Even thinking of maybe contributing to them myself 🤔

  1. Modularize distribution

    • It seems to me that there is no way to distribute (at least documentation does not state it so) only on NPM and ignore uploading to jdeploy.com/~app ?
    • Documentation how to set-up using a custom repository, where app could be downloaded.
  2. Customize launch

    • Change splash screen with custom images that would focus more on the app itself than the distribution platform. However I do agree, that it is equally important to promote the distribution platform itself as well.
    • After first launch, is there an ability for the user to change update settings? (For instance, on first launch he wanted only fixes, but on next one wants minor updates and so on)
  3. Missing parts of documentation

    • I was missing some crucial part of the information. That’s how I found myself digging through the code.
    • There is no info, where information is stored. For instance, where is the downloaded JRE’s and downloaded app archives? Now I know it is stored in ~/.jdeploy/..
  4. Uninstall

    • How do you uninstall the app? On windows there is an uninstaller.

      But mac system has a different design. When you’re using a regular app install, you just delete the app icon from applications, that is it. However, with this installer, it would leave JRE’s and app jar files inside user home directory.

      This is really a big problem. I have an app that my users are using at least 2-3 years now. App jar weights around 50mbs. So after a year or so, it really would be a memory problem, when there is software parts that are not used any more.

  5. Different JRE’s

    • Right now launcher uses official JRE’s. This has few side effects.
      • When bundling project with jlink, it would strip out unneeded parts of JRE. If the app is small, this significantly uses less ram and launch speed is increased. Using full JRE, it would always launch an full fledged JRE into memory.
      • If there’s a need for some reason to use older version of JFX, JRE.

So these are my initial thoughts about the project.

Don’t get me wrong, I love the idea and the project seems that is really address crucial concerns of java desktop. I would love to see this project bloom into something truly spectacular.

Cheers!

Ubuntu icon not appearing on dock for JavaFX apps

This issue occurs for both the jfxcentral and JavaFX Ensemble. When opening the app, the icon appears on the Ubuntu dock while the update progress dialog is showing, but when the app actually loads, the icon appears blank.

This does not occur with the SwingSet demo.

Need to investigate. Both the SwingSet demo and JavaFX ensemble demo use Java 11, but they use different distributions. JavaFX ensemble uses a jre11+fx distribution from Azul, whereas SwingSet uses just jre11.

The problem could either be related to JavaFX (i.e. JavaFX does something that causes a problem with the icon), or it could be related to the distribution difference. Easy way to determine if it is the distribution is to change SwingSet to use jre11+fx. If it still seems to work, then likely its something with JavaFX....

Swingset demo fails to install on Garuda (Arch)

When I tried the SwingSet demo from the site, there was a brief attempt to show a window, then a segfault:

2022/02/15 08:43:10 In Launch().  The app is Not loaded yet
2022/02/15 08:43:10 We got through this
Size is -1
Content length -1
2022/02/15 08:43:11 We got through this
Size is -1
Content length -1
2022/02/15 08:43:12 About to install app

Size is -1
Content length -1
Size is 14820019
Content length 14820019
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x382d46 pc=0x7f3839d614bd]

runtime stack:
runtime.throw({0x5558e245f4cd, 0x0})
/opt/hostedtoolcache/go/1.17.6/x64/src/runtime/panic.go:1198 +0x71
runtime.sigpanic()
/opt/hostedtoolcache/go/1.17.6/x64/src/runtime/signal_unix.go:719 +0x396

goroutine 17 [syscall, locked to thread]:
runtime.cgocall(0x5558e244e246, 0xc0001f1ba0)
/opt/hostedtoolcache/go/1.17.6/x64/src/runtime/cgocall.go:156 +0x5c fp=0xc0001f1b78 sp=0xc0001f1b40 pc=0x5558e21ae49c
github.com/shannah/client4jgo._Cfunc_StartProgress()
_cgo_gotypes.go:107 +0x45 fp=0xc0001f1ba0 sp=0xc0001f1b78 pc=0x5558e244bc65
github.com/shannah/client4jgo.StartProgress(...)
/home/runner/work/client4jgo/client4jgo/gtk_progress_dialog.go:15
github.com/shannah/client4jgo.(*SplashView).Run(0xc00063f410)
/home/runner/work/client4jgo/client4jgo/splashview_empty.go:23 +0x1e fp=0xc0001f1bc0 sp=0xc0001f1ba0 pc=0x5558e244a6fe
github.com/shannah/client4jgo.LaunchApp({{0xc00001a3f0, 0x11}, {0x0, 0x0}, {0xc000214f00, 0x24de}, {0x0, 0x0}, {0xc00001a420, 0x11}, ...}, ...)
/home/runner/work/client4jgo/client4jgo/launch_controller.go:438 +0x41f fp=0xc0001f1c80 sp=0xc0001f1bc0 pc=0x5558e244257f
main.main1(0x1)
/home/runner/work/client4jgo/client4jgo/launcher/mainweb.go:57 +0x205 fp=0xc0001f1e18 sp=0xc0001f1c80 pc=0x5558e244d345
main.Update(...)
/home/runner/work/client4jgo/client4jgo/launcher/mainweb.go:20
_cgoexp_2cec8f1074d8_Update(0x5558e253d648)
_cgo_gotypes.go:42 +0x1e fp=0xc0001f1e30 sp=0xc0001f1e18 pc=0x5558e244d45e
runtime.cgocallbackg1(0x5558e244d440, 0x0, 0x0)
/opt/hostedtoolcache/go/1.17.6/x64/src/runtime/cgocall.go:306 +0x29a fp=0xc0001f1f00 sp=0xc0001f1e30 pc=0x5558e21ae97a
runtime.cgocallbackg(0x0, 0x0, 0x0)
/opt/hostedtoolcache/go/1.17.6/x64/src/runtime/cgocall.go:232 +0x109 fp=0xc0001f1f90 sp=0xc0001f1f00 pc=0x5558e21ae649
runtime.cgocallbackg(0x5558e244d440, 0x7ffe0645ad3f, 0x0)
<autogenerated>:1 +0x31 fp=0xc0001f1fb8 sp=0xc0001f1f90 pc=0x5558e220fcb1
runtime.cgocallback(0x0, 0x0, 0x0)
/opt/hostedtoolcache/go/1.17.6/x64/src/runtime/asm_amd64.s:915 +0xb3 fp=0xc0001f1fe0 sp=0xc0001f1fb8 pc=0x5558e220d893
runtime.goexit()
/opt/hostedtoolcache/go/1.17.6/x64/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc0001f1fe8 sp=0xc0001f1fe0 pc=0x5558e220dac1

goroutine 13 [sync.Cond.Wait, locked to thread]:
sync.runtime_notifyListWait(0xc000116348, 0x48)
/opt/hostedtoolcache/go/1.17.6/x64/src/runtime/sema.go:513 +0x13d
sync.(*Cond).Wait(0xc000096600)
/opt/hostedtoolcache/go/1.17.6/x64/src/sync/cond.go:56 +0x8c
net/http.(*http2pipe).Read(0xc000116330, {0xc0002f4000, 0x8000, 0x8000})
/opt/hostedtoolcache/go/1.17.6/x64/src/net/http/h2_bundle.go:3618 +0xeb
net/http.http2transportResponseBody.Read({0x0}, {0xc0002f4000, 0x5558e2262894, 0xc0000c2038})
/opt/hostedtoolcache/go/1.17.6/x64/src/net/http/h2_bundle.go:8890 +0x85
github.com/shannah/client4jgo.(*reader).Read(0xc0000ec5d0, {0xc0002f4000, 0xc0000918a0, 0xc0000918a0})
/home/runner/work/client4jgo/client4jgo/httpfuncs.go:42 +0x32
io.copyBuffer({0x5558e2541440, 0xc0000918a0}, {0x5558e2540740, 0xc0000ec5d0}, {0x0, 0x0, 0x0})
/opt/hostedtoolcache/go/1.17.6/x64/src/io/io.go:423 +0x1b2
io.Copy(...)
/opt/hostedtoolcache/go/1.17.6/x64/src/io/io.go:382
os.genericReadFrom(0x5558e2212dfe, {0x5558e2540740, 0xc0000ec5d0})
/opt/hostedtoolcache/go/1.17.6/x64/src/os/file.go:162 +0x5d
os.(*File).ReadFrom(0xc0000c2038, {0x5558e2540740, 0xc0000ec5d0})
/opt/hostedtoolcache/go/1.17.6/x64/src/os/file.go:156 +0x1b0
io.copyBuffer({0x5558e2540b20, 0xc0000c2038}, {0x5558e2540740, 0xc0000ec5d0}, {0x0, 0x0, 0x0})
/opt/hostedtoolcache/go/1.17.6/x64/src/io/io.go:409 +0x14b
io.Copy(...)
/opt/hostedtoolcache/go/1.17.6/x64/src/io/io.go:382
github.com/shannah/client4jgo.downloadFile({0xc00014c280, 0x4a}, {0xc000092618, 0x17}, 0xc0000a6080)
/home/runner/work/client4jgo/client4jgo/httpfuncs.go:79 +0x2e8
github.com/shannah/client4jgo.npmDownloadTarball({0xc00001a420, 0x11}, {0xc00001cb35, 0x5}, 0x5558e225de85)
/home/runner/work/client4jgo/client4jgo/npm.go:660 +0x369
github.com/shannah/client4jgo.InstallApp(0xc000230000)
/home/runner/work/client4jgo/client4jgo/launch_controller.go:568 +0x23b
github.com/shannah/client4jgo.LaunchApp.func1()
/home/runner/work/client4jgo/client4jgo/launch_controller.go:293 +0x112
created by github.com/shannah/client4jgo.LaunchApp
/home/runner/work/client4jgo/client4jgo/launch_controller.go:437 +0x413

goroutine 11 [IO wait]:
internal/poll.runtime_pollWait(0x7f3834444798, 0x72)
/opt/hostedtoolcache/go/1.17.6/x64/src/runtime/netpoll.go:234 +0x89
internal/poll.(*pollDesc).wait(0xc0000ce280, 0xc000458c83, 0x0)
/opt/hostedtoolcache/go/1.17.6/x64/src/internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.(*pollDesc).waitRead(...)
/opt/hostedtoolcache/go/1.17.6/x64/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc0000ce280, {0xc000458c83, 0x9604, 0x9604})
/opt/hostedtoolcache/go/1.17.6/x64/src/internal/poll/fd_unix.go:167 +0x25a
net.(*netFD).Read(0xc0000ce280, {0xc000458c83, 0xd, 0xc0000b9e00})
/opt/hostedtoolcache/go/1.17.6/x64/src/net/fd_posix.go:56 +0x29
net.(*conn).Read(0xc000114000, {0xc000458c83, 0x5558e232ee39, 0xc0001957f8})
/opt/hostedtoolcache/go/1.17.6/x64/src/net/net.go:183 +0x45
crypto/tls.(*atLeastReader).Read(0xc0001384f8, {0xc000458c83, 0x0, 0x5558e21b4a8d})
/opt/hostedtoolcache/go/1.17.6/x64/src/crypto/tls/conn.go:777 +0x3d
bytes.(*Buffer).ReadFrom(0xc000118278, {0x5558e2540300, 0xc0001384f8})
/opt/hostedtoolcache/go/1.17.6/x64/src/bytes/buffer.go:204 +0x98
crypto/tls.(*Conn).readFromUntil(0xc000118000, {0x5558e25408c0, 0xc000114000}, 0xc00045802a)
/opt/hostedtoolcache/go/1.17.6/x64/src/crypto/tls/conn.go:799 +0xe5
crypto/tls.(*Conn).readRecordOrCCS(0xc000118000, 0x0)
/opt/hostedtoolcache/go/1.17.6/x64/src/crypto/tls/conn.go:651 +0xb06
crypto/tls.(*Conn).readRecord(...)
/opt/hostedtoolcache/go/1.17.6/x64/src/crypto/tls/conn.go:574
crypto/tls.(*Conn).Read(0xc000118000, {0xc0001f2000, 0x1000, 0x5558e238f946})
/opt/hostedtoolcache/go/1.17.6/x64/src/crypto/tls/conn.go:1277 +0x16f
bufio.(*Reader).Read(0xc0004e5620, {0xc0006368f8, 0x9, 0x0})
/opt/hostedtoolcache/go/1.17.6/x64/src/bufio/bufio.go:227 +0x1b4
io.ReadAtLeast({0x5558e25401c0, 0xc0004e5620}, {0xc0006368f8, 0x9, 0x9}, 0x9)
/opt/hostedtoolcache/go/1.17.6/x64/src/io/io.go:328 +0x9a
io.ReadFull(...)
/opt/hostedtoolcache/go/1.17.6/x64/src/io/io.go:347
net/http.http2readFrameHeader({0xc0006368f8, 0x9, 0xc00063e600}, {0x5558e25401c0, 0xc0004e5620})
/opt/hostedtoolcache/go/1.17.6/x64/src/net/http/h2_bundle.go:1555 +0x6e
net/http.(*http2Framer).ReadFrame(0xc0006368c0)
/opt/hostedtoolcache/go/1.17.6/x64/src/net/http/h2_bundle.go:1813 +0x95
net/http.(*http2clientConnReadLoop).run(0xc000195f98)
/opt/hostedtoolcache/go/1.17.6/x64/src/net/http/h2_bundle.go:8608 +0x130
net/http.(*http2ClientConn).readLoop(0xc00022e000)
/opt/hostedtoolcache/go/1.17.6/x64/src/net/http/h2_bundle.go:8531 +0x6f
created by net/http.(*http2Transport).newClientConn
/opt/hostedtoolcache/go/1.17.6/x64/src/net/http/h2_bundle.go:7325 +0xb85

goroutine 26 [select]:
net/http.(*http2clientStream).writeRequest(0xc000116300, 0xc000140200)
/opt/hostedtoolcache/go/1.17.6/x64/src/net/http/h2_bundle.go:7865 +0xaa8
net/http.(*http2clientStream).doRequest(0x0, 0xc00003d678)
/opt/hostedtoolcache/go/1.17.6/x64/src/net/http/h2_bundle.go:7727 +0x1e
created by net/http.(*http2ClientConn).RoundTrip
/opt/hostedtoolcache/go/1.17.6/x64/src/net/http/h2_bundle.go:7656 +0x30f
2022/02/15 08:43:13 Failed to launch app. %!(EXTRA *errors.errorString=Failed to update app.%!(EXTRA *errors.errorString=Failed to run update command. %!(EXTRA *exec.ExitError=signal: aborted (core dumped))))

Installed application crashes on startup: Failed to run update command.

Probably doing something wrong on my end of things, just trying things out.

Platform: Ubuntu 21.10
Java: openjdk 17.0.1 2021-10-19
Node: v16.14.0

Made a basic Clojure GUI app following a bit of https://gist.github.com/daveray/1441520, and built it as a .jar:

It works when running with java -jar target/test-app-0.1.0-SNAPSHOT.jar, but not when trying to run the jdeploy installed version.
Tried tweaking a few things like java version, but no luck.

Update: this happens with both the .deb and .bin, but it works as expected when running through npm.

2022/02/15 00:54:00 In Launch().  The app is Not loaded yet
2022/02/15 00:54:00 There was a problem parsing the string 
2022/02/15 00:54:00 strconv.ParseInt: parsing "": invalid syntax
2022/02/15 00:54:00 We got through this
Size is -1
Content length -1
2022/02/15 00:54:01 There was a problem parsing the string 
2022/02/15 00:54:01 strconv.ParseInt: parsing "": invalid syntax
2022/02/15 00:54:01 We got through this
Size is -1
Content length -1
2022/02/15 00:54:01 About to install app

Size is -1
Content length -1
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x382d46 pc=0x7fa89f7fdf3d]

runtime stack:
runtime.throw({0x557cdb12e4cd, 0x557cdb78cf03})
	/opt/hostedtoolcache/go/1.17.6/x64/src/runtime/panic.go:1198 +0x71
runtime.sigpanic()
	/opt/hostedtoolcache/go/1.17.6/x64/src/runtime/signal_unix.go:719 +0x396

goroutine 17 [syscall, locked to thread]:
runtime.cgocall(0x557cdb11d246, 0xc00017fba0)
	/opt/hostedtoolcache/go/1.17.6/x64/src/runtime/cgocall.go:156 +0x5c fp=0xc00017fb78 sp=0xc00017fb40 pc=0x557cdae7d49c
github.com/shannah/client4jgo._Cfunc_StartProgress()
	_cgo_gotypes.go:107 +0x45 fp=0xc00017fba0 sp=0xc00017fb78 pc=0x557cdb11ac65
github.com/shannah/client4jgo.StartProgress(...)
	/home/runner/work/client4jgo/client4jgo/gtk_progress_dialog.go:15
github.com/shannah/client4jgo.(*SplashView).Run(0xc000540960)
	/home/runner/work/client4jgo/client4jgo/splashview_empty.go:23 +0x1e fp=0xc00017fbc0 sp=0xc00017fba0 pc=0x557cdb1196fe
github.com/shannah/client4jgo.LaunchApp({{0x0, 0x0}, {0x0, 0x0}, {0xc0001282c0, 0xa6}, {0x0, 0x0}, {0xc00001c530, 0xf}, ...}, ...)
	/home/runner/work/client4jgo/client4jgo/launch_controller.go:438 +0x41f fp=0xc00017fc80 sp=0xc00017fbc0 pc=0x557cdb11157f
main.main1(0x1)
	/home/runner/work/client4jgo/client4jgo/launcher/mainweb.go:57 +0x205 fp=0xc00017fe18 sp=0xc00017fc80 pc=0x557cdb11c345
main.Update(...)
	/home/runner/work/client4jgo/client4jgo/launcher/mainweb.go:20
_cgoexp_2cec8f1074d8_Update(0x557cdb20c648)
	_cgo_gotypes.go:42 +0x1e fp=0xc00017fe30 sp=0xc00017fe18 pc=0x557cdb11c45e
runtime.cgocallbackg1(0x557cdb11c440, 0x0, 0x0)
	/opt/hostedtoolcache/go/1.17.6/x64/src/runtime/cgocall.go:306 +0x29a fp=0xc00017ff00 sp=0xc00017fe30 pc=0x557cdae7d97a
runtime.cgocallbackg(0x0, 0x0, 0x0)
	/opt/hostedtoolcache/go/1.17.6/x64/src/runtime/cgocall.go:232 +0x109 fp=0xc00017ff90 sp=0xc00017ff00 pc=0x557cdae7d649
runtime.cgocallbackg(0x557cdb11c440, 0x7fff18ef204f, 0x0)
	<autogenerated>:1 +0x31 fp=0xc00017ffb8 sp=0xc00017ff90 pc=0x557cdaedecb1
runtime.cgocallback(0x0, 0x0, 0x0)
	/opt/hostedtoolcache/go/1.17.6/x64/src/runtime/asm_amd64.s:915 +0xb3 fp=0xc00017ffe0 sp=0xc00017ffb8 pc=0x557cdaedc893
runtime.goexit()
	/opt/hostedtoolcache/go/1.17.6/x64/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc00017ffe8 sp=0xc00017ffe0 pc=0x557cdaedcac1

goroutine 54 [select, locked to thread]:
net/http.(*http2ClientConn).RoundTrip(0xc00020a000, 0xc000210200)
	/opt/hostedtoolcache/go/1.17.6/x64/src/net/http/h2_bundle.go:7697 +0x46b
net/http.(*http2Transport).RoundTripOpt(0xc00016c150, 0xc000210200, {0xc0})
	/opt/hostedtoolcache/go/1.17.6/x64/src/net/http/h2_bundle.go:7106 +0x1b7
net/http.(*http2Transport).RoundTrip(...)
	/opt/hostedtoolcache/go/1.17.6/x64/src/net/http/h2_bundle.go:7067
net/http.http2noDialH2RoundTripper.RoundTrip({0x557cdb3bc200}, 0xc000210200)
	/opt/hostedtoolcache/go/1.17.6/x64/src/net/http/h2_bundle.go:9453 +0x1b
net/http.(*Transport).roundTrip(0x557cdb3bc200, 0xc000210200)
	/opt/hostedtoolcache/go/1.17.6/x64/src/net/http/transport.go:539 +0x390
net/http.(*Transport).RoundTrip(0x30, 0x557cdb20f940)
	/opt/hostedtoolcache/go/1.17.6/x64/src/net/http/roundtrip.go:18 +0x19
net/http.send(0xc000210200, {0x557cdb20f940, 0x557cdb3bc200}, {0x557cdb202520, 0x1, 0x0})
	/opt/hostedtoolcache/go/1.17.6/x64/src/net/http/client.go:252 +0x5d8
net/http.(*Client).send(0xc0002c5ad0, 0xc000210200, {0xc000210200, 0x2f, 0x0})
	/opt/hostedtoolcache/go/1.17.6/x64/src/net/http/client.go:176 +0x9b
net/http.(*Client).do(0xc0002c5ad0, 0xc000210200)
	/opt/hostedtoolcache/go/1.17.6/x64/src/net/http/client.go:725 +0x908
net/http.(*Client).Do(...)
	/opt/hostedtoolcache/go/1.17.6/x64/src/net/http/client.go:593
github.com/shannah/client4jgo.downloadFile({0xc00031e140, 0x46}, {0xc000017278, 0x17}, 0xc0000a7280)
	/home/runner/work/client4jgo/client4jgo/httpfuncs.go:63 +0xb7
github.com/shannah/client4jgo.npmDownloadTarball({0xc00001c530, 0xf}, {0xc0000b2dc5, 0x5}, 0x557cdaf2ce85)
	/home/runner/work/client4jgo/client4jgo/npm.go:660 +0x369
github.com/shannah/client4jgo.InstallApp(0xc00020c000)
	/home/runner/work/client4jgo/client4jgo/launch_controller.go:568 +0x23b
github.com/shannah/client4jgo.LaunchApp.func1()
	/home/runner/work/client4jgo/client4jgo/launch_controller.go:293 +0x112
created by github.com/shannah/client4jgo.LaunchApp
	/home/runner/work/client4jgo/client4jgo/launch_controller.go:437 +0x413

goroutine 52 [IO wait]:
internal/poll.runtime_pollWait(0x7fa89c706798, 0x72)
	/opt/hostedtoolcache/go/1.17.6/x64/src/runtime/netpoll.go:234 +0x89
internal/poll.(*pollDesc).wait(0xc0000d0280, 0xc000364500, 0x0)
	/opt/hostedtoolcache/go/1.17.6/x64/src/internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.(*pollDesc).waitRead(...)
	/opt/hostedtoolcache/go/1.17.6/x64/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc0000d0280, {0xc000364500, 0x220e, 0x220e})
	/opt/hostedtoolcache/go/1.17.6/x64/src/internal/poll/fd_unix.go:167 +0x25a
net.(*netFD).Read(0xc0000d0280, {0xc000364500, 0xc0003650ad, 0x19})
	/opt/hostedtoolcache/go/1.17.6/x64/src/net/fd_posix.go:56 +0x29
net.(*conn).Read(0xc000194000, {0xc000364500, 0x1661, 0xc00011d7f8})
	/opt/hostedtoolcache/go/1.17.6/x64/src/net/net.go:183 +0x45
crypto/tls.(*atLeastReader).Read(0xc0004e2030, {0xc000364500, 0x0, 0x557cdae83a8d})
	/opt/hostedtoolcache/go/1.17.6/x64/src/crypto/tls/conn.go:777 +0x3d
bytes.(*Buffer).ReadFrom(0xc000198278, {0x557cdb20f300, 0xc0004e2030})
	/opt/hostedtoolcache/go/1.17.6/x64/src/bytes/buffer.go:204 +0x98
crypto/tls.(*Conn).readFromUntil(0xc000198000, {0x557cdb20f8c0, 0xc000194000}, 0x166e)
	/opt/hostedtoolcache/go/1.17.6/x64/src/crypto/tls/conn.go:799 +0xe5
crypto/tls.(*Conn).readRecordOrCCS(0xc000198000, 0x0)
	/opt/hostedtoolcache/go/1.17.6/x64/src/crypto/tls/conn.go:606 +0x112
crypto/tls.(*Conn).readRecord(...)
	/opt/hostedtoolcache/go/1.17.6/x64/src/crypto/tls/conn.go:574
crypto/tls.(*Conn).Read(0xc000198000, {0xc0001c7000, 0x1000, 0xc000083040})
	/opt/hostedtoolcache/go/1.17.6/x64/src/crypto/tls/conn.go:1277 +0x16f
bufio.(*Reader).Read(0xc00018e1e0, {0xc00054c038, 0x9, 0xc00058f1a0})
	/opt/hostedtoolcache/go/1.17.6/x64/src/bufio/bufio.go:227 +0x1b4
io.ReadAtLeast({0x557cdb20f1c0, 0xc00018e1e0}, {0xc00054c038, 0x9, 0x9}, 0x9)
	/opt/hostedtoolcache/go/1.17.6/x64/src/io/io.go:328 +0x9a
io.ReadFull(...)
	/opt/hostedtoolcache/go/1.17.6/x64/src/io/io.go:347
net/http.http2readFrameHeader({0xc00054c038, 0x9, 0xc0004de030}, {0x557cdb20f1c0, 0xc00018e1e0})
	/opt/hostedtoolcache/go/1.17.6/x64/src/net/http/h2_bundle.go:1555 +0x6e
net/http.(*http2Framer).ReadFrame(0xc00054c000)
	/opt/hostedtoolcache/go/1.17.6/x64/src/net/http/h2_bundle.go:1813 +0x95
net/http.(*http2clientConnReadLoop).run(0xc00011df98)
	/opt/hostedtoolcache/go/1.17.6/x64/src/net/http/h2_bundle.go:8608 +0x130
net/http.(*http2ClientConn).readLoop(0xc00020a000)
	/opt/hostedtoolcache/go/1.17.6/x64/src/net/http/h2_bundle.go:8531 +0x6f
created by net/http.(*http2Transport).newClientConn
	/opt/hostedtoolcache/go/1.17.6/x64/src/net/http/h2_bundle.go:7325 +0xb85

goroutine 28 [select]:
net/http.(*http2clientStream).writeRequest(0xc000196300, 0xc000210200)
	/opt/hostedtoolcache/go/1.17.6/x64/src/net/http/h2_bundle.go:7865 +0xaa8
net/http.(*http2clientStream).doRequest(0x557cdb061d26, 0xc0000ed678)
	/opt/hostedtoolcache/go/1.17.6/x64/src/net/http/h2_bundle.go:7727 +0x1e
created by net/http.(*http2ClientConn).RoundTrip
	/opt/hostedtoolcache/go/1.17.6/x64/src/net/http/h2_bundle.go:7656 +0x30f
2022/02/15 00:54:01 Failed to launch app. %!(EXTRA *errors.errorString=Failed to update app.%!(EXTRA *errors.errorString=Failed to run update command. %!(EXTRA *exec.ExitError=signal: aborted (core dumped))))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.