Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2007

Tip: Looking for answers? Try searching our database.

problem with statement

Thread view: 
Jeremy Watts - 10 Jun 2007 12:26 GMT
Hi,

I have the Java JDK installed on my old Sony Vaio laptop, but recently
switched to use my newer computer.  I re-installed the Java development kit
(which used to be called the JDK ?? and now is called the SDK or
something.... Anyway I use the BlueJ IDE alongside it too, so also
downloaded that, so far so good.

I take a Java program from my old machine to try on my new set-up and theres
an error generated at a particular line, the error says :-

"  '('  or '[' expected  "

And the line in question is :-

"List<Object>result = new ArrayList<Object>();"

This works fine on my old set-up but not on the new!!???  Why?????????

Please save my mental health...

Jeremy Watts
Thomas Kellerer - 10 Jun 2007 12:55 GMT
Jeremy Watts wrote on 10.06.2007 13:26:
> Hi,
>
[quoted text clipped - 14 lines]
>
> This works fine on my old set-up but not on the new!!???  Why?????????

Looks like on your old computer you had Java 1.5 installed and your new computer
has Java 1.4. You have to remove the (outdated) JDK from your new computer and
install a more recent version (Java6 aka 1.6 or Java5 aka 1.5)

Thomas
Roedy Green - 15 Jun 2007 11:08 GMT
On Sun, 10 Jun 2007 11:26:18 GMT, "Jeremy Watts"
<jwatts1970@hotmail.com> wrote, quoted or indirectly quoted someone
who said :

>I have the Java JDK installed on my old Sony Vaio laptop, but recently
>switched to use my newer computer.  I re-installed the Java development kit
[quoted text clipped - 12 lines]
>
>This works fine on my old set-up but not on the new!!???  Why?????????

I suspect you have installed a very old Java that does not understand
generics.  See http://mindprod.com/jgloss/jdk.html
to get the latest JDK (Java Development Kit)
SDK is Microsoft's term.

follow the instructions for install and test.

Check out your installation with wassup
see http://mindprod.com/applet/wassup.html
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.