LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 04-12-2010, 05:14 AM   #1
anushya.k.kutty
LQ Newbie
 
Registered: Apr 2010
Posts: 10

Rep: Reputation: 0
Unhappy Java compilation error says-"Parameterized types available if source level is 5.0"


While compiling java programs, i get the error as "parameterized types available only if source level is 5.0". I have a default java 5 in my debian os and i have installed java 6.
I have also set the classpath in .bashrc file as follows:

1. export $JAVA_HOME=/home/....../jdk1.6.0_18
2. export PATH=$PATH:$JAVA_HOME/bin

What might be wrong with my java installation??

Last edited by anushya.k.kutty; 04-12-2010 at 05:24 AM.
 
Old 04-12-2010, 05:34 AM   #2
PMP
Member
 
Registered: Apr 2009
Location: ~
Distribution: RHEL, Fedora
Posts: 381

Rep: Reputation: 58
give the output of
Code:
java -version 
echo $PATH
from the shell you are trying to compile the java code.

Last edited by PMP; 04-12-2010 at 05:34 AM. Reason: Added code tags
 
Old 04-16-2010, 07:35 AM   #3
anushya.k.kutty
LQ Newbie
 
Registered: Apr 2010
Posts: 10

Original Poster
Rep: Reputation: 0
sorry for the late reply..

java -version gives the following output

java version "1.5.0"
gij (GNU libgcj) version 4.3.2

Copyright (C) 2007 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.

echo $PATH gives the output
/usr/local/bin:/usr/bin:/bin:/usr/games:/dalu/jdk1.6.0_18/bin
 
Old 04-16-2010, 07:57 AM   #4
PMP
Member
 
Registered: Apr 2009
Location: ~
Distribution: RHEL, Fedora
Posts: 381

Rep: Reputation: 58
This seems to me that java used is gij ? the GNU one
do

which java
Post the output.

Add the path of the java to the beginning of the path instead at end.
and then check

which java
 
Old 04-16-2010, 01:52 PM   #5
anushya.k.kutty
LQ Newbie
 
Registered: Apr 2010
Posts: 10

Original Poster
Rep: Reputation: 0
which java
gave the output as /usr/bin/java

I Added the path of the java to the beginning but no change...
 
  


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
Samba error: "not an allowed info level" catkin Linux - Server 1 12-05-2009 01:52 PM
Why am I getting "structArray.c:22: error: incompatible types in assignment"? mortyg Programming 5 07-06-2009 09:05 PM
GCC compilation returns a "cannot execute binary file" error Antongarou Linux - Newbie 13 01-03-2009 08:28 PM
Runtime.getRuntime().exec("cd") returns java.io.IOException, error 2 in java tatarin Programming 4 03-28-2008 08:42 PM
Java error "Exception in thread "main" java.lang.StackOverflowError" nro Programming 1 09-04-2004 04:47 AM


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