-
Notifications
You must be signed in to change notification settings - Fork 23
Exe generated by the plugin on windows 8 is not running #88
Comments
Most likely you have an exception, you need to check the output. By default, you will find a log here: target\client\x86_64-windows\gvm\log, search for the RUN task logs. Another option is to launch the executable from a command prompt and redirect standard out and err to a file: target\client\x86_64-windows\hellofx.exe > out.txt 2>&1 Yet another option is to use the java logging framework and log to a file instead of console. |
Thanks @jperedadnr, No logs. I've redirected the exe output to out.txt. The file is empty after running the program. To clarify, I am able to generate the exe file and logs are appended to the client-debug0.log file. The weird thing that I am able to generate and run a more simple sample. But when using TableView it is not working. Kindly please note that in #89 I've provided all details including source code and pom.xml. |
Can you add See if you get more output in the client-debug.log file. |
I'm doing so right now. BTW, I was not running it via mvn client:run command. I simply double clicked the exe file or executed it via cmd shell. (So no logs are expected in this case, am I right?) Another question would be |
Right, gvm/log is only enabled if you run with If there are build errors, you won't get an exe. |
Here is the result when mvn client:run issued. The same with mvn client:link client:run
|
there you go: Explanation: you are using FXML in your project, that uses reflection. All classes that are called reflectively have to be added to the reflectionList. See https://docs.gluonhq.com/client/#_reflectionlist The plugin already takes care of most of the JavaFX classes, but some of them are still missing. Simply fix: add this to the plugin. You will need to run
|
I'm not using reflection nor fxml. Here is the code snippet from #89
|
Well, right, you are not using FXML (my bad) However, JavaFX does use reflection in this call: The proposed fix still applies. |
I'm testing the fix right now, If so, I will continue the rest in #89 since It has yet another part which is unresolved. |
OK, the program is now running. However, it crashes when I do some scrolling over the table data then clicking a row (I am not sure if the reproduction steps are like this actually) Note:
I'm just confused. |
The same procedure applies: you need to see the logs, you will find an exception at some point. If it is a class not found exception, add it to the reflection list and build all over again. |
Here are logs for last 3 executions with at least one crash [Tue Jun 09 22:29:26 IRDT 2020][INFO] ==================== RUN TASK ==================== |
I've found that it rarely happen when running via mvn client:run command. But it is very likely to happen when double clicking the exe file. (Can't log this?) |
I mentioned it above: open a terminal and run:
|
Yes you were. Now I did it. no logs when crashed. The out.txt file is empty again. A hundred percent of times it crashes when running directly via terminal as above or double clicked. 99% of times it works fine when mvn client: run. |
So, redirecting output when executed normally (without mvn client:run command) results in an empty log file. No logs on the console or the log file. Again when mvn client:run is issued, rarely crashing (only one time) and no error logs (all FINE if any) |
I faced similar issue too. |
@zrb80 see #88 (comment) |
Thanks @jperedadnr, The Java logging framework is good. |
Setting up the log framework might not be straightforward. Without it, can you just add |
client-debug0.log |
I see it works for 23 seconds, so it might crash at some given point? Maybe when you access some view or click on some action? Could you guess which one? Probably wrapping that node/action with something like:
might not work at all, but it's worth trying? |
OK, that's good, it gives you the reason why it fails: the class |
I added. But when building the project, an error comes out. |
I understand that this is a similar question. Just need to wait for the fix. Right? |
@jperedadnr , thank you for your help! Thank you for helping me figure out how to work with debugging in the project. Debugging actually works. I will wait for a solution to the issue of the correct work of the native-image application using Apache POI. |
Just so same, confusing problem. 100% runs via |
@Plantrek See if you can apply some of the suggestions in this thread. |
Hi there,
This is related to #89 but not the same.
Using the client-maven-plugin version 0.1.27 I am able to generate an exe file for a very simple sample which is consist of an HBox with a button all inside a StackPane as the root pane of scene.
However, the exe when launched does nothing. No error even if you run it from a command shell (cmd). Simply nothing happens. I've check the task manager, no process is forked or it is so fast terminating which is not visible on the task manager list of processes.
My machine settings are:
Windows 8
openjdk version "11.0.1" 2018-10-16
graalvm-ce-java11-windows-amd64-20.2.0
Here are the important sections of my pom.xml file:
Would you please help me on this?
The text was updated successfully, but these errors were encountered: