LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   JAVA on Slackware? How? (http://www.linuxquestions.org/questions/slackware-14/java-on-slackware-how-397031/)

Rayston 12-27-2005 09:33 PM

JAVA on Slackware? How?
 
I am completely lost on how to get java working on slackware? Anyone know of any tutorials or threads that have covered this in a step by step "for dummies" way?

Thanx

Rayston

Nylex 12-27-2005 11:48 PM

When you say you want to get Java working, what do you mean? Do you want to be able to view applets on web pages/run Java programs on Slack? Do you want to develop Java programs? If the former, it'd help to know what browser you're running.

gilead 12-28-2005 12:50 AM

I'm assuming that you'll be installing Java, upgrading it as new versions come and that you run Mozilla as your browser - because that's what I do ;-)

I downloaded jdk-1_5_0_06-linux-i586.bin from java.sun.com to my hard drive. Next I ran `chmod u+x jdk-1_5_0_06-linux-i586.bin && ./jdk-1_5_0_06-linux-i586.bin` to install it (I installed it to /usr/local/jdk1.5.0_06 but that's just my preference). I have a symlink created with `ln -s /usr/local/jdk1.5.0_06 /usr/local/jdk` and in my /etc/profile I have the following 2 lines:
export JAVA_HOME="/usr/local/jdk"
export PATH="${JAVA_HOME}/bin:$PATH"

Next, since my mozilla package is installed under /usr/lib/mozilla-1.7.12 I ran `ln -s /usr/local/jdk/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla-1.7.12/plugins/libjavaplugin_oji.so`.

That gives me access to Java in my path for tools like Eclipse as well as in my browser for applets.

Hangdog42 12-28-2005 07:02 AM

I've always found it easiest to use the Java packages that come with Slackware. The JRE is in the l folder and the JDK is in extras.

trebek 08-20-2007 08:45 PM

Quote:

Originally Posted by gilead (Post 2018329)
I'm assuming that you'll be installing Java, upgrading it as new versions come and that you run Mozilla as your browser - because that's what I do ;-)

I downloaded jdk-1_5_0_06-linux-i586.bin from java.sun.com to my hard drive. Next I ran `chmod u+x jdk-1_5_0_06-linux-i586.bin && ./jdk-1_5_0_06-linux-i586.bin` to install it (I installed it to /usr/local/jdk1.5.0_06 but that's just my preference). I have a symlink created with `ln -s /usr/local/jdk1.5.0_06 /usr/local/jdk` and in my /etc/profile I have the following 2 lines:
export JAVA_HOME="/usr/local/jdk"
export PATH="${JAVA_HOME}/bin:$PATH"

Next, since my mozilla package is installed under /usr/lib/mozilla-1.7.12 I ran `ln -s /usr/local/jdk/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla-1.7.12/plugins/libjavaplugin_oji.so`.

That gives me access to Java in my path for tools like Eclipse as well as in my browser for applets.


Hey there man. I added those lines to /etc/profile like you specified, though i had to change /usr/local/jdk to /usr/lib/java, since apparently the bin directory is over there. I executed java -showversion and i do get the version displayed. The application that i am trying to install still cannot find java installed on my computer. What am i doing wrong? FYI, i run Slack 12. Thanks for the help.

gilead 08-20-2007 09:01 PM

Did you source /etc/profile (or logout and login again)? To check, can you confirm that echo $JAVA_HOME returns /usr/lib/java and that echo $PATH contains /usr/lib/java/bin?

If both of those variables are correct, I'd check the docs for the application you're trying to install and see what it requires apart from JAVA_HOME and PATH.

trebek 08-24-2007 01:33 AM

Thanks, i worked it out, the problem is i did so many things i can't trace back on my own steps so i can learn from what i did to get it going. Doesn't this happen very often to you guys? This is a big problem since i may stumble on the same problem more than once and the last time i didn't memorize what i did. So i'll be damned.

Thanks for the help. LQ rules.

tommcd 08-24-2007 07:09 AM

For what it's worth, I installed everything from the 1st 2 slackware 12 CDs and java was installed along with everything else. about:plugins in firefox shows the java plugins in use.

Chuck56 08-24-2007 09:29 AM

Quote:

Originally Posted by trebek (Post 2868831)
Thanks, i worked it out, the problem is i did so many things i can't trace back on my own steps so i can learn from what i did to get it going. Doesn't this happen very often to you guys? This is a big problem since i may stumble on the same problem more than once and the last time i didn't memorize what i did. So i'll be damned.

Thanks for the help. LQ rules.

I take notes when I'm doing something new and bookmark links that I use as reference. I started my notes using the back of scrap paper off the printer and now have enough to fill a couple manila folders. Kind of a messy solution! If I had to start over I would keep all my notes in a bound notebook or even better a 3-ring binder so I could reorganize them.


All times are GMT -5. The time now is 09:18 PM.