javafx本机包错误调用方法 [英] javafx native package error invoking method

查看:297
本文介绍了javafx本机包错误调用方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用javafx v8.0.60开发桌面应用程序.我已经在netbeans 8中用ant创建了一个exe软件包.当我在计算机上运行exe文件时,它已安装并运行,没有任何问题.

I'm developing a desktop application using javafx v8.0.60. I have created an exe package with ant in netbeans 8. When I run exe file in my computer, it is installed and run without any problem.

另一方面,当我尝试在其他计算机上安装并运行它时,在安装结束时,会弹出窗口对话框:

On the other hand, when I try to install and run it on some other computer, at the end of installation, window dialog pops up:

错误调用方法"

"Error invoking method"

我单击确定.弹出另一个窗口:

I click Ok. Another window pop up saying:

无法启动jvm"

"Failed to launch jvm"

推荐答案

达沃,问候!我遇到了同样的问题,和您一样,我在任何地方都找不到帮助.

Davood, greetings! I had this same problem and I, like you, found no help anywhere.

我向您提交了一个解决方案,该解决方案为我奇迹般地工作,并帮助我理解了那些被抨击的错误调用方法".和无法启动JVM"对话框:

I submit to you a solution, which miraculously worked for me and helped me make sense of those blasted "Error invoking method." and "Failed to launch JVM" dialogs:

  1. 找到您的.jar文件
    • 它与您的项目同名,并且位于应用程序的安装目录中的AppData\Local\{ApplicationTitle}\app下(快捷方式:在资源管理器中键入%appdata%);如果您的项目名为HelloWorld,您将在其中找到HelloWorld.jar
  1. Find your .jar file
    • It has the same name as your Project and it's in your application's installation directory under AppData\Local\{ApplicationTitle}\app (shortcut: type %appdata% into explorer); if your project was named HelloWorld, there you will find HelloWorld.jar
  • shift + 右键单击在资源管理器窗口中的任何空白处,然后选择在此处打开命令窗口".(这是我最近学到的花哨技巧;
  • shift+Right Click any blank spot in the Explorer window and choose "Open command window here" (that's a fancy trick I recently learned; alternatively you would cd to the same directory using the command prompt)
  • 键入java -jar "HelloWorld.jar"并按 Enter

Tadah!!请注意您隐藏的异常(存在错误调用方法",所以隐约地尝试与您通信). *

Tadah! Behold your hidden exceptions (the existence of which "Error invoking method." so vaguely tries to communicate to you). *

如果您的问题类似于我的问题,则源于项目out文件夹和安装目录,这就是为什么程序在编辑器中可以正常编译并可以正常构建的原因-在构建完成之前没有问题,并且文件结构有所不同.

If your problem is similar to mine it stems from a file structure difference between the project out folder and the installation directory, and that's why the program compiles just fine in the editor and builds just fine—there isn't a problem until it's built out, and the file structure is a little different.

*如果通过命令行运行时没有得到任何结果,请查找该initialize()方法期间可能发生的任何错误;那就是你的问题所在. 您可以通过使用弹出式异常对话框在运行时公开任何异常,如此处类似的问题所示.

*If you didn't get anything when you ran it via the command line, look for any errors that could be happening during that initialize() method; that's where your problem likely is. You can expose any exceptions during runtime by using a Popup Exception Dialog like shown in a similar problem, here.

这篇关于javafx本机包错误调用方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆