That’s great, I can see them within the terminal, but the flatpak installation of Intellij-IDEA doesn’t seem to be able to browse there. Typing the file paths in by hand also results in an error, saying “specified path cannot be found”
When you say Flatpak uses it’s own java package, does that mean that if I’m using a flatpak application, I should only use the flatpak installation of the JDK?
Using the JDK from flatpak, rather than from the java11-basic swupd bundle has resulted in a location I can use from the intellij-IDEA application.
So having it working is great, but I would like to understand why it’s working with the flatpak version but couldn’t find it when I installed the java11-basic bundle from swupd.
Flatpak is a sandbox, so it contains all you need to run your app.
You can find where is installed with flatpak info com.jetbrains.IntelliJ-IDEA-Community or the name of the Intellij-IDEA you install. Look for the Location: tag.
There you will find files/extra where the jre is installed.
I ran into the exact same problem. I spent an hour or two on it before I realized that IntelliJ was in its own sandbox, which made my dev process almost impossible. Maybe that will work for some…but not me.
These instructions, though old, basically worked for me:
There is even a command to have intelliJ create the .desktop file for you so you can have it on the panel and everything.
I just downloaded the regular IntelliJ bundle and put it in my user directory and it performed as expected. Well, actually, it performs orders of magnitude better than on Ubuntu, and now my dev environment is quite nice. The flatpak stuff is great, but for things like an IDE I am not convinced it is the right way to go.
Ah ok, so this will contain the runtime, to actually run the application… but not the SDK which will be required within the application to build software.
I will spend some time going through the Flatpak documentation to get a better understanding of what happens with these applications, how they are structured etc…
I really wouldn’t waste any time with the flatpak…Well, at least I didn’t have the spare time to mess with it. I’d need to configure the flatpak environment to mirror the actual system environment I had already configured. Things like the terminal in IntelliJ are sandboxed, which is beyond frustrating. Installing the Native Terminal IntelliJ plugin didn’t help either. Basically, dealing with the sandboxed IntelliJ is probably one of the more frustrating experiences I have been through.
I installed the dart-sdk but I cannot get vscode to find the directory it is in because of the sandbox.
Flatpak for deploying an application with fixed resources is fine but and IDE like IntelliJ or vscode cannot function in a sandbox unless you can define external resources. I looked at the flatpak documentation but could not get overrides or --filesystem=path-to-dart-sdk to work.
I also need the golang tools installed in vscode so that is more complexity again!
I have tried for hours to get vscode to find dart-sdk now I am uninstalling vscode and installing it outside of flatpak. I will have to do the same with IntilliJ, my normal IDE for Java development.
Does anyone have a solution that can be applied across all flatpak applications like this. We cannot be the first people to find this issue.
For anyone reading into the future, you can do flatpak info org.freedesktop.Sdk.Extension.openjdk11 -l to see the contents of the flatpak on your drive. Then, open the directory (/var/lib/flatpak/runtime/org.freedesktop.Sdk.Extension.openjdk11/x86_64/20.08/665cbc1191486ce7ca70dddd3cdf18563c874aff95fda0cd2ece28395119bd57 in my example) to get where it installs JDK inside of flatpak. In my case, it was /lib/sdk/openjdk11/jvm/openjdk-11.
Alternatively, you can just install JDK using your distro’s package and let the IntelliJ flatpak access that JVM by creating a hole in the container (use flatseal).