[SOLVED]Problem with java path

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED]Problem with java path

Postby davidmageia » Oct 17th, '15, 11:45

I would like to use Openrefine (whici is written in java).
The comand ./refine leads to :
Could not find the 'java' executable at '', are you sure your JAVA_HOME environment variable is pointing to a proper java installation?


Below is the part of the code in "refine" to see that I have a "path" problem :
Code: Select all
if [ "$JAVA_HOME" ] ; then
    JAVA="$JAVA_HOME/bin/java"
     
else
    JAVA="`which java 2> /dev/null`"
fi

if [ ! -x "$JAVA" ] ; then
    error "Could not find the 'java' executable at '$JAVA', are you sure your JAVA_HOME environment variable is pointing to a proper java installation?"
fi


In my usr/lib/jvm folder I have many "java" version installed : java ; java1.8 ; java jre 1.8...
But none of them is linked to the usr/bin or bin folder...

How can I solve this question properly ?
Last edited by davidmageia on Oct 19th, '15, 23:01, edited 1 time in total.
davidmageia
 
Posts: 21
Joined: Feb 16th, '14, 20:22

Re: Problem with java path

Postby doktor5000 » Oct 17th, '15, 15:22

Please at least provide the output from your normal user of

Code: Select all
/sbin/alternatives --display java
echo $PATH $JAVA_HOME
which java
java -version
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18058
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Problem with java path

Postby davidmageia » Oct 17th, '15, 15:39

Here it is...
Code: Select all
[david@localhost ~]$ /sbin/alternatives --display java
No alternatives for java.
[david@localhost ~]$ echo $PATH $JAVA_HOME
/usr/local/bin:/usr/bin:/usr/local/games:/usr/games:/usr/lib64/qt4/bin:/usr/lib64/qt5/bin:/home/david/bin
[david@localhost ~]$ which java
which: no java in (/usr/local/bin:/usr/bin:/usr/local/games:/usr/games:/usr/lib64/qt4/bin:/usr/lib64/qt5/bin:/home/david/bin)
[david@localhost ~]$ java -version
bash: java : commande introuvable
Last edited by isadora on Oct 17th, '15, 16:34, edited 1 time in total.
Reason: Placed command-output in between [CODE]-tags for better readability ;)
davidmageia
 
Posts: 21
Joined: Feb 16th, '14, 20:22

Re: Problem with java path

Postby doktor5000 » Oct 17th, '15, 18:08

davidmageia wrote:In my usr/lib/jvm folder I have many "java" version installed : java ; java1.8 ; java jre 1.8...
But none of them is linked to the usr/bin or bin folder...

How can I solve this question properly ?


Well, by installing at least one java version properly. Install at least java-1.8.0-openjdk from Mageia repos and then try again.

FWIW, how did you install what java exactly?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18058
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Problem with java path

Postby davidmageia » Oct 19th, '15, 22:23

I uninstall java-1.8.0-openjdk.
Now in the usr/lib/jvm folder I have nothing...
I suppose that I have to reinstall java-1.8.0-openjdk ?
davidmageia
 
Posts: 21
Joined: Feb 16th, '14, 20:22

Re: Problem with java path

Postby davidmageia » Oct 19th, '15, 23:00

And it works well now !
Thank you for your help.
davidmageia
 
Posts: 21
Joined: Feb 16th, '14, 20:22

Re: Problem with java path

Postby doktor5000 » Oct 19th, '15, 23:03

Yes, you should have at least one java runtime environment installed.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18058
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron