readlink -f which runs in ubuntu doesnt really work right in Red hat any alternative?
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i want to know the location because i want to install one java library bin file at active configuration directory through my script
so have to know the location in ubuntu i am getting the location through
Code:
readlink -f $(which java)
if want any more information please let me know and help me
What if the directory you're trying to infer doesn't exist, or what if that directory isn't ever used because calling java doesn't ever run the Oracle version? You're getting caught up with trying to implement a specific solution, but you might need to look at the original problem again and see if there's a better way to solve it.
What if the directory you're trying to infer doesn't exist, or what if that directory isn't ever used because calling java doesn't ever run the Oracle version? You're getting caught up with trying to implement a specific solution, but you might need to look at the original problem again and see if there's a better way to solve it.
Kevin Barry
Dear sir,
usually there is jvm on linux machine and deault java is also there any version which is active.
if not my script wil exit but if there is active java configuration then how to get there i am trying that thing so that i can go and install bin there
Dear sir,
yes sir i am trying the same thing as i dont want to use the internet so not going for rpms
i am trying to install the bin through script only
is there any way to get the path (directory) of active java configuration.
Everything I said last time still applies this time. The main thrust being, that I think you are approaching this problem in the wrong way.
Quote:
please let me know if there is any idea. or command that can be used
Do not install by dumping the files in the directory where the system java is installed. Should I say it one more time? Ok. Do not install by dumping the files in the directory where the system java is installed. In my last post I gave a link that discusses the paths used by java. Read it, and then understand that you you should not care where the system java is installed.
Everything I said last time still applies this time. The main thrust being, that I think you are approaching this problem in the wrong way.
Do not install by dumping the files in the directory where the system java is installed. Should I say it one more time? Ok. Do not install by dumping the files in the directory where the system java is installed. In my last post I gave a link that discusses the paths used by java. Read it, and then understand that you you should not care where the system java is installed.
Evo2.
Dear sir,
sorry for my wrong approach but i have library in binary format and want to install that through shell script so i am trying this i know this might be the wrong of dumping thing in jvm directories but i have bin and i cant use the internet to install java lib is my condition sir, sorry again for my try but actually iwanted to this on RHEL only but i tried this on ubuntu as u know and now want to do in RHEL
ok, I'll try again: why do you want to put this bin file in in the same directory as the java executable? Why can't you put it somewhere else?
Evo2.
Dear sir,
really thanks for understanding me & my some what not so gud ques and problems
becuase when i tried to install it in any other location it gives error like
Code:
This is not a proper JDK directory. Exiting install.
and if i install this bin at other than active jdk directory it doesnt give the effect that library not found kind of error
if i install it in active jdk my program works fine
so sir i want to do this
really thanks for understanding me & my some what not so gud ques and problems
i want the active JDK directory becuase when i tried to install it in any other location it gives error like
Code:
This is not a proper JDK directory. Exiting install.
and if i install this bin at other than active jdk directory it doesnt give the effect means while using this library in my code it gives, library not found kind of error
if i install it in active jdk my program works fine
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.