News for hackers. Stuff that matters.
Re:Fedora 29 by gepi79 on Tuesday October 30, 2018 @01:37PM (#18339252)
I switched from Fedora 28 to Ubuntu because I could not make my IDE (IntelliJ, Netbeans, maybe Eclipse too) recognize the installed Fedora JDK (no valid JDK found). It seems that this has been a common problem for years.
Re:Fedora 29 by eropple on Tuesday October 30, 2018 @01:38PM (#18339269)
If it couldn't find a JDK, it usually means you didn't install the appropriate `-devel` package. (This is consistent across RHEL derivatives.)
Re:Fedora 29 by gepi79 on Tuesday October 30, 2018 @01:42PM (#18339308)
It is a problem if the default JDK is useless and the solution requires research on the internet. I had even enough patience to search for more than 15 minutes AFAIR.

I have been using Windows and other Linux distributions including Arch Linux for years and never had problems with the JDK.

Re:Fedora 29 by eropple on Tuesday October 30, 2018 @01:47PM (#18339370)
You didn't install a JDK, though. You installed a JRE. (Ubuntu does this too, BTW - openjdk-N-jre versus openjdk-N-jdk.) If you Google "fedora jdk install" I get this page:

https://openjdk.java.net/install/

Which says pretty clearly: "The java-1.8.0-openjdk package contains just the Java Runtime Environment. If you want to develop Java programs then install the java-1.8.0-openjdk-devel package."

The standard package is to run software, not to compile software. Because most people who manage systems--hi--want to know what can be built on a system (and, more importantly, what can't be). You might not like that, and that's totally fine, but it's consistent and in my experience distros that have trouble with that (CentOS never, Ubuntu rarely, Arch rather often) quickly become ones I don't consider reliable.

Re:Fedora 29 by mamon on Tuesday October 30, 2018 @02:37PM (#18339973)
I think the issue here is the stupid name "OpenJDK" - everyone who has anything to do with Java development understands JDK to mean "Java Development Kit", and here those sneaky bastards give you a package named "jdk" but containing jre.

Would it hurt them to name the project "OpenJVM" instead?

Re:Fedora 29 by eropple on Tuesday October 30, 2018 @03:57PM (#18340748)
When I wrote that post I was thinking exactly that.

Honestly, were I running Debian/Ubuntu I probably would have at least called it `openjdk-N` and `openjdk-N-dev`, to match the other `-dev` packages, but...yeah. In this way I think CentOS/Fedora are a little more straightforward.

Re:Fedora 29 by gepi79 on Tuesday October 30, 2018 @04:30PM (#18341007)
In Ubuntu it is called openjdk-11-jre and openjdk-11-jdk. With headless variants.

I am no system admin and the -dev or -devel convention suits the Unix and C world but maybe not the JVM or .net or nodejs worlds with their own standards and package managers.

Re:Fedora 29 by eropple on Tuesday October 30, 2018 @04:50PM (#18341172)
How so? `java` is the JRE. `javac` is the JDK. `mono` (I forget the .NET Core executable name) is the runtime, `mcs` is the development tool. Node or Ruby or Python all have similar splits, too. Yes, they're interpreters, but you generally need the `-dev`/`-devel` package to compile things against your runtime there, too. Their package managers are orthogonal to this (but a failed Ruby build, as an example, will often tell you you need development packages for a library).

It's not about being a system administrator, it's about understanding what the things you're installing actually do. You need development packages to develop against, rather than consume, a package. I don't understand the criticism you're making here.

Re:Fedora 29 by gepi79 on Tuesday October 30, 2018 @07:36PM (#18342161)
Yes you are right.

But as a Java developer I know and I care about the terms JRE and JDK that are used officially and on Windows and many Linux systems and MacOS. I was not aware of the Fedora package conventions.

And as I already wrote, I had most likely installed jdk-devel because, I guess, it is listed in yum and DNF-dragora. Maybe it was a bug in some Fedora related package tool. DNF-dragora had double entries for Java. Unfortunately I do not remember anymore the details.

Someone replied this to me: "This is a fairly trivial problem to work around, although maybe this should be one of those "sane default" kind of things. Set the environment variable JAVA_HOME=/etc/alternatives/jre or point it at the specific OpenJDK version you want. That's what /etc/alternatives is for."

I guess that is way I tried "alternatives --config java" at the time.

Re:Fedora 29 by mamon on Tuesday October 30, 2018 @06:36PM (#18341849)
I might be wrong but my mind associates -dev and -devel packages with something that is provided for developers of the package itself, e.g., kernel-devel allows you to compile the kernel. I'm not going to contribute to OpenJDK project so why would I need openjdk-devel package?
Re:Fedora 29 by gepi79 on Tuesday October 30, 2018 @07:44PM (#18342198)
Good point, java-devel sounds like C++ headers and libraries and not like Java.

I do not contribute to the OpenJDK project or to the JVM either.

There are standard packages in the Java world: JRE (users) and JDK (java programmers).

The JDK is a standard set of tools and libraries related to using Java as program language. It is not a Linux distro or JDK distro specific set of libraries.

Re:Fedora 29 by dralley on Tuesday October 30, 2018 @11:51PM (#18343206)
Agreed. I find Fedora package naming vastly more consistent and sensible.
Re:Fedora 29 by gepi79 on Tuesday October 30, 2018 @02:00PM (#18339536)
Thanks. AFAIR I installed everything related to Java; maybe I made a mistake somewhere. I also tried to fix the problem with "alternatives --config java".
Re:Fedora 29 by jniedrauer on Tuesday October 30, 2018 @01:45PM (#18339341)
This is a fairly trivial problem to work around, although maybe this should be one of those "sane default" kind of things. Set the environment variable JAVA_HOME=/etc/alternatives/jre or point it at the specific OpenJDK version you want. That's what /etc/alternatives is for.
Re:Fedora 29 by gepi79 on Tuesday October 30, 2018 @01:48PM (#18339383)
Thanks for the solution. Although I have no Fedora anymore to check.