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