LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Java Woes: A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available ... (http://www.linuxquestions.org/questions/slackware-14/java-woes-a-java-runtime-environment-jre-or-java-development-kit-jdk-must-be-available-843096/)

chytraeus 11-08-2010 05:17 PM

Java Woes: A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available ...
 
Hi,
I resized/moved my extended partition last night. slackware is on one of the logical partitions. Now I'm having some problems starting applications that need java such as moneydance and RSSOwl. When I try to run rssowl the following dialogue pops up:

A Java Runtime Environment (JRE) or Java Development Kit (JDK)
must be available in order to run RSSOwl. No Java virtual machine
was found after searching the following locations:
/usr/lib/RSSOwl/jre/bin/java
java in your current PATH.

Moneydance won't start and libreoffice barfs too.

Code:

set | grep -i java
returns:

JAVA_HOME=/usr/lib/java
MANPATH=/usr/local/man:/usr/man:/usr/lib/java/man:/usr/lib/java/man:/opt/plan9/man:/usr/lib/scala/man:/usr/share/texmf/man.

Java is not working in Opera either. I haven't checked the other browsers except for xxxterm which works fine with java.

I tried reinstalling jre and jdk which didn't help.

Could someone help?

brianL 11-08-2010 05:56 PM

Did you do a full install? If so, you should have the jre, and the jdk is in /extra on the DVD.

Sorry, should have read your post more thoroughly and noticed the bit about reinstalling them. :redface:

arubin 11-08-2010 06:21 PM

What does

Quote:

type $PATH
return?

chytraeus 11-08-2010 07:24 PM

Quote:

Originally Posted by arubin (Post 4153063)
What does

Code:

type $PATH
return?

Hi,

bash: type: /usr/lib/qt/bin:/home/chytraeus/bin:/opt:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:
/usr/local/bin:/usr/local/sbin:/usr/games:.:/opt:/home/chytraeus/bin: not found

Okay libreoffice is working. I had simply run out of space on my data partition after last nights partition changes. :redface:

Java is working in Opera too. It's still not working for RSSOwl or Moneydance.

This feels like a problem I should be able to fix but I'm stuck. :o

arubin 11-09-2010 03:24 AM

I think that I have a java address in my path. It will have to wait until this evening before I can check it out.

Bertical 11-09-2010 07:16 AM

From your first post it looks like java is not in your path anymore.

Code:

[tich@quackers:~] $ cat /etc/slackware-version
Slackware 13.1.0
[tich@quackers:~] $ which java
/usr/lib/java/bin/java
[tich@quackers:~] $ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/java/bin:/usr/lib/qt/bin:/usr/share/texmf/bin:.


chytraeus 11-09-2010 07:32 AM

Quote:

Originally Posted by Bertical (Post 4153483)
From your first post it looks like java is not in your path anymore.

Code:

[tich@quackers:~] $ cat /etc/slackware-version
Slackware 13.1.0
[tich@quackers:~] $ which java
/usr/lib/java/bin/java
[tich@quackers:~] $ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/java/bin:/usr/lib/qt/bin:/usr/share/texmf/bin:.


Hi,
How can I add it to my path?

Bertical 11-09-2010 08:54 AM

I think the java path should be set automatically on login by /etc/profile.d/jre.sh. If that file isn't there then maybe a reinstall of the JRE or JDK would fix it.

To set the path manually
Code:

PATH=$PATH:/usr/lib/java/bin
but it will be lost on reboot. Are you logging in as root as there is no default java path for the root account.

0rwell 11-09-2010 01:52 PM

Quote:

Originally Posted by chytraeus (Post 4153502)
Hi,
How can I add it to my path?

For me, I do a lot of development where I have to switch between java release branches. So I like to always manually install java and I segregate the releases in /opt.

To make this more permament, add it to your .bash_profile so every time you log in the path sets itself.

So, for me, currently my .bash_profile looks like this:

Code:

#Profile for logins
source ~/.bashrc

#aliases
alias ll="ls -alf"
alias cls="clear"
alias opt="cd /opt"
alias home="cd ~/"

#java dirs
export PATH=/opt/jdk1.6.0_22/bin:$PATH
export JAVA_HOME=/opt/jdk1.6.0_22/
export JRE_HOME=/opt/jdk1.6.0_22/
#export LD_LIBRARY_PATH=/opt/jdk1.6.0_22/lib:/opt/jdk1.6.0_22/jre/lib:$LD_LIBRARY_PATH

I have commented out the LD_LIBRARY because I didn't need it. You can choose to leave it in or not include it at all.

Hope this helps!

_O_

chytraeus 11-11-2010 05:26 PM

Thanks for the help everyone.

kapz 11-27-2010 11:04 AM

Thanks a ton Orwell, saved me lots of headache.
Seems like this needs to be done manually in Slack 13.1 x64.


All times are GMT -5. The time now is 02:42 AM.