jpackage FileSystemException

huangapple go评论129阅读模式
英文:

jpackage FileSystemException

问题

I have a Java project (on Mac OSX and in Eclipse) where jpackage produces an error I don't understand

The jpackage command is as follows:

export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk-17.0.5.jdk/Contents/Home"
export PATH=$JAVA_HOME/bin:$PATH

jpackage \
    --type app-image \
    -i ../Released \
    -d ../Released \
    -n "Boekhouding" \
    --app-version "1.3.7" \
    --icon ../../Images/euro.icns \
    --main-jar run.jar \
    --verbose

This jpackage version and command works with another project but not with this project. The error is as follows:

java.nio.file.FileSystemException: /Users/cor/SoftwareProjects/Boekhouding/Desktop/Build/../Released/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents: File name too long

This project was successfully packaged with jpackage of jdk 11.0.3.

Does anyone have a clue what is going on here?

英文:

I have a Java project (on Mac OSX and in Eclipse) where jpackage produces an error I don't understand

The jpackage command is as follows:

export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk-17.0.5.jdk/Contents/Home"
export PATH=$JAVA_HOME/bin:$PATH

jpackage \
    --type app-image \
    -i ../Released \
    -d ../Released \
    -n "Boekhouding" \
    --app-version "1.3.7" \
    --icon ../../Images/euro.icns \
    --main-jar run.jar \
    --verbose

This jpackage version and command works with another project but not with this project. The error is as follows:

java.nio.file.FileSystemException: /Users/cor/SoftwareProjects/Boekhouding/Desktop/Build/../Released/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents/app/Boekhouding.app/Contents: File name too long

This project was succesfully packaged with jpackage of jdk 11.0.3.

Does anyone have a clue what is going on here?

答案1

得分: 2

你已经使用了相同的输入和输出目录参数 -i-d,因此你正在看到一个递归复制的过程,一个目录复制到另一个目录 - 可能每次运行命令时都会深入更多级别。请为每个参数使用单独的文件夹。

--dest / -d 的值更适合设置为临时构建位置,这样它可以在你使用的构建系统执行"clean"操作时被清除,并在下一次运行时重新生成。

英文:

You have used same input and output dir parameters -i and -d, so you are seeing a recursive copy of one to the other - probably getting deeper levels each time you run the command. Use separate folders for each parameter.

The --dest / -d value is more suitable to be set as a temporary build location so it can be cleared by a "clean" operation of whatever build system you use and regenerated cleanly by next run.

huangapple
  • 本文由 发表于 2023年5月10日 18:21:31
  • 转载请务必保留本文链接:https://go.coder-hub.com/76217275.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定