LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 05-31-2003, 11:21 AM   #1
bm1
Member
 
Registered: Nov 2002
Location: NZ
Distribution: freeBSD, slack
Posts: 156

Rep: Reputation: 30
java problem


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
 
Old 05-31-2003, 11:38 AM   #2
Gerardoj
Member
 
Registered: May 2003
Location: Somewhere over the Rainbow
Distribution: Slackware 9.x, Knoppix, Damn Small Linux, RedHat.
Posts: 465

Rep: Reputation: 30
Hey if you want to use the command javac you need to use like this one:

/usr/java/jre1.3.1_07/bin/i386/green_threads/javac File.java

Hope works!!!

Waiting......

-----------Gerardo
 
Old 05-31-2003, 12:16 PM   #3
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
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.
 
Old 05-31-2003, 07:16 PM   #4
bm1
Member
 
Registered: Nov 2002
Location: NZ
Distribution: freeBSD, slack
Posts: 156

Original Poster
Rep: Reputation: 30
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
 
Old 06-01-2003, 09:27 AM   #5
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
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
 
  


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
Java Problem...again theguitarsquall Mandriva 8 01-08-2005 01:44 PM
Java Problem anirudh Programming 6 10-27-2004 04:42 PM
Java problem CragStar Programming 11 03-11-2004 11:02 AM
Java problem please help bwaynej2002 Linux - Software 2 02-06-2004 09:38 PM
Java problem oicdn Linux - Software 10 01-08-2004 08:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:35 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