LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 02-05-2005, 12:07 AM   #1
rchillal
LQ Newbie
 
Registered: Feb 2005
Posts: 10

Rep: Reputation: 0
javac not found


I have installed Java on Mandrake 10.1
The file name I downloaded was something jre-1_5_0_01-i586_rpm.bin
I logged in as root and created a directory java in usr/local/
I extracted the files and I found the directory java/jre-1.5.0_01 under /usr
I set the path using
export JAVA_HOME=/usr/java/jre1.5.0_01
export PATH=$PATH:JAVA_HOME/bin:

When I run the command >javac
It says bashc: javac not found

Then I put
>export CLASSPATH=$CLASSPATH:.

Still I am not able to run javac command.

Where have I gone wrong ?
I added the path /usr/java/jre1.5.0_01/bin to the PATH variable in profile file.

Still I am not able to run java command from any other directory other than /usr/java/jre1.5.0_01/bin direcrtory

Also I see that there is no javac file in the bin directory.

Can somebody please help and tell me exactly what do I do after installing Java ?
 
Old 02-05-2005, 12:48 AM   #2
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
Quote:
Originally posted by rchillal
I have installed Java on Mandrake 10.1
The file name I downloaded was something jre-1_5_0_01-i586_rpm.bin
I logged in as root and created a directory java in usr/local/
I extracted the files and I found the directory java/jre-1.5.0_01 under /usr
I set the path using
export JAVA_HOME=/usr/java/jre1.5.0_01
export PATH=$PATH:JAVA_HOME/bin:

When I run the command >javac
It says bashc: javac not found

Then I put
>export CLASSPATH=$CLASSPATH:.

Still I am not able to run javac command.

Where have I gone wrong ?
I added the path /usr/java/jre1.5.0_01/bin to the PATH variable in profile file.

Still I am not able to run java command from any other directory other than /usr/java/jre1.5.0_01/bin direcrtory

Also I see that there is no javac file in the bin directory.

Can somebody please help and tell me exactly what do I do after installing Java ?
It won't work. You are using JRE (Java Runtime Environment). That only run java applications, you can't actually compile/develop applications with it (javac compiler is not included). The one you want is called Java 2 SE (java 2 Platform Standard Edition) or Java 2 EE (Java 2 Enterprise Edition).

There're other ways to compile java too. Gcc (gcj to be specific) can compile java, but most of it's gui capabilities (as Swing classes) won't work.

Good luck!

Last edited by Mega Man X; 02-05-2005 at 12:50 AM.
 
Old 02-05-2005, 02:15 AM   #3
student04
Member
 
Registered: Jan 2004
Location: USA
Distribution: macOS, OpenBSD
Posts: 669

Rep: Reputation: 34
Don't post the same question twice.

http://www.linuxquestions.org/questi...highlight=java

http://www.linuxquestions.org/rules.php
 
Old 02-06-2005, 10:02 PM   #4
rchillal
LQ Newbie
 
Registered: Feb 2005
Posts: 10

Original Poster
Rep: Reputation: 0
Can you please tell me from where I can get a free download of Java Standard edition or Entrprise edition ?
 
Old 02-06-2005, 10:15 PM   #5
student04
Member
 
Registered: Jan 2004
Location: USA
Distribution: macOS, OpenBSD
Posts: 669

Rep: Reputation: 34
http://java.sun.com
 
Old 02-06-2005, 10:53 PM   #6
rchillal
LQ Newbie
 
Registered: Feb 2005
Posts: 10

Original Poster
Rep: Reputation: 0
Can you please tell me the exact page on this site from which I can freely download standard edition for Linux?
 
Old 02-06-2005, 10:59 PM   #7
student04
Member
 
Registered: Jan 2004
Location: USA
Distribution: macOS, OpenBSD
Posts: 669

Rep: Reputation: 34
http://java.sun.com/j2se/1.4.2/download.html
http://java.sun.com/j2se/1.5.0/download.jsp

choose either the jre or the sdk or netbeans IDE

can you really not click on the links under Popular Downloads?
 
Old 02-07-2005, 09:15 AM   #8
csfalcon
Member
 
Registered: Jun 2004
Location: MD
Distribution: Fedora Core
Posts: 269

Rep: Reputation: 31
step by step instruction.
http://www.csfalcon.com/wiki/csfalcon/JavaSDK

Last edited by csfalcon; 06-09-2008 at 01:47 PM.
 
  


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
bash: javac: command not found??? MRAB54 Linux - Newbie 6 02-18-2015 08:18 AM
javac not found rchillal Linux - Software 5 02-06-2005 01:51 PM
javac zaicheke Programming 2 10-05-2004 10:46 PM
-bash-- javac command not found nedian123 Programming 1 06-28-2004 04:16 PM
J2sdk problem Javac command not found CollestonPie13 Linux - Software 3 02-15-2004 11:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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