LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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-04-2003, 07:30 AM   #1
MidgetmanUK
LQ Newbie
 
Registered: Oct 2003
Location: UK
Posts: 3

Rep: Reputation: 0
Unhappy Help with java install (again...)


Hi people,

a) i've checked the forums, hope i didnt miss anything, and i'm still stuck.

b) you guys rock, for helping people out with problems.

Ok, I've installed j2sdk, from binary, and I'm aware that it sets the path automatically. Unfortunately, it didnt work for me, as I have gcc-java (or gij or whatever its called) so when I type "java", it doesn't run the SUN java, it runs the built in one.

I need to get round this problem. I'm running redhat 9, and the java package i installed was: j2sdk-1_4_2-nb-3_5_1-bin-linux.bin

Thanks for any help.

MidgetmanUK
 
Old 10-04-2003, 08:02 AM   #2
KDE4me
Member
 
Registered: Apr 2003
Location: Australia
Distribution: RedHat 9.0 / Slackware 9.0/ FreeBSD 4.8 / Solaris 8 x86 / Mandrake 9.0
Posts: 90

Rep: Reputation: 15
put in your path (in .bash_profile) /usr/local/java/jdsdk.../bin
Your path isn't updated automatically, you've got to manually put java in that path.
After you set it up type:
$java -version
HOTSPOT or something like that should be the output
$java -classpath <set a classpath up with the similar to above but to ..../java/lib/.. >

If you didn't get any errors during the installation the above should work. To set up java to run in Mozilla:
$ln -s java/jre/plugger.so /usr/lib/mozilla/plugins/plugger.so
 
Old 10-04-2003, 08:32 AM   #3
MidgetmanUK
LQ Newbie
 
Registered: Oct 2003
Location: UK
Posts: 3

Original Poster
Rep: Reputation: 0
Hi!!

Thanks for the rapid response!

I tried what you said, and even rebooted just incase .bash_profile wasn't executed after restarting x.

Unfortunately, i get the following still:
-------------------------------------------------------------------------------------------
$ java -version
java version "1.3.1"
jdkgcj 0.2.3 (http://www.arklinux.org/projects/jdkgcj)
gcj (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-------------------------------------------------------------------------------------------

And just incase I got something wrong, here is .bash_profile:
-------------------------------------------------------------------------------------------
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin:/usr/share/java/j2sdk1.4.2:/usr/share/java/j2sdk1.4.2/bin:/usr/share/java/j2sdk1.4.2/lib:/usr/share/java/j2sdk1.4.2/include

export PATH
unset USERNAME
-------------------------------------------------------------------------------------------

Any other suggestions? I heard about symbolic links, but don't really know how to use them. Also, with root permissions i tried to rename "java" in /usr/bin to something else, because that is whats running i think, but it still wouldn't rename :S (is that because its a hard link or something?).

Kind regards,

MidgetmanUK
 
Old 10-04-2003, 08:36 AM   #4
MidgetmanUK
LQ Newbie
 
Registered: Oct 2003
Location: UK
Posts: 3

Original Poster
Rep: Reputation: 0
w000000000000t

I got it working. I don't know why I hadn't thought of it before, but basically I removed gcc-java and it's dependancy (j2..something...somthing..).

Now it runs the SUN java binaries just fine.

Thankyou vrey much for your help anyway.

Kind regards,

MidgetmanUK
 
  


Reply



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 does not install in opt but install in usr bbmak Linux - Software 6 10-02-2005 11:13 PM
what directory is java install? what CMD determined where java is install? Thks. suse2166 Linux - Newbie 2 09-04-2005 08:24 PM
How Do you install Java? wizjr1 Fedora 3 07-03-2004 08:52 AM
Java Install marlaina1 Linux - Software 5 03-22-2004 11:58 AM
Java Install Please Help!!! unwrittenlaw Linux - Newbie 22 11-08-2003 11:42 PM

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

All times are GMT -5. The time now is 10:02 PM.

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
Open Source Consulting | Domain Registration