JavaFX Nested Application Works with Non-English Arguments: "Cannot Start JVM"

I have a problem running a simple JavaFX application. I use my own package for building exe. I want to start the application from the context menu of the Windows file, but when I try to start the application with the parameters:

> JavaFXApplication1.exe ąęć 

and I get 2 errors:

1) enter image description here and after clicking "OK"

2) enter image description here

When I run the application as a jar file:

 > java -jar JavaFXApplication1.jar ąęć 

The app started with academic performance and works great.

Also, when I launch the application from this command:

 > JavaFXApplication1.exe aec 

everything is fine and the application is working fine.

Example application code:

 package test; import javafx.application.Application; import javafx.stage.Stage; public class Test extends Application { @Override public void start(Stage primaryStage) { System.out.println("Started"); } /** * @param args the command line arguments */ public static void main(String[] args) { System.out.println("Args count: " + args.length); launch(args); } } 

Ignore, this application does not close.

I think this is exactly the same problem as described here: https://bugs.openjdk.java.net/browse/JDK-8133034

Has anyone resolved this? Or is there someone who knows a workaround for this problem? I tried java versions from 1.8.40 to 1.8.72, but this failed on every JVM. This is also not an environmental problem, because I tested it on two different machines (as well as operating systems).

I would appreciate any help.

+5
source share
1 answer

Problem Jira mentions in a comment that this is a regression starting the JDK version of 8u40b06. If possible, one solution is to use an older one. Try 8u40b05.

At this point, perhaps you can store all the arguments of the command in a file (with a name in ASCII characters) and pass the location of the file as an argument to read the actual arguments of the application.

Another workaround (last resort?) Is to pass characters as escaped Unicode. See Converts a Unicode character back to a real character . Although, admittedly, this is an ugly and tedious thing.

0
source

Source: https://habr.com/ru/post/1236040/


All Articles