更改JVM选项中的路径启动4J ISNNOK
由于某种原因,当我使用SDK lib的完整路径运行时。 - module-path =“ d:\ tools \ javafx-sdk-18.0.0.1 \ lib” - add-modules = javafx.controls,javafx.fxml,javafx.media 但是,由于我希望该应用程序可以在其他计算机上运行,因此我将包含javafx.media等的LIB文件复制到应用程序文件夹,并试图将其路径放在“ lib” 中。 。 由于它位于EXE的同一文件夹中。但这无效.. 然后,我尝试为应用程序文件夹中的LIB留下完整的路径,即使我提供了整个路径也没有起作用。 但是,当我声明路径“ d:\ tools \ javafx-sdk-18.0.1 \ lib” 时,它再次工作.. 感觉就像我的应用不喜欢其他道路,他只能与此合作:( 我应该怎么办 ?
for some reason when i use the full path for the sdk lib the application runs..
--module-path="D:\tools\javafx-sdk-18.0.1\lib" --add-modules=javafx.controls,javafx.fxml,javafx.media
but since i want the application to run on other computers, i copied the lib file which contains javafx.media...etc to the application folder and tried to put the path to it as "lib"..
since it's in the same folder of the exe. but it didn't work..
i tried then to put the full path for the lib which is in the application folder and still it didn't work even tho I provided the whole path..
but when I reput the path "D:\tools\javafx-sdk-18.0.1\lib" it works again..
it feels like my application don't love other paths, he only works with this :(
what should i do ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我取得了很大的成功,使用此 javapackagager 图书馆。从Java创建可分发程序的过程中,这需要很多“ grunt工作”。
I've had much success compiling OS-specific, self-contained runnable programs using this JavaPackager library. It takes a lot of the 'grunt work' out of creating distributable programs from Java.
我解决了这个问题。
首先,我需要复制 javafx18.0..ETC 的整个文件夹
不仅 lib 文件夹... 2ndly在启动4J中写下路径时,还必须像这样写“ ../ yoururl/”,以使相对于应用程序文件夹的路径...
3rdly我将所有代码和文件复制到Maven Project中的NetBeans,并使用Jlink构建它...我使用Eclipse创建了可运行的罐子,然后将jar转换为EXE,然后将其放入JLink构建的输出文件夹中,包括Javafx18 .. .. ETC
现在,我的应用程序在所有计算机上都可以使用,这很好……感谢Salaw发表评论。我在他的帮助下想到了Jlink。
I solved this problem..
first i needed to copy the whole folder of javafx18.0..etc
not only the lib folder...2ndly when writting the path in Launch4j you must write it like this "../yoururl/" to make the path relative to the app folder...
3rdly i copied all my code and files to NetBeans in Maven project and build it using jlink...i created the runnable jar using eclipse and i converted the jar to exe then put it in the output folder of jlink build including the javafx18..etc
and it worked fine now my app works on all computers...thanks to Slaw who commented. i figured jlink by his help.