简体   繁体   English

JList类型不是通用的; 不能使用参数对其进行参数化 <String>

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

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. 我有一个在Linux上的eclipse中运行的项目,我已将其副本移至Windows上的jbuilder,并遇到了一些问题。

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? 我需要导入一个特定的库吗?

JList was not retrofitted with generics until Java SE 7. 直到Java SE 7才对JList进行泛型改造。

You must still be using Java SE 6. 您仍必须使用Java SE 6。

Generics were introduced to the JList class in Java 7. You are most likely using JDK version 6 or under. 泛型是在Java 7中引入到JList类的。您很可能使用的是JDK版本6或更低版本。 Upgrade to JDK 7. 升级到JDK 7。

Generic Jlist introduced in JDK 7 while in case of older version this feature was not availible. JDK 7中引入了通用Jlist ,而在较早版本的情况下,此功能不可用。

Point your eclipse to JDK 7 and your issue will be resolved. 将日食指向JDK 7,您的问题将得到解决。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 类型 HashMap 不是通用的; 它不能用 arguments 参数化<string, integer></string,> - The type HashMap is not generic; it cannot be parameterized with arguments <String, Integer> Set类型不是通用的; 不能使用参数对其进行参数化 <K> - The type Set is not generic; it cannot be parameterized with arguments <K> ArrayList 类型不是通用的; 它不能用参数参数化<Integer> - The type ArrayList is not generic; it cannot be parameterized with arguments <Integer> 错误“kafkaconsumer 类型不是通用的,不能用参数参数化” - Error “the type kafkaconsumer is not generic it cannot be parameterized with arguments” Prevayler类型不是通用的。 不能使用参数对其进行参数化 <P> - The type Prevayler is not generic; it cannot be parameterized with arguments <P> 类型ConcurrentlinkedQueue不是通用的; 不能使用参数对其进行参数化 <Integer> - The type ConcurrentlinkedQueue is not generic; it cannot be parameterized with arguments <Integer> JComboBox类型不是通用的;它不能使用参数<Object>进行参数化 - The type JComboBox is not generic; it cannot be parameterized with arguments <Object> Iterator类型不是通用的; 不能使用参数对其进行参数化 <CustomTypeName> - The type Iterator is not generic; it cannot be parameterized with arguments <CustomTypeName> 队列类型不是通用的; 不能使用参数对其进行参数化 <Customer> - The type Queue is not generic; it cannot be parameterized with arguments <Customer> ArrayList类型不是通用的。 不能使用参数对其进行参数化 - The type ArrayList is not generic; it cannot be parameterized with arguments
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM