-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Stand alone .jar for Java 11 #149
Comments
I've managed to create a .jar that runs on Windows 10. Apart from Windows specific classes it requires some .dll files not mentioned in the JavaFX documentation. I tried just adding all the .dll files which worked. Now I just have to figure out which ones are actually needed. |
@sebastian-berlin-wmse I imagine we need to do so for each platform. I guess we can't package the platform-specific JARs together without there being conflicts, so maybe we need to go down the route with separate JARs. |
I just managed to make a JAR that works on both Linux and Windows (10 in a Virtualbox): https://github.com/sebastian-berlin-wmse/pattypan/releases/tag/pattypan-21-10-experimental-4-package-windows. It took some manual juggling to get all the correct files for both platforms. It works if you unpack the JavaFX JARs for one platform and then the other, telling it not to overwrite files. That is, there appears to be some classes unique to the Linux JARs and some classes unique to the Windows JARs that must all be included, but the classes themselves don't cause any conflicts. I noticed this was mentioned in the documentation, I must not have read it properly (emphasis mine):
I'll have a look at it tomorrow to sort it out with Ant. At least now we (hopefully) have a release that works on Windows. |
Now there's a PR (Kartkod#2) for automating the whole process. The only manual step is to download the OpenJFX ZIPs. The build file may be a bit WET with both Linux and Windows sections looking a lot the same. I still works, though, and I'm not sure how to easily reuse the logic with Ant, though I'm guessing there is a way. |
I'm going to do an upload with this to see if #145 is a blocking issue, otherwise, I'm going ahead with an experimental release. I might be able to do Mac later this week. Is there some documentation regarding which .ddl/.so files are actually needed from OpenJFX? Or is it a matter of trial and error? |
The only documentation I found was on https://openjfx.io/openjfx-docs/#install-javafx, at the bottom. It doesn't mention the extra DLLs, though it's only for simple example project. Linux worked without having to add anything more than is mentioned there. When I ran it on Windows I got an error about missing dependents. It didn't say which ones before I ran with debug, though. I.e. something like this |
I didn't run into any serious issues so I'm making an experimental release to get some additional feedback/data while working on MacOS packaging. One thing that's broken(and might have been broken in the past) is the opening of files on Linux, for example, clicking the "log file" link results in Pattypan freezing until one kills the process. Another thing I noticed is that while I packaged it with the Linux x64 it ran just fine on ARM although it failed to load some .so files. Maybe this means that all the files mentioned in the OpenJFX installation guide aren't actually necessary. |
The following builds and runs on Linux, now I just need to pick up a Mac and test it, possibly tomorrow. Would you be able to check if it didn't break Windows? Considering positive reports from the last experimental release, if this is confirmed to work on MacOS we got ourselves a release! |
I did run into this when (with the log file) before working on the packaging.
That's possible. I only added things that were missing and haven't tried removing any libraries. I can see if we can drop any of the ones included now.
Yes, I'll try it in my Virtualbox installation. |
Still works for me. |
I would be surprised if it originated from packaging, I'm still finding issues caused by the Java 8->11+ migration, I wouldn't consider it blocking anyway.
Awesome! |
It runs without libdecora_sse, both Linux and Windows. The rest seems to be used. I didn't do an exhaustive test for each individual file on both platforms. I'm worried that I could remove something that still works on my machine, but not others because there are different versions of some libraries. Here's the PR: Kartkod#5. |
Thank you! I was able to do the same on Mac. I built it for Intel-based Macs and assume it works on later architectures as well. I'm making an experimental release with the intent that this one will be promoted to stable on Monday! |
I managed to get the log link to work. Apparently it was a Linux only thing. PR: Kartkod#6. Not directly related to this issue (even if it's mentioned), but I was to lazy to make a new issue for it :) |
Pattypan 22.02 is now available! |
Future improvements to packaging are covered by #152. |
Continuing the issue with creating a .jar from #138.
The text was updated successfully, but these errors were encountered: