LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 10: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, 10: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, 11:16 AM   #3
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

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

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



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 12:44 PM
Java Problem anirudh Programming 6 10-27-2004 03:42 PM
Java problem CragStar Programming 11 03-11-2004 10:02 AM
Java problem please help bwaynej2002 Linux - Software 2 02-06-2004 08:38 PM
Java problem oicdn Linux - Software 10 01-08-2004 07:00 PM

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

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