Installing Openjdk

What about java and openjdk?

No support for system-wide installation at the moment, but you could always unpack the JDK into ~/jdks or similar.

This is probably unhelpful, but we do actually ship with a JDK inside the Endless Flatpak runtime:

OpenJDK Runtime Environment (build 1.8.0_102-8u102-b14.1-1~bpo8+1endless1bem1-b14)
OpenJDK 64-Bit Server VM (build 25.102-b14, mixed mode)

so if you
flatpak install eos-apps net.sourceforge.Frostwire
then
flatpak run --command=bash net.sourceforge.Frostwire

That’ll drop you into a shell inside the Frostwire app’s container that has access to Java. We’re soon going to be upgrading to a newer version of flatpak that’ll get you inside the runtime directly, which may be a bit more usable. This may be less useful to you than just unpacking into your home directory but it’s worth mentioning.

The Flatpak website has recently been updated and may be worth a look if you want to know more: http://flatpak.org/

how can I create another flatpak package using the same runtime?

Or better: where can I find the SDK with which I could create a new flatpack package based on the same runtime? I have a Debian (Siduction) system ready, where I could build a package, but I ask myself, how to start with.

Is it this one the right SDK: https://github.com/endlessm/eos-sdk

Bernhard

That would be a different one — the runtime that @Nick_Richards was talking about is built internally. You could make a flatpak package from it, but it would be difficult to publish.

Since this thread was last posted on, there have been a number of developments including Flathub. I recommend taking a look on Flathub to see what other applications are based on Java, then taking a look at how they build and publish.

@btreut first things first, make sure you have flatpak on your dev system: https://flatpak.org/getting you’ll need the latest 0.10.x branch so make sure you’re using debian backports if you can.

Once you’ve got that, you’ll need to add the flathub remote

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

and run:

flatpak install flathub org.freedesktop.Sdk org.freedesktop.Sdk.Extension.openjdk9 org.freedesktop.Platform

The easiest way to build your software in a flatpak package is to use a manifest file. Here’s an example of PyCharm, which is a java app that uses the SDK. You’ll see that you get access to the SDK ‘for free’ during the build process, but in order to use it within an app you need to run the ‘install’ script, which copies Java into your apps container.

There’s more documentation about how to use flatpak available on the website, and if you have issues with the JDK please file bugs. The Java ecosystem in flatpak is a bit immature but it should still be pretty easy to make progress. Personally I’d love to have a tool that wrapped maven in the same way as we have for NPM or Pip here, I think that would probably help.

Siduction has flatpak 0.10.2.1 and flatpak-builder 0.10.6, that looks pretty recent. Is it ok?

yes, I found and know this website. I found specially useful this one: Getting Started - Flatpak documentation

I have more than two and a half decades of Unix/Linux experience and even more with other OSes. I encoutered endless OS preinstalled on a Acer Notebook and I find endless OS quite appealing, but I never used flatpak/docker/snap and therefore I appreciate any help in getting the stuff running I am used to without having to deinstall/replace endless OS by a more common distribution …

The app I currently would like to use is this one: GitHub - mediathekview/MediathekView: Das Programm MediathekView durchsucht die Online-Mediatheken verschiedener Sender which has besides OpenJDK the following requirements: flvstreamer and FFmpeg for recording and VLC for playback. FFmpeg in turn has some more depenencies.


Bernhard

Hi there - looks good! I would encourage you to investigate the other repos available on flathub git. There’s a VLC one which you could base off, and plenty of apps use ffmpeg. I’m not really a Java expert at all, so I’m not sure how complicated building or using gradle is but I’d certainly encourage you to drop by #flatpak on freenode IRC which is well populated and has plenty of people who know more than me ready to help.

Oh and yes, those are the latest releases of flatpak and flatpak-builder, have fun!

Hi Nick,

thanks a lot …


Bernhard