Error invoking method failed to launch jvm

I'm developing a desktop application using javafx v8.0.40. I have created an exe file with inno 5. When I run exe file in my computer, it is installed and run without any problem. On the other hand...

I’m developing a desktop application using javafx v8.0.40. I have created an exe file with inno 5. 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 «Failed to launch jvm». I searched the whole internet, but I couldn’t find much about this topic. I hope I will get solution to this problem.
Thank you in advance.

asked Oct 22, 2015 at 15:43

tarlan's user avatar

tarlantarlan

1711 gold badge1 silver badge5 bronze badges

3

I ran into the same problem; the following worked for me and helped me make sense of those blasted «Error invoking method.» and «Failed to launch JVM» dialogs:

  1. Find your .jar file
    • It has the same name as your Project and it’s in your application’s installation directory under AppDataLocal{ApplicationTitle}app (shortcut: type %appdata% into explorer); if your project was named HelloWorld, there you will find HelloWorld.jar
  2. Navigate to it’s directory in command prompt
    • 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)
  3. Run your .jar via the command line
    • type java -jar "HelloWorld.jar" and hit Enter

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

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.

*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.

Community's user avatar

answered Jul 1, 2016 at 22:20

Brad Turek's user avatar

Brad TurekBrad Turek

2,3722 gold badges30 silver badges55 bronze badges

1

This is probably because it lacks the dependencies in the output jar. So you need to add the libraries in the artifact and then .exe generation should be ok.

Here is an example with Intellij, where the libraries have be manually moved from «Available Elements» to the artifact

Intellij example

svarog's user avatar

svarog

9,3174 gold badges62 silver badges77 bronze badges

answered Feb 3, 2016 at 14:03

Rumoch's user avatar

RumochRumoch

611 silver badge5 bronze badges

even though this question is a little old — today I faced the exact same problem and couldn’t find any solution searching for those error messages other then here.

The problem is pretty much identically:
Built JavaFX Application (running fine on dev pc) using java 8 and packaged to native installer (exe) using Inno 5.
Application ran fine on some of our machines — on others it failed with exact those to error messages:

  • «Error invoking method»
    and after clicking OK
  • «Failed to launch jvm».

On application startup, the fxml loader loads the first view controller and calls its «initialize» method. If — within initialize — an unhandeled exception is being thrown, the application crashes and those two windows error messages are shown.

Hope that this will help some one who like me is struggling with that, too.

answered Jun 8, 2016 at 9:58

J.Dürr's user avatar

The response by J.Dürr (answered Jun 8 ’16 at 9:58) helped solve my Error invoking method & Failed to launch JVM issue. I used the following code to track down the issue, which turned out to be an errant FXML resource path:

public static void main(final String[] taArgs)
{
  try
  {
    Main.launch(taArgs);
  }
  catch (Exception e)
  {
    JOptionPane.showMessageDialog(null, e.getMessage());
    try
    {
      PrintWriter pw = new PrintWriter(new File("<somefilename.txt>"));
      e.printStackTrace(pw);
      pw.close();
    }
    catch (IOException e1)
    {
      e1.printStackTrace();
    }
  }
}

answered Oct 10, 2017 at 21:36

Eddie Fann's user avatar

I just had this issue and @Brad Turek’s answer pointed me at the right direction. Except it wasn’t my code that throw the exception.

The .cfg file (at /<app_name>/app/<app_name>.cfg) that the .exe wrapper used to start my application had incorrectly pointed to libs (jar files) that didn’t exist at the /lib directory. Which (I concluded) caused the classloader to throw and terminate the startup.

After correcting the .cfg file everything worked fine.

answered Mar 6, 2019 at 10:17

svarog's user avatar

svarogsvarog

9,3174 gold badges62 silver badges77 bronze badges

I could not fix the problem, but I found a way around it. I used notepad to create a batch file to launch the app. First I used cd to get to the directory of the .jar file and then used java -jar to launch the app. It should look something like this:

cd C:[wherever your project folder is located][name of project]dist
java -jar [name of project].jar

Save it as a .bat file on the desktop, launch the batch file and your program will boot!

answered Aug 17, 2018 at 4:45

Bold Warrior's user avatar

You could experience this error if you didn’t include the third-party libraries to the build.

The following can be placed in the build.xml just before the end tag of the project.

<target name="-post-jfx-deploy">
    <fx:deploy width="${javafx.run.width}" height="${javafx.run.height}" nativeBundles="all"
               outdir="${basedir}/${dist.dir}" outfile="${application.title}">
        <fx:application name="${application.title}" mainClass="${javafx.main.class}"/>
        <fx:resources>
            <fx:fileset dir="${basedir}/${dist.dir}" includes="*.jar"/>       
            <fx:fileset dir="${basedir}/${dist.dir}" includes="lib/*.jar"/>
        </fx:resources>
        <fx:info title="${application.title}" vendor="${application.vendor}"/>
    </fx:deploy>           

answered Feb 19, 2020 at 22:47

Yaw's user avatar

YawYaw

1561 silver badge4 bronze badges

Содержание

  1. Error invoking method, Failed to launch JVM. (UPDATE: Program crashes if game is installed on non-default disk) #9
  2. Comments
  3. Error invoking method. Failed to launch JVM #380
  4. Comments
  5. Basic Info
  6. Description
  7. Log File (optional)
  8. Error invoking method failed to launch jvm
  9. JavaFX application fail to launch with native exe bundle created with intellij ide #173
  10. Comments
  11. gse-demo Error invoking method / Failed to launch JVM #13
  12. Comments

Error invoking method, Failed to launch JVM. (UPDATE: Program crashes if game is installed on non-default disk) #9

I was getting these errors when trying to launch the program, so I ran it through a CMD and it outputs this.

Checking for Dark Souls install.
Checking for custom Steam Library directory.
Checking Registry for Dark Souls install.
Checking game version.
Exception in Application start method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$154(LauncherImpl.java:182)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at dscfgutil.view.DSCfgMainUI.checkDSVersion(DSCfgMainUI.java:1428)
at dscfgutil.view.DSCfgMainUI.checkForDS(DSCfgMainUI.java:1369)
at dscfgutil.view.DSCfgMainUI.initWindow(DSCfgMainUI.java:430)
at dscfgutil.view.DSCfgMainUI.initUI(DSCfgMainUI.java:384)
at dscfgutil.view.DSCfgMainUI.(DSCfgMainUI.java:376)
at dscfgutil.DSCfgUtil.start(DSCfgUtil.java:30)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$161(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$174(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
. 1 more
Exception running application dscfgutil.DSCfgUtil

The text was updated successfully, but these errors were encountered:

Источник

Error invoking method. Failed to launch JVM #380

Basic Info

  • I’m running Cryptomator on: Windows 7 6.1
  • I’m using Cryptomator in version: 1.2.0

Description

I get immediately after starting:
Error invoking method. Failed to launch JVM

Log File (optional)

[?:1.8.0_102] at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:153)

[?:1.8.0_102] at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:82)

[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:127)

[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)

[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)

[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)

[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)

[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)

[commons-httpclient-3.1.jar:?] at org.cryptomator.ui.controllers.WelcomeController.lambda$checkForUpdates$0(WelcomeController.java:110)

[Cryptomator-1.2.0.jar:1.2.0] at org.cryptomator.ui.util.AsyncTaskService.lambda$asyncTaskOf$0(AsyncTaskService.java:32)

[Cryptomator-1.2.0.jar:1.2.0] at org.cryptomator.ui.util.AsyncTaskService$AsyncTaskImpl.lambda$null$6(AsyncTaskService.java:89)

[Cryptomator-1.2.0.jar:1.2.0] at org.cryptomator.ui.util.AsyncTaskService.logExceptions(AsyncTaskService.java:118)

[Cryptomator-1.2.0.jar:1.2.0] at org.cryptomator.ui.util.AsyncTaskService.access$100(AsyncTaskService.java:19)

[Cryptomator-1.2.0.jar:1.2.0] at org.cryptomator.ui.util.AsyncTaskService$AsyncTaskImpl.lambda$run$7(AsyncTaskService.java:87)

[Cryptomator-1.2.0.jar:1.2.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

[?:1.8.0_102] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

[?:1.8.0_102] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_102]»>

The text was updated successfully, but these errors were encountered:

Me too .

Basic Info

  • I’m running Cryptomator on: Windows Server 2012 R2 6.3 (amd64)
  • I’m using Cryptomator in version: 1.2.0

Description

I get immediately after starting:
Error invoking method. Failed to launch JVM

Источник

Error invoking method failed to launch jvm

Would it be okay to ask you to ping me on Skype, and we can perhaps work through whatever issue you might be having? Seems like something new.
I’m Daniel.Garfield1

I’m also getting the same issue.

Using Windows 10 — 64 Bit
16 GB Ram
Intel i7-7700HQ CPU
NVIDIA GeForce GTX 1050 Ti and Intel HD Graphics 630 (built in).

I’ve updated Java, which was a pain in it’s own regards cause Windows 10 doesn’t like to work well with others.

For anyone who encounters this in the future, FYI: No need to update Java, as the game uses a bundled in JVM. So, your computer’s installation is unlikely to matter.

If anyone does want to hit me up on Skype, though, I’d love to solve this with someone in realtime.
Getting some meaningful debug output would help a lot.

Thanks very much to DapperPrinny, I have a workaround on this, albeit not a fix.
I’m currently reaching out to Valve for more information on this to pursue and easier solution.

For now, this seems to work:
1) Navigate to C:Program Files (x86)SteamsteamappscommonMetronomiconMetronomicon
2) Create a file called steam_appid.txt
3) Open that file, and paste, on the first line, just this: 416790
4) Save and close.
5) In that folder, there is an EXE. Double-click to run the game.

This should give you the exact same game/content as running it from steam would. I’m not sure yet why launching it directly From steam is failing (especially on just a small minority of machines), but I’m escalating that to Valve now.
A bit of a pain, but the game is fully functional, hooray!

Hm, possibly you’re having some other additional issue?
If you wouldn’t mind reaching out to me on Skype (Daniel.Garfield1), I’d love to debug with you in real time, if you’re up for it.

The same error to me, i created the txt archive with this ID and didn’t work, i transform into a .dll and didn’t work too.

My computer configuration:

OS: Windows 10 32 bits
ram: 3GB DDR3
CPU: Intel core 2 Duo 3.1Ghz
Video card: dedicated

I update the java version to 8, i newbie (maybe junior) in java development, would be the version? if a do i downgrade to 6.x or 7.x the game works? or is a error on calling the method?

Thanks for cooperation, i love this game!

The java version that the game uses is bundled in, so your local installation shouldn’t matter. Though, as a common thread, I’m starting to suspect it might.

I’m going to do some investigation, but if you wouldn’t mind helping, you can reach me on Skype at Daniel.Garfield1. I’d love to run some tests with you.

Update: After further research, it looks like this MAY have been introduced in Java 8, in the packaging code (which is something I cannot fix). However, the fix appears to be rolled out in Java 8, which is not easily compatible to this project.

A workaround which I BELIEVE will work appears to be:
1) Open a command prompt.
2) CD into C:Program Files (x86)SteamsteamappscommonMetronomiconMetronomiconapp
3) Create a file called steam_appid.txt
4) Open that file, and paste, on the first line, just this: 416790
5) Save and close.
6) Type: java -jar Metronomicon.jar to launch the game.

Note that I haven’t tried this, as the issue only happens on a smallish number of machines. But, based on what I’m reading, I believe that this MIGHT work.
Further note: This does require that Java be installed in advance.

Источник

JavaFX application fail to launch with native exe bundle created with intellij ide #173

I have build a JavaFX application which can be executed by its jar file. However if i try to run it using the native exe bundle i am receiving two popups:

Error Invoking method

Failed to launch JVM

and the application fails to start.

The Javafx application is build with intellij ide.

The config file looks as:-
[Application]
app.name=firecap
app.mainjar=firebase_product_listener.jar
app.version=1.0
app.preferences.id=firebase_product_listener_id
app.mainclass=firebase/product/listener/Main
app.classpath=lib/animal-sniffer-annotations-1.18.jar;lib/annotations-4.1.1.4.jar;lib/api-common-1.9.2.jar;lib/auto-value-annotations-1.7.2.jar;lib/checker-compat-qual-2.5.5.jar;lib/commons-codec-1.11.jar;lib/commons-lang3-3.5.jar;lib/commons-logging-1.2.jar;lib/conscrypt-openjdk-uber-2.2.1.jar;lib/error_prone_annotations-2.3.4.jar;lib/failureaccess-1.0.1.jar;lib/firebase-admin-6.16.0.jar;lib/fontawesomefx-8.9.jar;lib/gax-1.57.0.jar;lib/gax-grpc-1.57.0.jar;lib/gax-httpjson-0.74.0.jar;lib/google-api-client-1.30.10.jar;lib/google-api-client-gson-1.30.10.jar;lib/google-api-services-storage-v1-rev20200430-1.30.9.jar;lib/google-auth-library-credentials-0.20.0.jar;lib/google-auth-library-oauth2-http-0.20.0.jar;lib/google-cloud-core-1.93.6.jar;lib/google-cloud-core-grpc-1.93.6.jar;lib/google-cloud-core-http-1.93.6.jar;lib/google-cloud-firestore-1.35.0.jar;lib/google-cloud-storage-1.110.0.jar;lib/google-http-client-1.35.0.jar;lib/google-http-client-appengine-1.35.0.jar;lib/google-http-client-gson-1.36.0.jar;lib/google-http-client-jackson2-1.36.0.jar;lib/google-oauth-client-1.31.0.jar;lib/grpc-alts-1.30.0.jar;lib/grpc-api-1.30.0.jar;lib/grpc-auth-1.30.0.jar;lib/grpc-context-1.30.0.jar;lib/grpc-core-1.30.0.jar;lib/grpc-grpclb-1.30.0.jar;lib/grpc-netty-shaded-1.30.0.jar;lib/grpc-protobuf-1.30.0.jar;lib/grpc-protobuf-lite-1.30.0.jar;lib/grpc-stub-1.30.0.jar;lib/gson-2.8.6.jar;lib/guava-29.0-android.jar;lib/httpclient-4.5.12.jar;lib/httpcore-4.4.13.jar;lib/j2objc-annotations-1.3.jar;lib/jackson-core-2.11.0.jar;lib/javax.annotation-api-1.3.2.jar;lib/jsr305-3.0.2.jar;lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;lib/mysql-connector-java-5.1.49.jar;lib/netty-buffer-4.1.50.Final.jar;lib/netty-codec-4.1.50.Final.jar;lib/netty-codec-http-4.1.50.Final.jar;lib/netty-common-4.1.50.Final.jar;lib/netty-handler-4.1.50.Final.jar;lib/netty-resolver-4.1.50.Final.jar;lib/netty-transport-4.1.50.Final.jar;lib/opencensus-api-0.24.0.jar;lib/opencensus-contrib-grpc-util-0.24.0.jar;lib/opencensus-contrib-http-util-0.24.0.jar;lib/perfmark-api-0.19.0.jar;lib/proto-google-cloud-firestore-admin-v1-1.35.0.jar;lib/proto-google-cloud-firestore-v1-1.35.0.jar;lib/proto-google-cloud-firestore-v1beta1-0.88.0.jar;lib/proto-google-common-protos-1.18.0.jar;lib/proto-google-iam-v1-0.13.0.jar;lib/protobuf-java-3.12.2.jar;lib/protobuf-java-util-3.12.2.jar;lib/slf4j-api-1.7.25.jar;lib/slf4j-api-1.7.30.jar;lib/slf4j-jdk14-1.7.30.jar;lib/threetenbp-1.4.4.jar
app.runtime=$APPDIRruntime
app.identifier=firebase_product_listener_id

The packaged jar file is executing properly. the problem occurs when starting application with launching exe file. kindly tell me what could went wrong?

The text was updated successfully, but these errors were encountered:

Источник

gse-demo Error invoking method / Failed to launch JVM #13

Do you want to request a feature or report a bug?
bug?

What is the current behavior?

Issue with javafx tutorial when trying to build and run the native app:

$ mvn clean package
$ ./target/jfx/native/gse-demo/gse-demo
gse-demo Error invoking method.
gse-demo Failed to launch JVM

But then it seems to work after clearing, rebuilding and launching a second time:

rm -r -f ./target/
mvn clean package
./target/jfx/native/gse-demo/gse-demo

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

Following the steps of the javafx-packager tutorial:

$ git clone https://github.com/powsybl/powsybl-tutorials.git
$ cd powsybl-tutorials/javafx-packager
$ mvn clean package
$ ./target/jfx/native/gse-demo/gse-demo
gse-demo Error invoking method.
gse-demo Failed to launch JVM

Please tell us about your environment:

  • PowSyBl Version: powsybl-gse 1.3.0; powsybl-core 2.3.0
  • OS Version: Kubuntu 18.04.2 LTS

Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, spectrum, etc)

(if a question doesn’t apply, you can delete it)

The text was updated successfully, but these errors were encountered:

Источник

EDIT: Issue fixed in v0.944


Original response:

Thanks for the heads up! This was a very early project for me so it has a ton of old, poorly-written code, and the program often crashes when encountering unexpected configurations for DSFix, PvP Watchdog, etc. I’d recommend trying the following:

  • Make sure you’re using the latest version of the program, as the last release fixed a ton of crashes.

  • Install/run the program as an administrator, because some features may require admin privileges depending on your version of Windows and your UAC level.

  • If the other options don’t work, your best bet is to try removing any DSFix/PvP Watchdog files from your DATA folder, as a previous configuration could be causing issues. Most importantly, make sure the configuration files (DSfix.ini, DSfixKeys.ini, and DSPWSteam.ini) are deleted from the DATA folder before launching.

Unfortunately I won’t be making any more major updates to the program, because the code is a pain to work with and the Remastered edition of the game will be making the project obsolete anyway. That being said, please let me know whether you get it working! Again, I really appreciate the bug report.

Я разрабатываю настольное приложение, используя javafx v8.0.40. Я создал exe файл с inno 5. Когда я запускаю exe файл на своем компьютере, он устанавливается и запускается без каких-либо проблем. С другой стороны, когда я пытаюсь установить и запустить его на другом компьютере, в конце установки появится диалоговое окно окна: «Метод вызова ошибки», нажмите «ОК». Появилось другое окно, в котором говорилось: «Не удалось запустить jvm». Я искал весь интернет, но я не мог найти много об этой теме. Надеюсь, я получу решение этой проблемы.
Заранее благодарю вас.

4b9b3361

Ответ 1

Я столкнулся с той же проблемой; следующее работало на меня и помогло мне разобраться в том, что они взорвали «метод вызова ошибок». и «Не удалось запустить JVM»:

  • Найдите файл .jar
    • Он имеет то же имя, что и ваш проект, и он находится в каталоге установки приложения под AppDataLocal{ApplicationTitle}app (ярлык: введите% appdata% в проводник); если ваш проект был назван HelloWorld, там вы найдете HelloWorld.jar
  • Перейдите в каталог в командной строке
    • shift + Right Click любое пустое место в окне проводника и выберите «Открыть командное окно здесь» (это модный трюк, который я недавно узнал; альтернативно, вы бы cd в тот же каталог, используя командную строку)
  • Запустите .jar через командную строку
    • введите java -jar "HelloWorld.jar" и нажмите Enter

Tadah! Вот ваши скрытые исключения (существование которых «метод вызова ошибки» ) так смутно пытается связаться с вами). *

Если ваша проблема похожа на mine, это связано с различием файловой структуры между папкой проекта out и каталогом установки, и поэтому программа компилирует только отлично в редакторе и строит просто отлично — проблема не возникает до тех пор, пока она не будет построена, а структура файла немного отличается.

* Если вы не получили ничего, когда вы запускали его через командную строку, найдите любые ошибки, которые могут произойти во время этого метода initialize(); что, где ваша проблема, вероятно, есть. Вы можете выставить любые исключения во время выполнения, используя Диалог исключения всплывающих окон, как показано в аналогичной проблеме, здесь.

Ответ 2

Вероятно, это связано с тем, что в выходном банке не хватает зависимостей. Поэтому вы не хотите добавлять библиотеки в артефакт, а затем генерировать .exe должно быть хорошо.

Вот пример с Intellij, где библиотеки были перемещены вручную из «Доступных элементов» в артефакт

Пример Intellij

Ответ 3

хотя этот вопрос немного старый — сегодня я столкнулся с одной и той же проблемой и не смог найти решение, ищущее эти сообщения об ошибках, кроме этого.

Проблема в значительной степени идентична:
Встроенное приложение JavaFX (отлично работает на dev pc) с использованием java 8 и упаковано в собственный установщик (exe) с помощью Inno 5.
Приложение отлично работало на некоторых наших машинах — на других он не удался с точными сообщениями об ошибках:

  • «Метод вызова ошибки»
    и после нажатия OK
  • «Не удалось запустить jvm».

При запуске приложения загрузчик fxml загружает первый контроллер представления и вызывает его метод «initialize». Если — при инициализации — генерируется исключение из-под канделябра, приложение вылетает, и отображаются эти два сообщения об ошибках Windows.

Надеюсь, что это поможет тому, кто любит меня, тоже борется с этим.

Ответ 4

Ответ J.Dürr (ответил 8 июня в 9:58) помог решить мой метод вызова ошибки и не удалось запустить JVM-проблему. Я использовал следующий код для отслеживания проблемы, которая оказалась ошибочным путем для пути к файлу FXML:

public static void main(final String[] taArgs)
{
  try
  {
    Main.launch(taArgs);
  }
  catch (Exception e)
  {
    JOptionPane.showMessageDialog(null, e.getMessage());
    try
    {
      PrintWriter pw = new PrintWriter(new File("<somefilename.txt>"));
      e.printStackTrace(pw);
      pw.close();
    }
    catch (IOException e1)
    {
      e1.printStackTrace();
    }
  }
}

Понравилась статья? Поделить с друзьями:
  • Error invalidregistration fcm
  • Error invalidfont offendingcommand xshow
  • Error invalid zip file with overlapped components possible zip bomb
  • Error invalid winflash parameters
  • Error invalid username or password перевод