It's true that you have a JDK, but it is not in the RPM database, which is used by yum and other similar automatic package managers to know what packages are installed and get there respective versions.
The best solution may be running
sudo yum install jdk so you can get a version with yum and rpm.
You can also consider following its suggestion to add the
--skip-broken option, however it shares the problem with the second point in P.S.
rpm -Va stuff may help RPM find missing packages and files. If you believe that you installed Java with RPM, try it.
P.S.: At first I considered creating a dummy package like what dpkg users may do, however:
- It's quite complicated to make a package under RPM, since you will have to write a long spec. RPM also uses the file list to look for library dependencies, so you have to give it quite a long file list.
Possible workaround: Automatic
%files generation with
find and a lot of shell.
- Even though you completed making a dummy package and installed it, your package is quite likely to be unable to find your java, if it uses some hard-encoded logic to navigate to the Java installed by the jdk package. (Most packagers don't use a weird directory like
/user, and if you are unlucky enough to find a package written by a guy who doesn't know any
Possible workaround: symlinking.
It seems that the package name of your JDK is
jdk1.8.0_25. Since you already have one installed with RPM, it would be much easier and cleaner to create a dummy package, although it is still somehow a dirty hack.
Just write a spec for the package
jdk of the reqired version, and make it depend on
jdk1.8.0_25. Then add some symlinks to the
%files block so your program can find it. Finally, really create the symlinks and do
rpmbuild -bb dummy_jdk.spec.