JVM in OMV LX 3.0

I have installed openjdk 1.8,

java-1.8.0-openjdk-headless-1.8.0.101-1.b14-omv2015.0.x86_64
java-1.8.0-openjdk-1.8.0.101-1.b14-omv2015.0.x86_64

But an application that uses java says JVM is needed to its install and JVM is not found or available.

Does anybody knows why JVM is not found? Is there another package to install? Could it be just a matter of proper configuration? Or could it be that JVM is found in a different place and the application does not know it?

The application recommends downloading JVM from another site. Is it really necessary?

Thanks in advance

Adelson could you post the exact error and package your having problems with? First thing to check is if you have java-1.8.0 or java-1.7.0 enabled with ‘update-alternatives’. It may be an incorrect path or a syntax issue.

Why I think it may be path or syntax issue is:

# update-alternatives --config java
update-alternatives: warning: /etc/alternatives/java has been changed (manually or by a script); switching to manual updates only
There is 1 choice for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java   1800101   auto mode
  1            /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java   1800101   manual mode

Press <enter> to keep the current choice[*], or type selection number: 0
update-alternatives: using /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java to provide /usr/bin/java (java) in auto mode

does show we have /usr/lib/jvm so it’s maybe where that package is looking for jvm?

If not it may be possible to install Sun JRE package from Sun or Oracle website.

Edit: Note ‘update-alternatives --config java’ will issue a list of errors about ‘/usr/share/man/man1/’ to my knowledge that’s manual pages and doesn’t affect whether java does it’s job.

Hi Ben79,

First of all, thanks for your helps,

The package is provided by government for income tax purposes …
The package instructions/requirements explicitly mention openjdk 1.7 or above.
I have only openjdk 1.8 installed.
I had already tried

$ update-alternatives --config java

and it returns exactly what you’ve shown in the last post. I choosed “0”, the auto mode.

Then, I thought other OMV java packages should be installed. I tried, one at a time,

java-openjdk-1.8.0-devel
java-openjdk-1.8.0-src

Sorry, I’ve sent too earlier, resuming…

the attempt to install these two packages did not help with the JVM problem.

Finally, the exact message is in Portuguese. The essential could be translated as only this,

“Installation requires a JVM and it was not found. You’ll be redirected to a site from where you can download it …”

The government also offers another optional package with a .jar application that seems to work fine with

$ java -jar app.jar

No installation is done in this case but I can use it. However, it is preferable the installing option since it also provides other facilities like reading old files, creating new directories, and so on

The point is this Our jvm is located in ‘/usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java’ but the government income tax package is probably looking for jvm via a different path. So if you know where that is looking for jvm you could create a symbolic link between the 2 different paths. Normally for most applications the error message will tell where it is looking for jvm. hopes this makes sense.

Maybe it makes sense. By now, I’ve found that the program creates at /tmp a directory with its executables for installation and it seems that the absence of JVM is detected by error messages after launching applications like

xdg-something

Then it may also be that openjdk and oracle’s java are different somehow. Oracle’s free version (openjdk) may lack some tricks …

Since, government won’t accept my excuses not to paying income taxes due to my preference for open source software, I am trying the other option (although less flexible) which does not require the proprietary codes …

Whatever the source of the problem and its solution I’ll post it here.

Thanks

java-1.8.0-openjdk-src → Java sources
java-1.8.0-openjdk-devel → Java development tools (for build jars)

I think you need none of these.

If you think something is missing alternatives you may try to re-install java packages:

urpme java-1.8.0-openjdk-headless
urpmi java-1.8.0-openjdk

About your app, I think is has a launcher which set JVM path before to launch it. Usually this kind of launchers are written in some script languages (bash/python/perl), but not in java itself of course, so you may inspect it to know where it looks for JVM. Also usually there are some environment variable (for instance JAVA_HOME) help you to modify their behaviour without touch it.

About the search or definition of JVM path, we (me and a friend) have tried to watch the app’s inside but it is not a script. No help with midnight commander or “less”.

I also thought the lack of some xdg support could be misinterpreted by the app as a JVM problem but I have all the xdg commands available at the system.

Finally, I’ve found a bug report,

https://bugs.launchpad.net/snappy/+bug/1647200

where it is pointed out a kind of “incompatibility” between java and xdg commands …

But so far no luck.

I have two options: installing the oracle java (not openjdk) or using the less flexible package which do everything but leaving my directories as organized as I would it to be.
I’ll use the less flexible option and let the organization to be done “manually”.

Once more, many thanks