LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-18-2002, 02:31 AM   #31
GT I.N.C
Member
 
Registered: May 2002
Location: Australia, Sydney, St.Clair
Distribution: Rh 7.3
Posts: 836

Original Poster
Rep: Reputation: 30

geeeez i forgot the -jar .....and umm java doesnt work now.....whys that...since i logged out....i havent touched profile or bash_profile yet...

Garry
 
Old 10-18-2002, 02:35 AM   #32
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
ha ha ha, that's the contents of your /bin directory rather than /usr/local/bin/java/bin

Ok, so, it would appear that the entry in /etc/profile isn't working for whatever reason.

Cool
 
Old 10-18-2002, 02:37 AM   #33
GT I.N.C
Member
 
Registered: May 2002
Location: Australia, Sydney, St.Clair
Distribution: Rh 7.3
Posts: 836

Original Poster
Rep: Reputation: 30
Wrong bin folder sorry..
Code:
[root@localhost bin]# ls
ControlPanel*  java_vm*  kinit*  ktab*  policytool*  rmiregistry*  tnameserv*
java*          keytool*  klist*  orbd*  rmid*        servertool*
 
Old 10-18-2002, 02:38 AM   #34
GT I.N.C
Member
 
Registered: May 2002
Location: Australia, Sydney, St.Clair
Distribution: Rh 7.3
Posts: 836

Original Poster
Rep: Reputation: 30
So would that mean i have to put it in my bash_profile one?
Yeh i just realised it while reading through the files in it hahaha...

Garry
 
Old 10-18-2002, 02:39 AM   #35
GT I.N.C
Member
 
Registered: May 2002
Location: Australia, Sydney, St.Clair
Distribution: Rh 7.3
Posts: 836

Original Poster
Rep: Reputation: 30
I'm not sure if this will work i'm still a newbie, but can i make like a link to java in /usr/local/bin/java from /sbin or wherever program commands are installed...would that work?

Garry
 
Old 10-18-2002, 02:44 AM   #36
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
Some people do that, but I just dug up some good info I used to give, here's the page:
http://www.mandrakeuser.org/docs/utils/ujava.html

So follow this part of those instructions:
Quote:
Installing Java

I uninstalled kaffe as it's '/usr/bin/java' appears to conflict with J2SDK/J2RE. Although, I'll note here that the j2sdk*.rpm does not complain about kaffe when installing. Nor does the j2sdk*.rpm modify your .bashrc file! So onward we go:

1. Type su on a terminal and enter your 'root' password.
2. Uninstall kaffe: urpme kaffe
3. Make Java installer package executable: chmod a+x j2sdk-1_4_0-fcs-linux-i386.rpm.bin
4. Execute it: ./j2sdk-1_4_0-fcs-linux-i386.rpm.bin
5. Install it (as 'root'): urpmi j2sdk-1_4_0-fcs-linux-i386.rpm

Create a file called 'java.sh' as 'root' in '/etc/profile.d' containing these lines:

JAVA_HOME=/usr/java/j2sdk1.4.0
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH

Make it executable with

chmod +x /etc/profile.d/java.sh

From now on, both variables will be set in all newly opened shells or terminals.
If any of that doesn't make sense to you, I can explain them better.

To further answer your question about symlinking it...

Yes, people do it, and I have done it before, but I suggest trying to get it accomplished this way first rather, and resort to that as a last ditch effort.

BTW, I tried that program, it's kinda cool, but sorta very basic, especially compared to gimp or somthing like it. Java programs usually seem to hog resources and don't move very quickly.

Anyway, let's keep going because it's good to have java installed anyway.

Cool
 
Old 10-18-2002, 02:46 AM   #37
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
And... You will need to modify those /paths/up/there to fit your needs. Basically don't copy and paste cause it won't work.

Cool
 
Old 10-18-2002, 02:48 AM   #38
GT I.N.C
Member
 
Registered: May 2002
Location: Australia, Sydney, St.Clair
Distribution: Rh 7.3
Posts: 836

Original Poster
Rep: Reputation: 30
Ok i think you do need to shed some light on this....i don't know where to start and whats this kaffe stuff lol

And yeh i thought that i might aswell install Java too...

Garry
 
Old 10-18-2002, 02:55 AM   #39
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
kaffe is another implementation of java I believe, but I guess a lot of programs don't work with it.

Ok, so I am thinking you probably don't need to worry about the first step (maybe, but I don't know if kaffe conflicts, or even if you have it installed, might be best to uninstall it anyway)

Anyway, so I'll skip down to where you need to do stuff:

We are already here:
Quote:
Create a file called 'java.sh' as 'root' in '/etc/profile.d' containing these lines:

JAVA_HOME=/usr/java/j2sdk1.4.0
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH

Make it executable with

chmod +x /etc/profile.d/java.sh
SO, here we go:

Create a file called 'java.sh' as 'root' in '/etc/profile.d' containing these lines:
create the file java.sh in the folder /etc/profile.d using any text editor

Add these lines to that new file
JAVA_HOME=/usr/local/bin/java
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH

Save and exit, and now we need to make this file executable so:

chmod +x /etc/profile.d/java.sh


Ok that's what you need to do. I put pointers in there for ya

Cool
 
Old 10-18-2002, 02:57 AM   #40
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
NOTE: I have already edited the lines of that file for you, so you can copy and paste from my "pointer" example the lines for java.sh that you are creating.

Cool
 
Old 10-18-2002, 02:59 AM   #41
GT I.N.C
Member
 
Registered: May 2002
Location: Australia, Sydney, St.Clair
Distribution: Rh 7.3
Posts: 836

Original Poster
Rep: Reputation: 30
Ok thanks MasterC i will try that STRAIGHT after dinner....if i have any more problems and your not on, it's ok theres no rush

Thanks for your help buddy!

Garry
 
Old 10-18-2002, 03:00 AM   #42
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
No problem buddy. Have a good dinner, I am going to bed

Cool
 
Old 10-18-2002, 03:30 AM   #43
GT I.N.C
Member
 
Registered: May 2002
Location: Australia, Sydney, St.Clair
Distribution: Rh 7.3
Posts: 836

Original Poster
Rep: Reputation: 30
Ok i did all that.....now what do i have to do?? When i type 'java' the command cannot be found....do i add all that stuff in profile again?

Garry
 
Old 10-18-2002, 03:33 AM   #44
GT I.N.C
Member
 
Registered: May 2002
Location: Australia, Sydney, St.Clair
Distribution: Rh 7.3
Posts: 836

Original Poster
Rep: Reputation: 30
Actually it worked i had to open a new console...now i'm gonna try the program...

Garry

Thanks MasterC! i know your in bed hahaha
 
Old 10-18-2002, 04:01 AM   #45
GT I.N.C
Member
 
Registered: May 2002
Location: Australia, Sydney, St.Clair
Distribution: Rh 7.3
Posts: 836

Original Poster
Rep: Reputation: 30
Hmmm how could i run this without going to console and typing java -jar bla bla all the time???

Garry
 
  


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
Installing .bin-files, leave the file in /usr/local/bin/ ? lagu2653 Linux - Software 1 11-08-2005 08:30 PM
Java2 SDK doesn't work? ganninu Debian 7 09-13-2005 05:32 PM
Having trouble installing java2 runtime anc6802 Linux - Newbie 1 03-10-2005 12:35 PM
mozilla 1.4.1 no sound with java2 eeverde Linux - Newbie 1 08-07-2004 02:30 AM
Newbie needs help Installing j2sdk-1_4_2-nb_3_5_1-bin-linux.bin bendoku Linux - Newbie 5 10-11-2003 09:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:17 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration