LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 10-20-2008, 02:04 AM   #1
vikram8jp
LQ Newbie
 
Registered: Oct 2008
Location: Tokyo
Distribution: CentOS
Posts: 27

Rep: Reputation: 15
Question Cent OS 4.6 - need help in JDK installation


Hello all,

I just started with Linux and CentOS 4.6. I have installed jdk1.6.0_07 on my machine. I used a binary file download, made it executable and installed it.

Code:
[root@vik ~]# cd /usr/share/java-1.6.0
[root@vik ~]# chmod +600 jdk-6u7-linux-i586.bin
[root@vik ~]# ./jdk-6u7-linux-i586.bin
After the installation, I did some testing whether the JDK is working fine or not. I tried compiling a java code, but it gave an error.

Code:
[root@vik ~]# cd /usr/share/java-1.6.0/jdk1.6.0_07/bin
[root@vik ~]# javac Hello.java
bash: javac: command not found
I checked the java version installed.

Code:
[root@vik ~]# java -version
java version "1.4.2"
gcj (GCC) 3.4.6 20060404 (Red Hat 3.4.6-10)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Can anybody help me with this?
 
Old 10-20-2008, 03:05 AM   #2
vikram8jp
LQ Newbie
 
Registered: Oct 2008
Location: Tokyo
Distribution: CentOS
Posts: 27

Original Poster
Rep: Reputation: 15
Lightbulb Solved

Hey guys, solved this problem. Actually figured out a workaround. I wasnt able to get that working, but I had to install Netbeans as well, so downloaded the jdk+netbeans package. That did the trick.

Quote:
Originally Posted by vikram8jp View Post
Hello all,

I just started with Linux and CentOS 4.6. I have installed jdk1.6.0_07 on my machine. I used a binary file download, made it executable and installed it.

Code:
[root@vik ~]# cd /usr/share/java-1.6.0
[root@vik ~]# chmod +600 jdk-6u7-linux-i586.bin
[root@vik ~]# ./jdk-6u7-linux-i586.bin
After the installation, I did some testing whether the JDK is working fine or not. I tried compiling a java code, but it gave an error.

Code:
[root@vik ~]# cd /usr/share/java-1.6.0/jdk1.6.0_07/bin
[root@vik ~]# javac Hello.java
bash: javac: command not found
I checked the java version installed.

Code:
[root@vik ~]# java -version
java version "1.4.2"
gcj (GCC) 3.4.6 20060404 (Red Hat 3.4.6-10)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Can anybody help me with this?
 
Old 10-20-2008, 04:13 AM   #3
sjreilly
Member
 
Registered: Oct 2007
Location: Edinburgh, Scotland
Distribution: Debian, CentOS, RHEL, Mint, Ubuntu
Posts: 79

Rep: Reputation: 15
Hi,

My guess is that either you don't have /usr/share/java-1.6.0/jdk1.6.0_07/bin in roots PATH environmetal variable so bash doesn't know where to find javac or you should have typed;

./javac Hello.java

in that directory.

Steve
 
Old 10-20-2008, 07:49 PM   #4
vikram8jp
LQ Newbie
 
Registered: Oct 2008
Location: Tokyo
Distribution: CentOS
Posts: 27

Original Poster
Rep: Reputation: 15
Thumbs up

Hmmm.. that might have been the case Steve. The PATH variable was correctly configured but i did type the command like...
Code:
[root~vik]# javac Hello.java
Thanks for the information. I'll keep that in mind.

Quote:
Originally Posted by sjreilly View Post
Hi,

My guess is that either you don't have /usr/share/java-1.6.0/jdk1.6.0_07/bin in roots PATH environmetal variable so bash doesn't know where to find javac or you should have typed;

./javac Hello.java

in that directory.

Steve
 
  


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
Real Player Installation on Cent OS venkatteshb Linux - Newbie 6 07-10-2009 03:48 AM
JDK Installation. rehan999 Linux - Software 1 10-06-2008 08:42 AM
Java JDK installation on Gentoo silentray Linux - Newbie 2 09-07-2008 08:40 PM
Cent OS 4.2 Installation - Help Required RangLinux Linux - Software 2 07-28-2006 05:17 AM
JDK installation pogopogo Linux - Software 2 10-19-2004 12:39 AM


All times are GMT -5. The time now is 04:42 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration