LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 01-21-2005, 12:07 AM   #1
zwyrbla
Member
 
Registered: Aug 2004
Location: MA
Distribution: Slack 10.1
Posts: 107

Rep: Reputation: 15
Installing java without using the package


heres the deal i want to upgrade my current slack box's java from the default package to the current 5.01. now i removed the old package and installed the new java to usr/local/java now my main problem is i cannot get java from the command line. normally i would just create a symbolic link in /usr/local/bin but im pretty sure this doesnt work for java any help would be appreciated. oh and i dont want to use the package if i can avoid it i really dont like having to use packages becasue i tend to lose track of where everything is i would much rather have it be installed where i want it to be. Thanks.
 
Old 01-21-2005, 12:24 AM   #2
tormented_one
Member
 
Registered: Oct 2004
Location: Small Town USA
Distribution: slamd64 2.6.12 Slackware 2.4.32 Windows XP x64 pro
Posts: 383

Rep: Reputation: 30
try ./usr/local/java/java
to get the java to work in the browsers you have to sym link the plugin to the plugin dir of the browser. hope that makes since. I don't understand what you mean by can't get java on command line. /usr/local/java has to be in your path so you can just type java.
 
Old 01-21-2005, 11:08 PM   #3
zwyrbla
Member
 
Registered: Aug 2004
Location: MA
Distribution: Slack 10.1
Posts: 107

Original Poster
Rep: Reputation: 15
what i mean by can't get it form command line is i can no longer do somehting like java -version and see the version. and applications that look for it in my path can't find it and i have to make some shell script or edit an existing one to make them work correctly limewire for instance. so basically i need to know how to get it to work in my path oh and ./usr/local/java/java did not work but i hope you undersatand my problem now.
 
Old 01-22-2005, 11:31 AM   #4
artistikone
Member
 
Registered: Jul 2003
Distribution: slackware-current
Posts: 76

Rep: Reputation: 15
You need to locate the java bin file. If you installed it to /usr/local/java, then look in /usr/local/java/bin/ or just use 'locate java' after a updatedb. Once located, you can either add the bin directory to your path, to your /etc/profile or just symlink it.
 
Old 01-22-2005, 08:46 PM   #5
zwyrbla
Member
 
Registered: Aug 2004
Location: MA
Distribution: Slack 10.1
Posts: 107

Original Poster
Rep: Reputation: 15
i tried ./usr/local/java/jdk1.5.0_01/bin/java
and i get no such file or directory but the file does exist right there
i tried it as both root and as a user
 
Old 01-23-2005, 09:43 PM   #6
zwyrbla
Member
 
Registered: Aug 2004
Location: MA
Distribution: Slack 10.1
Posts: 107

Original Poster
Rep: Reputation: 15
so basically my questiio would be how do i add something to my path
 
Old 01-24-2005, 06:21 PM   #7
artistikone
Member
 
Registered: Jul 2003
Distribution: slackware-current
Posts: 76

Rep: Reputation: 15
If you're using the global profile, edit /etc/profile. If you have your own, it would be in /home/user/.profile
 
Old 01-25-2005, 03:09 AM   #8
Sijaiko
LQ Newbie
 
Registered: Mar 2004
Distribution: Slackware 3.0 - 10.0
Posts: 14

Rep: Reputation: 0
Quote:
./usr/local/java/jdk1.5.0_01/bin/java
Obviously you need to remove the leading period.
Just use /usr/local/java/jdk1.5.0_01/bin/java.

The installation package for the JDK does not only extract the files, but also sets up some user settings like the path variable, JAVA_HOME and a nomber of other settings.

I am not sure wheter the Java package or the Mozilla package set up the link for the Java plugins, so that might need checking.

Just extracting the JDK does not do the job. Although it will be functional, it needs to be 'registered' in the OS.
 
Old 01-25-2005, 07:05 PM   #9
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, SLAX, OpenSuSE
Posts: 1,628

Rep: Reputation: 142Reputation: 142
That the file exists but you can't see it can be due to file access rights and file ownership. Check, if the java binary is user readable/executable.

gargamel
 
Old 01-25-2005, 07:40 PM   #10
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 73
Heres what I did to get the java from Sun working proper on my Slack system.

1) I installed it to /opt/jdk1.5.0
2) I then made a symlink to it as follows
#ln -s /opt/jdk1.5.0 /opt/java
3) I then made the little script below and placed it in /etc/profile.d as java.sh
#!/bin/bash
#my java path script
JAVA_HOME=/opt/java
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin

Modify it so it suites the paths on your system. All users will have access to java. If you update java, just remember to create a symlink to the newer version.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Java Package Problems logosys Programming 1 09-27-2005 02:39 PM
Where is java 1.4.2_06 package acanton Slackware 2 12-27-2004 09:05 AM
Java Package problem? redshadow Programming 1 03-26-2004 08:27 AM
Java can't find package, but PATH set correctly (j2se1.4.0, java.util.regex package) Ethan Programming 5 02-06-2004 10:55 PM
installing an unstable package from debian's online package archive ganninu Debian 13 11-07-2003 04:00 PM


All times are GMT -5. The time now is 03:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration