gpt4 book ai didi

JavaFX Builder 1.0 无法打开文件

转载 作者:太空宇宙 更新时间:2023-11-04 07:34:33 24 4
gpt4 key购买 nike

当我尝试从 Netbeans 打开 .fxml 文件时,出现以下错误:

StaffRota.fxml:101: error: 
java.lang.IllegalArgumentException: Invalid URL or resource not found

我在该 xml 中的代码是:

<ImageView id="image1.jpg" layoutX="150.0" layoutY="18.0">
<image>
<Image url="/theatre/room/allocation/src/misc/image1.jpg" preserveRatio="true" smooth="true" />
</image>
</ImageView>`

我的 java 应用程序构建和部署良好(并正确渲染图像)。为什么 JavaFX 构建器会提示?是因为图像在应用程序内吗?

如果我执行-tvf tra.jar,我会得到以下结果:-

C:\Users\..\Documents>jar -tvf tra.jar
0 Mon Jun 17 19:54:26 BST 2013 META-INF/
425 Mon Jun 17 19:54:26 BST 2013 META-INF/MANIFEST.MF
0 Mon Jun 17 19:54:26 BST 2013 theatre/
0 Mon Jun 17 19:54:26 BST 2013 theatre/room/
0 Mon Jun 17 19:54:26 BST 2013 theatre/room/allocation/
..
2563 Mon Jun 17 19:54:26 BST 2013 theatre/room/allocation/src/misc/image1.jpg
..

最佳答案

通过将网址更改为@../src/misc/image1.jpg 来修复

关于JavaFX Builder 1.0 无法打开文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17136904/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com