Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
ive installed the 1_4_1 runtime enviroment and tool kit.
[rpm -iv j2sdk-1_4_1_03-fcs-linux-i586.rpm]
[rpm -iv j2re-1_4_1_03-fcs-linux-i586.rpm]
but when i compile my code with javac it doesnt recognise the swing code.
im thinking that rh8 come preinstalled with 1_3_1 or i havent set the classpath. which brings me to another prob i dont know where the commands javac and java are. i know where the commands are that wont compile the swing code /usr/bin/ i thought that i installed the rpm wrong but when i tried to install it again i got "package is already installed"
thanks anyone for ideas
There are a couple of things you can do. First, I would try the which command to find out which java and javac the system is using (which javac). I would then check your PATH environment variable (just type $PATH) to see if the 1_4_1 directories are on it. However, unless you have put them there, I doubt they are.
There are a couple of places you can put java in your PATH, but my favorite is the /etc/profile file. Open that file (you need to be su or root) and look for the section that is setting the path directories. Add your 1_4_1 java /bin directory to that (and maybe remove any references to the 1_3 java if they are there). then logout and log in as a regular user. If you do either the $PATH or which java you should see it pointing to the 1_4_1 version now.
However, I wonder if something else is going on because I believe java 1_3_1 should have the Swing classes.
thanks for the help. i found the 1_4_1 bin and my code runs.
how do i change the classpath in rh8. i want it to last longer than the session. and another question is my mozilla browser cant see java on the web ive got the j2re. is this the wrong file? or do i have to add something.
thanks
I'm not sure about RH, but in Slackware if you entered a CLASSPATH in your /etc/profile, it should be available always.
As for Mozilla, you'll need to put a link in the mozilla plugins directory that points to the JRE. This particular question comes up a lot so if you search on Mozilla and java, you'll find many example of the solution
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.