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
Support for current JDK 9, JDK 10, JDK 11, JDK 12, JDK 13, JDK 14, JDK 15, JDK 16 ... #287
Comments
For some reference: https://cwiki.apache.org/confluence/display/MAVEN/Java+9+-+Jigsaw |
Any news on Java 9 support for this plugin? |
+1 from me on this one. |
Anyone who is interested of testing the current snapshot-version ( <pluginRepositories>
<pluginRepository>
<id>oss-sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>com.zenjava</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>8.9.0-SNAPSHOT</version>
</plugin>
</plugins>
</build> It was required to remove some MacOSX-workaround (had to delete it making it compile), but i doubt this feature was used a lot (will wait for feedback on this one). This was compiled using JDK 9, but I hope this does not create any trouble for you. As there are no special options for setting the new JDK 9 module things, please use the generic <bundleArguments>
<!-- "--module-path" -->
<module-path>PATH_1;PATH_2;PATH_3</module-path><!-- use File.pathSeparator !!! os-dependant -->
<!-- "--module" -->
<module>module1,module2,module3</module>
<!-- "--add-modules" -->
<add-modules>module1,module2,module3</add-modules>
<!-- "--limit-modules" -->
<limit-modules>module1,module2,module3</limit-modules>
</bundleArguments> For all the developers using the Hoping for your feedback, thanks a lot in advance and sorry for over four month of delay after official JDK 9 release. |
Great! Works - almost (my custom icon is not included anymore, works in 8.8.3) |
Thanks @FibreFoX for all your work. I really appreciate your efforts! I did give I am on Windows7 (64Bit) with latest InnoSetup v. 5.5.9. While running Since I do not know how to give you additional information I uploaded the test project on github. I did try the same project with Java8 and it works fine. Hope this helps to identify the issue, Thanks! Note: I tried to compare a bit what gets created with JDK8 vs JDK9. |
@TapaniRundgren @danielpeintner thanks for checking the latest plugin, seems that I broke something important, or javapackager is expecting something different. Let the search begin ;) will report back after success. EDIT: I think I found the problem, lets tinker around .... // (Open)JDK 9 - WindowsAppImageBuilder
Files.copy(new File(srcdir, fname).toPath(), new File(appDir.toFile(), fname).toPath()); // (Open)JDK 8 - WinAppBundler
IOUtils.copyFile(new File(srcdir, fname), new File(appDirectory, fname)); seems a bit complicated, I get a one "java.nio.file.NoSuchFileException" entry, and all other entries inside this (the only one) The real difference here is, that considering some SUBFOLDER not being created ... lets say "lib" .... makes the whole thing explode. Sorry if this hurts your feelings but ... what moron..... |
After digging into it, there is a huge problem within the JDK and the bundlers: they are deleting anything before bundling. Makes it a clean solution, but makes it impossible to pre-create the required folders...
This requires to be reported ... and no JDK 9 support is possible without some fix from Oracle/OpenJDK/OpenJFX. EDIT: this is only breaking for Windows-bundlers (and there is no workaround possible ....), but mac- and linux-users seems not affected. Got this reported: |
let me know now how we can build with java 9? same issue reported me as danielpeintner. is there anyway to will create build with java 9? |
Hi @Aashishkapadiya , as you can see from my last comment on this issue, that building java 9 packages is currently NOT possible with this plugin using windows, because of some bug inside the JDK/javapackager. However, it should be possible using Linux or MacOS(X). I really have to wait for OpenJDK/Oracle-Team having fixed that bug. There is no workaround possible right now, as the target-folder will be deleted recursivly before using inside the javapackager (I hoped to have this working, but it didn't). |
This seems to be working with JDK 10: Hopefully this will get backported to JDK 9 🤞 |
@FibreFoX JDK 9 is transitive release with short term of life and looks like JDK 10 will be released this month (see schedule dates). So, how about close this issue and open new for check compatibility of javafx-maven-plugin with JDK 10? Looks like most of problems described above has been fixed their. |
@maxd thanks for the hint for JDK 9 EOL, wasn't sure about this. IMHO this is a real public-relations desaster, maintainers are now forced to make updates more often without proper long-term support. But anyway, this is the new way, so let me some time to check this against JDK 10+ |
The current SNAPSHOT-version respects JDK 9 + 10. |
I'm a little out of date but as I recall my issue with JDK 9 was not being able to |
Thanks for the rant @ctipper , which isn't that helping, but maybe you might have looked into the progress of JDK9 and JDK10+, where the future of JavaFX and javapackager has changed A LOT. Starting with JDK11/12 it is uncertain, if javapackager still be inside the provided JDK by oracle. This open-source project is open for your own customizations, so if you really had the urge to "make it built", why didn't you fork and use it? Have you even tried the available SNAPSHOT-version? Meanwhile, while having my first days at a new job right now, my progress on the distribution-bundle-plugin-for-maven is a bit cold, but will get some progress the next days, which is kinda some lessons-learned and "reducing dependency to javapackager". You can read my position to the whole project here: FibreFoX/javafx-gradle-plugin#119 |
Yes Yes and yes. I have tried all your suggestions with no success. I am sure packaging is very useful, but solve one problem at a time, I can't even run anything to see if it works. |
First of all EDIT: This does not mean that this plugin is discontinued for JDK 8, but as I'm out of available free time (still some spare-time project for me), and I'm not getting paid for doing this, please try to understand. |
Ok I'll cool off, I was really using this project as an alternative to the
maven exec plugin, it's useful being able to run a separate instance of the
VM, exec plugin doesn't allow the add-opens clauses I require (app depends
on guice), and neither does this plugin currently. If it really is more
focused on packaging then I am labouring under a misapprehension. Packaging
with ant is really familiar so I will eventually have to explore that. But
my basic run debug cycle has not really been available to me since the
Jigsaw development cycle and I guess my frustration boiled over. And now
Java 10, it's all leaving my app behind.
EDIT: apologising again I found a way to get the exec plugin to do what I want, slightly inconvenient that I need to run a packaging step first, but it seems I am trying to do something unorthodox so documentation is weak.
|
Working great on JDK10, I had some issues with JDK9 but since that is out of support I am not worried about that. Question though; how can I include the Java executable in Java.runtime/Contents/Home/bin? |
Confirm that it works with jdk 10 when I set |
javafx-maven-plugin is giving me a hard time transferring our JavaFX application to Java 10. |
We are using this plugin for a while and it worked great for us with Java 8. Thanks for your work indeed! Recently, we have decided to move to Java 10 and I am trying to migrate the build but without success so far. I am using 8.9.0-SNAPSHOT., Oracle JSDK 10.0.2 64-bit. Maybe you can give me some hints. I am building for Windows 10 on the same OS and this is what I am getting.
Any ideas what can be an issue here and how it can be solved? |
You must follow the SNAPSHOP repository prerequisite as explained on top :) <pluginRepositories>
<pluginRepository>
<id>oss-sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories> |
Currently, with the latest SNAPSHOP and openjfx 11 and openjdk 11 the plugin doesn't work due it's calling an unexistent class that has been removed from the openjdk 11 release (IMO):
|
This plugin currently just works for JDK 8 ... :( and I really hate the situation as it is ... (not that people do complain, but more like me finding not much time anymore ... it used to be fun to work on this spare-time-project) |
OK, I understand you, don't worry and thanks for your very fast answer :) For now, I will use the official openjfx maven plugin but's it only generates .jar executable, doesn't generate native exe (or I don't know how) :( Thanks!!, awesome work!, maybe in the future I'll have time to help you with a pull request ;) |
As there are a lot of internal changes inside the JDK 9, this maven-plugin has to be made compatible.
Most notable changes are the added options for java-module and different locations of some packager-classes (which are located inside
${JAVA_HOME}/jmods/jdk.packager.jmod
) and the classes for UserJvmOptionsService (now inside${JAVA_HOME}/jmods/jdk.packager.jmod
)The text was updated successfully, but these errors were encountered: