Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » "Raw Type" Problem(JComboBox is a Raw Type that must be parametized?)
"Raw Type" Problem [message #892027] Tue, 26 June 2012 21:24 Go to next message
Felicity Beeson is currently offline Felicity Beeson
Messages: 6
Registered: June 2012
Junior Member
Hi,
I just removed Eclipse Helios and installed Eclipse Indigo:
Version: Indigo Service Release 2
Build id: 20120216-1857

I imported a project that I had been working on in Helios. I use JComboBoxes in my GUI and Indigo tells me:
JComboBox is a raw type. References to generic type JComboBox<E> should be parameterized
which is ridiculous Razz

I think this has something to do with Eclipse not finding my Java ? but I don't know how to fix it Sad

If you can help me, please be very clear and detailed - I am a decent programmer but not good at setting features in a program. Sad

Thanks a lot!
Re: &quot;Raw Type&quot; Problem [message #892157 is a reply to message #892027] Wed, 27 June 2012 09:14 Go to previous messageGo to next message
Dani Megert is currently offline Dani Megert
Messages: 3801
Registered: July 2009
Senior Member
On 26.06.2012 23:25, Felicity Beeson wrote:
> Hi,
> I just removed Eclipse Helios and installed Eclipse Indigo:
> Version: Indigo Service Release 2
> Build id: 20120216-1857
>
> I imported a project that I had been working on in Helios. I use
> JComboBoxes in my GUI and Indigo tells me:
> JComboBox is a raw type. References to generic type JComboBox<E>
> should be parameterized
> which is ridiculous :p
> I think this has something to do with Eclipse not finding my Java ?
> but I don't know how to fix it :(
It probably uses a different default JRE (see 'Installed JRE' preference
page). If you don't want to use 1.5 or higher, you can also set the
compiler compliance to 1.4 on your project's 'Java Compiler' property page.

Dani
> If you can help me, please be very clear and detailed - I am a decent
> programmer but not good at setting features in a program. :(
> Thanks a lot!
Re: &quot;Raw Type&quot; Problem [message #892342 is a reply to message #892157] Wed, 27 June 2012 20:09 Go to previous messageGo to next message
Felicity Beeson is currently offline Felicity Beeson
Messages: 6
Registered: June 2012
Junior Member
Dani,
Thanks for your comment but using an older version of Java is not the solution I wanted. Why should Eclipse Indigo think JComboBox is a raw type when Eclipse Helios doesn't?

Moderator: can you answer my problem?

[Updated on: Wed, 27 June 2012 20:10]

Report message to a moderator

Re: &quot;Raw Type&quot; Problem [message #892436 is a reply to message #892342] Thu, 28 June 2012 08:34 Go to previous messageGo to next message
Manuel Doninger is currently offline Manuel Doninger
Messages: 119
Registered: October 2010
Senior Member
With Java 6 JCombobox does not contain type parameters, but the class JComboBox in JDK 7 does contain one type parameter. So anyhow your Eclipse Indigo is picking up your JDK 7 instead of JDK 6.
Re: &quot;Raw Type&quot; Problem [message #892626 is a reply to message #892436] Thu, 28 June 2012 19:23 Go to previous message
Felicity Beeson is currently offline Felicity Beeson
Messages: 6
Registered: June 2012
Junior Member
Thank you,
I just came back to admit to sheer stupidity, having finally looked at the Java 7 API and discovering that fact.
It never occurred to me that Java would feel the need to do this to JComboBox.
P.S.
There are at least two other classes that now must be parameterized JList and DefaultListModel.
Previous Topic:JRE not compatible with workspace .class file compatibility
Next Topic:fyi, this program doesn't play well with eclipse
Goto Forum:
  


Current Time: Thu Oct 02 10:33:59 GMT 2014

Powered by FUDForum. Page generated in 0.01962 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software