LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-26-2006, 03:14 PM   #1
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
Question Java symbolic linking


This doesn't really have much to do with programming, but I didn't know where else to post this really :S

Whenever I create a symbolic link to javac, java, jar...etc. in /usr/bin, it doesn't matter which user I am, it's as though the links aren't there. Last time I did this, I remember making the links symbolic.

Here's what I've done (as root):
Code:
# cd /usr/java/jdk1.5.0_06/bin
# ln -s javac /usr/bin/javac
# ln -s java /usr/bin/java
# ln -s jar /usr/bin/jar
The error I get when I try to run java (let's say, in my home directory), is:
Code:
bash: /usr/bin/java: Too many levels of symbolic links
What is that supposed to mean, "too many levels of symbolic links", and how do I get my links working again?

PS. /usr/bin is in my $PATH env var.
 
Old 05-26-2006, 06:12 PM   #2
mrcheeks
Senior Member
 
Registered: Mar 2004
Location: far enough
Distribution: OS X 10.6.7
Posts: 1,690

Rep: Reputation: 52
try using absolute paths :
Code:
ln -sf /usr/java/jdk1.5.0_06/bin/java /usr/bin/
 
Old 05-26-2006, 07:25 PM   #3
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Original Poster
Rep: Reputation: 65
Sweeeeeeet

thanks a bunch

 
Old 05-29-2006, 12:23 AM   #4
alred
Member
 
Registered: Mar 2005
Location: singapore
Distribution: puppy and Ubuntu and ... erh ... redhat(sort of) :( ... + the venerable bsd and solaris ^_^
Posts: 658
Blog Entries: 8

Rep: Reputation: 31
i was thinking of putting the java path *infront* of that $PATH var , probably the original are needed for some other use , eg. some gnu app.
which i wouldnt know ...

will this affect the normal running of *all* java app ??
i also donno ^_^ ...


//if anything discuss ...

.

Last edited by alred; 05-29-2006 at 12:25 AM.
 
  


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
how does file dependencies work with symbolic linking? bulletck Linux - Newbie 1 12-23-2005 09:22 PM
Symbolic linking directories leecming Linux - General 1 06-08-2004 11:11 AM
symbolic linking dvd-rom to /dev/dvd ? Falcon006 Linux - Newbie 3 03-20-2004 12:57 AM
symbolic linking directories? Possible? ajspliffs Linux - General 3 01-12-2004 11:55 AM
symbolic linking ???? salparadise Linux - Newbie 2 12-26-2002 12:01 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:26 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
Open Source Consulting | Domain Registration