1

I have a project that runs in eclipse on linux, i have moved a copy of it to jbuilder on windows and have run into a few issues.

I get the following error:

The type JList is not generic; it cannot be parameterized with arguments <String>

for this line of code:

private JList<String> songListView;

I have various other issues all of which seem to be related to swing. Is there a particular library i need to import?

3 Answers 3

5

JList was not retrofitted with generics until Java SE 7.

You must still be using Java SE 6.

1
  • think you are right unfortunately it is not my machine and am not able to just update it.
    – Calum
    May 7, 2013 at 2:41
1

Generics were introduced to the JList class in Java 7. You are most likely using JDK version 6 or under. Upgrade to JDK 7.

0

Generic Jlist introduced in JDK 7 while in case of older version this feature was not availible.

Point your eclipse to JDK 7 and your issue will be resolved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.