Linux - NewbieThis 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
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'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?
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:
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.
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:
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.