?
Solved

Error due to not being Java source level 5

Posted on 2006-04-05
5
Medium Priority
?
710 Views
Last Modified: 2012-06-27
I have some code that I took over and this line:

Vector <Report> reports = new Vector<Report>();

is give me an error of:

Syntax error, parameterized types only available if source level is 5.0

Do I need a particular library (jarfile)?
0
Comment
Question by:jwright9
  • 3
  • 2
5 Comments
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 300 total points
ID: 16385094
Suggests that your IDE has to be 'turned' up to 1.5. What is it?
0
 
LVL 10

Accepted Solution

by:
radarsh earned 450 total points
ID: 16385107
While compiling the file, you need to use -source 1.5 switch
How are you compiling the application? If you are using eclipse
or similar, there is an option in the project properties where you can
set this.

I'm not sure if it's -source 1.5 or -source 5.0

________
radarsh
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16385168
>>I'm not sure if it's ...

The former. But this looks more like an IDE message ...
0
 
LVL 10

Expert Comment

by:radarsh
ID: 16385269
CEHJ, you're right. I checked in eclipse and the error message is identical.

jwright9, you can go to the properties of your project -> Java Compiler
There, select 5.0 in "Compiler Compliance Level" list down. If your options
are disabled, check "Enable Project Specific Settings".

You can do the same in Window -> Preferences

________
radarsh
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16385358
:-)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
In this post we will learn different types of Android Layout and some basics of an Android App.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month17 days, 10 hours left to enroll

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question