英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论