Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

compiling code with j2se 5.0 features

Status
Not open for further replies.

tdelamater

Programmer
May 28, 2005
9
US
I just started this book: Core Java Volume II
I downloaded the sample code from the book from the vendors website. However, I cannot compile the examples that use APIs new to j2se 5.0.

How can I take advantage of the new features introduced in j2se 5.0? I went to suns website and it does not appear that they have a newer SDK.

Here is an example of my problem from the sample code downloadable from the above link.

Path: coreJava\v2\v2ch1\Bounce\Bounce.java Line#: 101

Code:
 private ArrayList<Ball> balls = new ArrayList<Ball>();

My compiler gives me the following error: java.util.ArrayList does not take parameters

Ball is a simple object

I currently have j2sdk1.4.2_04 installed, and use netbeans 4.1

Any help clearing up my confusion would be greatly appreciated. Thanks in advance :)
 
I see what my problem was before.. the naming conventions threw me. For j2se v 1.4.2 the development tools are called "The J2SE Software Development Kit" SDK.. for v 5.0 they are called "The J2SE Development Kit" JDK.. Confusing me with the user end JRE..

after unistalling the old development kit, and installing the new my programs compile..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top