The problem of installing openjdk in opensuse when you think you installed openjdk but when you do a javac -version or call javac from commandline it just doesnt work

Well if you think of quickly installing openjdk 8 with zypper like this in commandline is gonna be enough:

# zypper se java-1_8_0-openjdk

Your actually just installing the JRE despite the name of the package which is likely to confuse anyone not familiar with opensuse, as it did me earlier, in defense of opensuse though, you can see why this is a problem is if you do a search with zypper and pay close attention to the packages and their corresponding summary definitions

So if you want to install the openjdk and develop java apps with it, you have to install the openjdk-devel package with the version you want to use, in this example its openjdk 8:

# zypper in java-1_8_0-openjdk-devel

now you can try: java -version and javac -version , and get output like this, whereas you would have gotten the cnf command not found if you tried javac -version if you installed just java-1_8_0-openjdk , as its just the JRE , anyways as with other java installs there is no need to install the JRE version as installing the openjdk-devel the true openjdk package in opensuse, already contains a JRE so you can just do the following commands

- Nevertheless the naming convention of the package is still confusing, especially for people new to opensuse, they should just rename the openjdk JRE to openJRE or something, so even on quick glance its self explanatory

Others have complained of the confusing package naming of opensuse like in this blog: thehumble.ninja - A Quick Review of OpenSUSE Tumbleweed! (2015)
an excerpt from this blog
"My only MAJOR complaint is the package naming and development packages. It’s FRUSTRATING hunting down each package, truly a nightmare compared to other distributions."

NOTE: However if you have multiple implementations of Java, when you want to select your preferred java implementation or switch to the one you prefer.

Select which multiple implementations of JRE and JDK and even Java Web Browser Plug-in installed then you can select which one to use with the update-alternatives commands below: