New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin-configuration when using JPMS / JDK9+ #346
Comments
Found this: Is there a list of all bundlearguments? |
I now did this:
Assuming the module is found, this is the result: [INFO] Add C:\Users\chbartel\IdeaProjects\C3-Client_Phoenix\target\jfx\app\run.cmd file to application resources. |
Hi! Got it working now. Pointing the module to the target path did the trick. I kind of assumed I had to point to the sources... which is... after all... kind of obviously not the case. |
:) this kind of issues are cool ... sorry for the delayed feedback, but glad your could help yourself. |
Too fast to celebrate. It build all fine without errors and I can install everything. Unfortunatly, running the installed app does not do anything. I can start the jar manually, but the exe and the shortcut do not work... :( |
With this:
It still bundles the runtime into the installer. And always when I start the installed app, nothing happens. Can I make the app give me a log somehow? I have no idea what is wrong. |
Ok, I can accept the runtime being bundled. That has a good aspect to it and I do not really mind the filesize. But the resulting exe not doing anything is of course... bad. |
I have a deal with such problem too. So, I recommend to do several steps to investigate problem:
I hope this steps should help you to investigate problem. |
I will try. I found that in the cfg, the classpath is empty: [Application] [JVMOptions] [JVMUserOptions] [ArgOptions] Maybe that is ok, because it is a module, but I am not sure at all. I have checked for crash dumps, log files, console output... anything I could think of. But the thing just does nothing at all. Oh, and I had the main method already in my code. I have enabled javafx.verbose (found that in some Thread), but there is no difference whatsoever. %ERRORLEVEL% after execution of the exe is: 0 UPDATE: Remote debugging did not work. Connection refused. I have the feeling, the exe is already closed when I start the debugger... |
I have println outputs in my code on the first line of the main method. Nothing comes up in the console. It does not even get there! This drives me nuts! There is NOTHING anywhere telling me what is missing. I am considering to abandon it all together, provide a runme.cmd and get on with my live. I do not even see a process in process-explorer when I start the exe... |
Running with verbose=true, I can see it bundles allright... but there are two lines stating that the module does not exist... despite the fact, it does find it and works with it: Running [C:\C3\tools\wix311-binaries\light.exe, /?] This is so extremly frustrating... |
Running the exe with > out.txt produces an empty file (0 kB). No output there as well. |
;) sometimes it's funny how my very own SO-answers are still valid and quoted. @WarWolfen the linked repo, is that something I can use for reproducing? https://github.com/ClanWolf/C3-Client_Phoenix |
Sure, that is the project. All my fiddling and mindblowing failings of today are not in there as I cannot push from where I am now, but the status has not changed. It did not work this morning, it does not work now, after hundreds of iterations and trial-and-error attempts to achieve anything... just something. I am completly frustrated with this and probably abandon the whole project. It is just not worth the time... Off topic: |
The version that is checked in now does not start anymore. It does build, however... and the installed version does not do anything (as mentioned above). But on top of all that this version does not start at all... because of: Error occurred during initialization of boot layer What the hell does that say? I did not change anything about maven. NOTHING! |
Related issue with this project: |
Was the problem reproducable? |
I replaced log4j (which refused to work with jigsaw) with java logging, added some logging to the sources... no output whatsoever. |
Anything not alreay being released? |
Hi! EDIT: |
Automatic modules not possible for jlink? I need to use commons-collections in my app. Does that mean I cannot package it with javafx-maven-plugin (as in: https://stackoverflow.com/questions/46882108/how-to-find-automatic-modules-with-javapackager) |
Ok,after all searching and fiddling, I have decided to switch to NSIS. I have created a batch starter to check for installed Java versions (checked in). Thanks for the help, but this can be closed, I guess. |
hm ... I didn't even got the chance to have this analyzed, due to missing mvce ... just add some comment to this issue-thread to have this re-opened. It sounds more like an issue of the |
Oh, it does compile for me. What do you miss? I can sure switch back, but I understood that jlink will not work with automatic modules. |
The original issue was, that something with the JPMS did not work, but it seemed your found your way, but it was followed by a problem running the native EXE launcher, at least that's I understood. Having a problem with the native launcher/EXE-file in combination with JPMS sounds like a tricky bug, but as I'm not being able to re-create this issue, the project you linked could not be compiled on my machine, eans this bug might still be existent. |
The issue is still there in the project as it is checked in now. It is in a compiling state now and as I understand it should compile for you as well. What does not compile on your end? |
The C3-Preloader-Lib is not publically available, tried with latest online repository. |
Have you
The problem is not related to the preloader, I have tested that before. |
Debugging inside a minefield, where everything could be the problem, is not that easy. Can you provide a non-living project where I can produces this issue?! "Minimal, Complete, and Verifiable example" |
This is a minimal example. It is actually only one empty javaFX window with the title "Hello world". There is no way of making it smaller (only thing is to delete the preloader line from the pom): |
Nor is it minimal (as it includes a lot of dependencies and code), nor is it reproducable (preloader not being public). Putting that aside, I checked the problem and came to a conclusion: the
Tooling around I got a stripped down code-part working using this bundleArguments: <bundleArguments>
<installdirChooser>true</installdirChooser>
<module-path>target/classes</module-path>
<module>net.clanwolf.c3.client/net.clanwolf.c3.client.MainFrame</module>
</bundleArguments> Can you check that on your side that this resolves your missing window? |
Thank you very much! I will check this. |
I have tested and you are right, the class was missing. It started allright. I still probably end up not being able to use it, because jlink will not find automatic modules. I am not sure about that, but the build fails if commons-collections is in the project. The problem is, that documentation about everything is spread all over the web and finding the relevant pieces is not at all easy. Do you have clear information about that? Can this work with automatic modules after all? |
Found this that might be usefull to modularize the automatic modules: |
JLink requires all modules to be explicit, automatic modules are not supported (and yes, this makes JLink pretty useless ...). The whole java community is discussing the consequences, especially legacy-support/mixed-support is totally confusing. Some parts I found by searching the internet about this: https://stackoverflow.com/questions/48408454/java-9-generating-a-runtime-image-with-jlink-using-3rd-party-jars A "solution" might be to have a project, where you "inject" the required As the original issue was the module-configuration, I hope you are okay that I'm closing this issue. Feel free to put any feedback or solutions you found back into this place :) maybe others will find it helpful too. |
Thank you very much for your help. I have set up a NSIS for deployment. Eventually, the other libs will become compatible and things will be sorted out. |
Hi!
I am new to Java 9 / 10 (Jigsaw) and I am porting my project. After fiddling for some time, I now can compile the thing. I am using this:
It works fine until it tries to run WiX. The error there is:
Module does not exist.
"Adding modules: [] to runtime image."
Exception: jdk.tools.jlink.plugin.PluginException: java.lang.module.FindException: Module not found
That leaves me kind of helpless. Where would I tell my thing what the module name is? I have a module.info.java and the structure is correct (at least, it compiles ok).
Thank you for your help!
Addition:
There are no automatic modules in the project, just my (one) application --> one module.
Here is all of it:
https://github.com/ClanWolf/C3-Client_Phoenix
Structure is this:
module-info.class might not be found at build time... (?)
(May be similar to this: https://stackoverflow.com/questions/49162252/jlink-not-finding-module-info-class)
The text was updated successfully, but these errors were encountered: