flatpak / flatpak-docs

Flatpak documentation
https://docs.flatpak.org
Other
78 stars 133 forks source link

Bring back the bundling a java app tutorial #17

Open allanday opened 7 years ago

allanday commented 7 years ago

We used to have a tutorial on bundling a java app, but dropped it when we moved the docs - the tutorial wasn't getting maintained and had got out of date.

We might want to bring the tutorial back, although we'd need to make sure that it got maintained in the future.

The latest version of the tutorial can be seen here:

https://github.com/flatpak/flatpak.github.io/blob/81bb006fd96b9a13170bd876316eb5a4eb48244b/source/bundling-a-java-app.html.haml.markdown

btreut commented 6 years ago

the tutorial wasn't getting maintained and had got out of date.

what exactly is out of date with it?

I find it very interesting as a template for some other Java app I would like to package in flatpak for endless OS. I'm a newby to endless/flatpak/containers, but I have some decades of experience with *ix and Linux ...

allanday commented 6 years ago

what exactly is out of date with it?

I can't remember exactly... if someone could run through the tutorial using the latest flatpak and runtimes, and let us know if they hit any issues or not, that would be really helpful!

btreut commented 6 years ago

I'll try my best, but I am a complete newbie to flatpak/containers/Linux namespaces, so give me some time.

Hello World is a little bit too simplistic to learn something and what I would really like to see as flatpak is (mediathekview, which has additional dependencies. I currently do not have any clue how to resolve these dependencies within a flatpak build environment. I know how to resolve them with apt on my Debian (siduction) build system, but I fear that these would not be available within the build environment.

See also the comments to the original pull request.

allanday commented 6 years ago

I've checked the old tutorial. Some of the things that would need to be changed:

ghost commented 6 years ago

Please could you explain how to bundle a software relying on Java with Flatpak by using a fat JAR in input? I would like to use Flatpak with Apache Ant in Java Native Deployment Toolkit: http://tuer.sourceforge.net/en/documentation/#jndt

Do I simply have to adapt the following command line?

flatpak build sweethome3d-flatpak cp -ra SweetHome3D-5.2/* /app/SweetHome3D

Is the symbolic link necessary? The .desktop file directly calls /app/SweetHome3D/SweetHome3D, is it intended? Where is used /app/bin then?