installing openjdk java 7 runtime only installs the policy tool. no runtime

Asked by Rahman

Hi,
I am a new to Linux. I am currently running Ubuntu 15.04 32 bit. Recently, I installed openjdk java 7 runtime from the software center. I needed it to execute a jar file. However, the runtime does not seem to appear anywhere. I looked into usr/share/applications and only openjdk java 7 policy tool appears. How to I rectify this problem? Thank you

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Enrico Rosina (e-rosina) said :
#1

Hello,

Here is how you can check if java is running:

- open a terminal
- type:
     java -version

If there is java version appearing then everything is ok, and all you
have to do is check your settings:

- right click on the jar file name,
- select the properties menu
- select the permissions panel
- at the bottom, check if it is allowed to run this file as a program

If all of that is ok, then right click on the jar file name, select "open with"
and set java as default program.

Is it ok?
Regards
Enrico

http://www.anisor.ch

Revision history for this message
Enrico Rosina (e-rosina) said :
#2

Hello again,

Another thing I forgot to tell, because you have "jdk", so I suppose you want to
do some developer work like programming or compiling programs...

Normally you will have an IDE helping you. But if you want to execute commands
from the command line in a terminal, then you have better set your JAVA_HOME
and CLASSPATH variables

See here, point number 3, edit your ~/.bashrc file:
http://www.2daygeek.com/how-to-setup-java-environment-variable-in-linux/
(in ubuntu, instead of nano, you can edit the file with gedit)

You can see plenty of other examples if you search for "setting java variables
in linux"...

Regards again :-)
Enrico

http://www.anisor.ch

Can you help with this problem?

Provide an answer of your own, or ask Rahman for more information if necessary.

To post a message you must log in.