LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 05-04-2005, 10:20 AM   #16
duffmckagan
Senior Member
 
Registered: Feb 2005
Distribution: Cent OS 6.4
Posts: 1,163

Original Poster
Rep: Reputation: 49

It was done with no errors.

And yes, I have the same version of Java as you have mentioned above.

I deleted the /opt/java file, with the rm option at command line and recreated the symlink as specified........With no errors.

But, still the above mentioned line:
bash: export: `MANPATH-:/opt/java/man': not a valid identifier

comes again and again.......

Last edited by duffmckagan; 05-04-2005 at 11:25 AM.
 
Old 05-04-2005, 11:16 AM   #17
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
And did you try commenting out export MANPATH="$MANPATH:/opt/java/man" from the java.sh script or deleting it. If that fails delete the java.sh file and create an entry similar to the one below in your .bash_profile
Code:
export PATH=$PATH:/usr/java/jre1.5.0_01/bin
That will put java in the path of the current user, but you will have to do this for everyone who uses the system. I have asked several times for the exact version of java you are using (as it is in /usr/java) but you haven't responded to that.
 
Old 05-04-2005, 11:28 AM   #18
duffmckagan
Senior Member
 
Registered: Feb 2005
Distribution: Cent OS 6.4
Posts: 1,163

Original Poster
Rep: Reputation: 49
Quote:
Originally posted by reddazz
I have asked several times for the exact version of java you are using (as it is in /usr/java) but you haven't responded to that. [/B]

Sorry that you couldn't find this in my previous Post.
I should have put the number instead of the sentence.

Quote:
Originally posted by duffmckagan
And yes, I have the same version of Java as you have mentioned above.

Should i compile that code you have mentioned above again?

If yes, then I will shell out those lines....I need just a yes or no.
 
Old 05-04-2005, 11:37 AM   #19
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
You need to delete the /etc/profile.d/java.sh and then try the instructions in my last post.
 
Old 05-04-2005, 11:51 AM   #20
duffmckagan
Senior Member
 
Registered: Feb 2005
Distribution: Cent OS 6.4
Posts: 1,163

Original Poster
Rep: Reputation: 49
I will do that.....

BUt I still don't get the java version and the code told above.....after compiling.

java -version

in root as well as in user modes.

Is it appropriate to do that even though I don't get it?
 
Old 05-04-2005, 12:07 PM   #21
prj
Member
 
Registered: Aug 2003
Location: South Wales
Distribution: Kubuntu, Ubuntu server, SuSE 11, Knoppix, Puppy, Myth. Oh alright then, all of them
Posts: 177

Rep: Reputation: 30
reddazz, having made the script "java.sh" in /etc/profile.d I presume it needs to be run to set the paths correctly?

or reboot to run it that way?

As root:

cd /etc/profile.d
./java.sh

Last edited by prj; 05-04-2005 at 12:09 PM.
 
Old 05-04-2005, 12:20 PM   #22
duffmckagan
Senior Member
 
Registered: Feb 2005
Distribution: Cent OS 6.4
Posts: 1,163

Original Poster
Rep: Reputation: 49
./java.sh: line 3: export: `MANPATH-:/opt/java/man': not a valid identifier

I got this error for that

cd /etc/profile.d
./java.sh

I believe I have to re compile everything that reddazz has mentioned before, excluding the
exporting Man path stuff.

Last edited by duffmckagan; 05-04-2005 at 12:24 PM.
 
Old 05-04-2005, 12:41 PM   #23
prj
Member
 
Registered: Aug 2003
Location: South Wales
Distribution: Kubuntu, Ubuntu server, SuSE 11, Knoppix, Puppy, Myth. Oh alright then, all of them
Posts: 177

Rep: Reputation: 30
Code:
MANPATH-:/opt/java/man
Shouldn't that be
Code:
MANPATH=/opt/java/man
 
Old 05-04-2005, 01:15 PM   #24
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
If you log out and in again, the scripts in /etc/profile.d are automatically run, so there is no need to run them as "./java.sh". You can also do "source .bash_profile" if you don't want to log out. I have said to uncomment the manpath line, but I am not sure thats been done because bash shouldn't complain about this if its not set. Mine is like below and it works fine using the jdk,

Code:
#!/bin/sh
export JAVA_HOME=/opt/java
export MANPATH="$MANPATH:/opt/java/man"
export PATH="$PATH:/opt/java/bin:/opt/java/jre/bin"
If using the jre, I am sure the one below would work if the jre doesn't have a manual,
Code:
#!/bin/sh
export JAVA_HOME=/opt/java
export PATH="$PATH:/opt/java/bin"
Try changing the /opt/java to your actual java path.
 
Old 05-04-2005, 01:45 PM   #25
mrcheeks
Senior Member
 
Registered: Mar 2004
Location: far enough
Distribution: OS X 10.6.7
Posts: 1,690

Rep: Reputation: 52
Quote:
Originally posted by duffmckagan
I logged in as root and then went to

/opt

Now there was a file called java as you told me Reddazz.

Now, I deleted it.

When I tried to create a symlink , it told me that the specified file already exists.

So, do i now need to delete the one in /usr/bin?

One more thing.
the java does exist in /usr/java
Why don't/didn't you replace /opt/java by /usr/java in the reddazz script?
 
Old 05-04-2005, 11:45 PM   #26
duffmckagan
Senior Member
 
Registered: Feb 2005
Distribution: Cent OS 6.4
Posts: 1,163

Original Poster
Rep: Reputation: 49
I have a folder named jre1.5.0_01in the /usr/java folder.

SHould i run the script again?

Moreover, If i should start from scratch, How should i do it?

there is nothing like java in /opt anymore.

If i hav done anything too wrong, How can i just delete everything, and follow the reddazz script to a successful install?

Moreover, I see that i have Jre....and not JDK.....

I don't know any development things, so JRE would be OK for me.

Still, i can download JDK if you prefer.

Plz provide the LInk.
 
Old 05-05-2005, 03:17 AM   #27
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
Try the one below,

Code:
#!/bin/sh
export JAVA_HOME=/usr/java/jre1.5.0_01
export PATH="$PATH:/usr/java/jre1.5.0_01/bin"
 
Old 05-05-2005, 03:43 AM   #28
duffmckagan
Senior Member
 
Registered: Feb 2005
Distribution: Cent OS 6.4
Posts: 1,163

Original Poster
Rep: Reputation: 49
Where should I try it?
Emacs or Konsole?
 
Old 05-05-2005, 08:15 AM   #29
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
Thats a script that has to go into /etc/profile.d following the procedure in my first post.
 
Old 05-05-2005, 08:44 AM   #30
duffmckagan
Senior Member
 
Registered: Feb 2005
Distribution: Cent OS 6.4
Posts: 1,163

Original Poster
Rep: Reputation: 49
Now there has been a problem .
I don't get the root prompt at the command line.....instead i get this.
When i type su- and root password , this is what i get.

-bash: !/bin/sh: No such file or directory
-bash-2.05b#


now, when i test whether java is installed by running

java -version, i get the proper results......As mentioned by.......PRJ earlier.

How do i fix this?
 
  


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
Problem Installing Azureus athanman Linux - Software 3 11-20-2005 03:42 PM
installing Azureus? greythorne Ubuntu 1 10-29-2005 11:12 PM
Error Installing Azureus PapaSmurf88 Mandriva 4 05-12-2005 06:07 PM
Installing Azureus on my suselinux9.2 Moroshni Linux - Software 3 04-11-2005 06:40 PM
Installing Azureus/Bittorrent jc_firestorm Linux - Software 1 03-13-2005 10:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

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