LinuxQuestions.org
Register a domain and help support LQ
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-28-2004, 10:55 AM   #1
getbc
LQ Newbie
 
Registered: Feb 2004
Posts: 4

Rep: Reputation: 0
java


I am trying to compile a Java program using my vi (terminal window) but is telling me that the javac or the java command is not found, what can I do to fix this problem?

Thanks, Grace
 
Old 02-28-2004, 11:07 AM   #2
dominant
Member
 
Registered: Jan 2004
Posts: 409

Rep: Reputation: 30
probably you haven't installed the java compiler.

run #rpm -aq | grep "java"
to make sure that is not installed.
 
Old 02-28-2004, 11:27 AM   #3
mhiggins
Member
 
Registered: Feb 2004
Posts: 140

Rep: Reputation: 15
I believe this is a path issue. You may need to add javac and java to your path. This process differs depending on your shell and the location of the jdk install, but if you are using bash or sh derived shell try this.

export PATH=$PATH:/path/to/java/bin/dir

This all assumes you have java installed, wise guy question but had to ask. To make this change permanent you will need to edit one of the following files and add the above line/or edit a similar line already in the file. ~/.bash_profile~/.bashrc~/.profileYou may also want to export a CLASSPATH variable to include "." thats dot aka current working directory.

export CLASSPATH="."
 
Old 02-28-2004, 11:34 AM   #4
getbc
LQ Newbie
 
Registered: Feb 2004
Posts: 4

Original Poster
Rep: Reputation: 0
I try what you recommended but still (run #rpm -aq | grep "java") did nothing, key in java filename and replied -
bash: javac: command not found

Last edited by getbc; 02-28-2004 at 11:40 AM.
 
Old 02-28-2004, 11:51 AM   #5
getbc
LQ Newbie
 
Registered: Feb 2004
Posts: 4

Original Poster
Rep: Reputation: 0
I think, I know what I need to do now, thanks.
 
Old 06-02-2004, 05:59 PM   #6
realtowz
LQ Newbie
 
Registered: Jun 2004
Location: Athens, GR / Reykjavic, IS
Distribution: Red Hat 9 (Shrike)
Posts: 7

Rep: Reputation: 0
why dont u share the knowledge mate????


 
  


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 plugin installed correctly for Firefox but not able to view any java applet tvn Linux - Software 10 04-15-2010 03:13 AM
Java Programming: Java Runtime Environment not found when trying to compile murbz Linux - Software 2 03-26-2009 04:04 AM
Web start java not working (java works fine) powadha Debian 5 06-05-2004 01:57 PM
Updated Java... now java apps dont work zidane2010 Linux - Software 6 05-04-2004 09:02 PM
2 Questions: java calling system commands? PERL vs Java? randomx Programming 28 11-28-2003 09:24 PM


All times are GMT -5. The time now is 03:12 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration