Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exported application with embed java fails in Linux when the path have any folder name with space character #6112

Open
hiteclab opened this issue Oct 29, 2020 · 3 comments
Labels
help wanted We have very little time and would like some help linux

Comments

@hiteclab
Copy link

hiteclab commented Oct 29, 2020

Description

Exported application with embed java fails in Linux when the path have any folder name with space character

The wrong script generated looks like this:

#!/bin/sh

APPDIR=$(readlink -f "$0")
APPDIR=$(dirname "$APPDIR")
$APPDIR/java/bin/java -Djna.nosys=true -Djava.ext.dirs="$APPDIR/java/lib/ext" -Djava.library.path="$APPDIR:$APPDIR/lib" -cp "$APPDIR:$APPDIR/lib/Alphamask.jar:$APPDIR/lib/core.jar:$APPDIR/lib/jogl-all.jar:$APPDIR/lib/gluegen-rt.jar:$APPDIR/lib/jogl-all-natives-linux-amd64.jar:$APPDIR/lib/gluegen-rt-natives-linux-amd64.jar" Alphamask "$@"

Expected Behavior

Current Behavior

Steps to Reproduce

Your Environment

  • Processing version: 3.5.4
  • Operating System and OS version: Ubuntu 20.04
  • Other information:

Possible Causes / Solutions

To solve the problem just use "$APPDIR" instead $APPDIR at the begging of the line 5

#!/bin/sh

APPDIR=$(readlink -f "$0")
APPDIR=$(dirname "$APPDIR")
"$APPDIR"/java/bin/java -Djna.nosys=true -Djava.ext.dirs="$APPDIR/java/lib/ext" -Djava.library.path="$APPDIR:$APPDIR/lib" -cp "$APPDIR:$APPDIR/lib/Alphamask.jar:$APPDIR/lib/core.jar:$APPDIR/lib/jogl-all.jar:$APPDIR/lib/gluegen-rt.jar:$APPDIR/lib/jogl-all-natives-linux-amd64.jar:$APPDIR/lib/gluegen-rt-natives-linux-amd64.jar" Alphamask "$@"

@hiteclab hiteclab changed the title Export application with embed java fails in Linux when the path have any folder name with space character Exported application with embed java fails in Linux when the path have any folder name with space character Nov 3, 2020
@kola4k
Copy link

kola4k commented Jan 23, 2021

Dont work "Embed Java for Windows". Export aplication without packing java into an exe file works-ok. I'm also waiting for a bug fix.

@kola4k
Copy link

kola4k commented Jan 24, 2021

Clarification: this situation is repeated in Python Mode. At the same time, in my case, there are no gaps anywhere.

@benfry benfry added help wanted We have very little time and would like some help linux labels Jun 15, 2021
@VivekShahare04
Copy link

1.Check for Quoting and Escaping
2.Modify the Application:
If you have control over the application code, you can modify it to handle spaces in paths correctly. Use the (java.nio.file) package to manipulate file paths in a cross-platform way, ensuring spaces are handled correctly.
3.Use Quoted Paths in Shell Scripts:
#!/bin/bash
java -jar "/path/to/your application.jar"

I analyze it and try to solve it try to implement this step may it will help and please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted We have very little time and would like some help linux
Projects
None yet
Development

No branches or pull requests

4 participants