Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT and JDK 1.5
SWT and JDK 1.5 [message #455091] Fri, 06 May 2005 02:20 Go to next message
Connie Lam is currently offline Connie LamFriend
Messages: 24
Registered: July 2009
Junior Member
Hello,

I just switched to JDK 1.5 and was playing around with the SWT source
code. When I built the SWT code using the given build.xml, the compiler
complained about my generic types (see error messages below). However, I
can use generic types in another Java project that I created in Eclipse.
I've already changed the compiler compliance level to 5.0.

What's possibly wrong?

----------
1. ERROR in C:\projects\org.eclipse.swt\Eclipse
SWT\common\org\eclipse\swt\graphics\ImageLoader.java
(at line 83)
Vector<ImageLoaderListener> imageLoaderListeners;
^^^^^^
The type Vector is not generic; it cannot be parameterized with arguments
<ImageLoaderListener>
----------
2. ERROR in C:\projects\org.eclipse.swt\Eclipse
SWT\common\org\eclipse\swt\graphics\ImageLoader.java
(at line 83)
Vector<ImageLoaderListener> imageLoaderListeners;
^^^^^^^^^^^^^^^^^^^
Syntax error, parameterized types are only available if source level is 5.0
----------
Re: SWT and JDK 1.5 [message #455102 is a reply to message #455091] Fri, 06 May 2005 14:51 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Not sure what this could be. SWT doesn't use generics and compiles and runs
under JDK 1.1.x.

"kkconcome" <kkconcome@yahoo.com> wrote in message
news:850a805037bd03b04184d152fe1b1da4$1@www.eclipse.org...
> Hello,
>
> I just switched to JDK 1.5 and was playing around with the SWT source
> code. When I built the SWT code using the given build.xml, the compiler
> complained about my generic types (see error messages below). However, I
> can use generic types in another Java project that I created in Eclipse.
> I've already changed the compiler compliance level to 5.0.
>
> What's possibly wrong?
>
> ----------
> 1. ERROR in C:\projects\org.eclipse.swt\Eclipse
> SWT\common\org\eclipse\swt\graphics\ImageLoader.java
> (at line 83)
> Vector<ImageLoaderListener> imageLoaderListeners;
> ^^^^^^
> The type Vector is not generic; it cannot be parameterized with arguments
> <ImageLoaderListener>
> ----------
> 2. ERROR in C:\projects\org.eclipse.swt\Eclipse
> SWT\common\org\eclipse\swt\graphics\ImageLoader.java
> (at line 83)
> Vector<ImageLoaderListener> imageLoaderListeners;
> ^^^^^^^^^^^^^^^^^^^
> Syntax error, parameterized types are only available if source level is
5.0
> ----------
>
>
>
Re: SWT and JDK 1.5 [message #455106 is a reply to message #455102] Fri, 06 May 2005 17:38 Go to previous messageGo to next message
Connie Lam is currently offline Connie LamFriend
Messages: 24
Registered: July 2009
Junior Member
Thanks Steve for your reply.

So is SWT going to migrate to J2SE 5.0 and follow its standards?

Thanks again!
Re: SWT and JDK 1.5 [message #455181 is a reply to message #455106] Mon, 09 May 2005 23:00 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Eventually I imagine. It's not that we aren't following standards but we
need to run on older verisons of the JDK.

"kkconcome" <kkconcome@yahoo.com> wrote in message
news:c7a2d93fcbe415784e056e9bbd588795$1@www.eclipse.org...
> Thanks Steve for your reply.
>
> So is SWT going to migrate to J2SE 5.0 and follow its standards?
>
> Thanks again!
>
Re: SWT and JDK 1.5 [message #455190 is a reply to message #455091] Tue, 10 May 2005 06:37 Go to previous messageGo to next message
Stefan Langer is currently offline Stefan LangerFriend
Messages: 236
Registered: July 2009
Senior Member
kkconcome wrote:
> Hello,
>
> I just switched to JDK 1.5 and was playing around with the SWT source
> code. When I built the SWT code using the given build.xml, the compiler
> complained about my generic types (see error messages below). However, I
> can use generic types in another Java project that I created in Eclipse.
> I've already changed the compiler compliance level to 5.0.
>
> What's possibly wrong?
>
> ----------
> 1. ERROR in C:\projects\org.eclipse.swt\Eclipse
> SWT\common\org\eclipse\swt\graphics\ImageLoader.java
> (at line 83)
> Vector<ImageLoaderListener> imageLoaderListeners;
> ^^^^^^
> The type Vector is not generic; it cannot be parameterized with
> arguments <ImageLoaderListener>
> ----------
> 2. ERROR in C:\projects\org.eclipse.swt\Eclipse
> SWT\common\org\eclipse\swt\graphics\ImageLoader.java
> (at line 83)
> Vector<ImageLoaderListener> imageLoaderListeners;
> ^^^^^^^^^^^^^^^^^^^
> Syntax error, parameterized types are only available if source level is 5.0
> ----------
>
>
>
I'm using rcp and swt in a Project using jdk1.5 to great success. I
think the error you are receiving is either that the project is not
jdk1.5 compliant or that the jdk for your project is still 1.4 or
earlier. Try doing a simple test that has nothing to do with SWT and see
if that comes up ok.

Regards
Stefan
Re: SWT and JDK 1.5 [message #455250 is a reply to message #455190] Tue, 10 May 2005 18:41 Go to previous messageGo to next message
Connie Lam is currently offline Connie LamFriend
Messages: 24
Registered: July 2009
Junior Member
Hi Stefan,

I'm also able to use generics in my own project that simply "uses" SWT.
However, I cannot add generics "directly" to the source files in the
org.eclipse.swt project (and I've double-checked that I'm using JDK1.5 for
this project and changed the compiler compliance level to 5.0). So I guess
the org.eclipse.swt project itself is not JDK1.5 compliant?

Thanks for reading!
Re: SWT and JDK 1.5 [message #455459 is a reply to message #455181] Sun, 15 May 2005 22:25 Go to previous messageGo to next message
Max Rotvel is currently offline Max RotvelFriend
Messages: 21
Registered: July 2009
Junior Member
Hmm, I was browsing around on eclipse.org but couldn't find an answer to
this:
What is minimum version of the JRE required to run standalone SWT
applications?

On Tue, 10 May 2005 01:00:46 +0200, Steve Northover
<steve_northover@ca.ibm.com> wrote:

> Eventually I imagine. It's not that we aren't following standards but we
> need to run on older verisons of the JDK.
>
> "kkconcome" <kkconcome@yahoo.com> wrote in message
> news:c7a2d93fcbe415784e056e9bbd588795$1@www.eclipse.org...
>> Thanks Steve for your reply.
>>
>> So is SWT going to migrate to J2SE 5.0 and follow its standards?

Regards
--
Max - rotvel AT bolignet-aarhus DOT dk
Re: SWT and JDK 1.5 [message #455464 is a reply to message #455459] Mon, 16 May 2005 13:26 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
JDK 1.2 is all that is required for standalone SWT. If you wish to use the
SWT/AWT integration class (SWT_AWT) then you need JDK 1.5.

"Max Rotvel" <this.address@is.invalid> wrote in message
news:op.sqt8j1m6nl651a@trixie.katlan...
> Hmm, I was browsing around on eclipse.org but couldn't find an answer to
> this:
> What is minimum version of the JRE required to run standalone SWT
> applications?
>
> On Tue, 10 May 2005 01:00:46 +0200, Steve Northover
> <steve_northover@ca.ibm.com> wrote:
>
>> Eventually I imagine. It's not that we aren't following standards but we
>> need to run on older verisons of the JDK.
>>
>> "kkconcome" <kkconcome@yahoo.com> wrote in message
>> news:c7a2d93fcbe415784e056e9bbd588795$1@www.eclipse.org...
>>> Thanks Steve for your reply.
>>>
>>> So is SWT going to migrate to J2SE 5.0 and follow its standards?
>
> Regards
> --
> Max - rotvel AT bolignet-aarhus DOT dk
Re: SWT and JDK 1.5 [message #455554 is a reply to message #455464] Tue, 17 May 2005 09:09 Go to previous messageGo to next message
Max Rotvel is currently offline Max RotvelFriend
Messages: 21
Registered: July 2009
Junior Member
Thanks.

On Mon, 16 May 2005 15:26:07 +0200, Veronika Irvine
<veronika_irvine@oti.com> wrote:

> JDK 1.2 is all that is required for standalone SWT. If you wish to use
> the
> SWT/AWT integration class (SWT_AWT) then you need JDK 1.5.
>
> "Max Rotvel" <this.address@is.invalid> wrote in message
> news:op.sqt8j1m6nl651a@trixie.katlan...
>> What is minimum version of the JRE required to run standalone SWT
>> applications?

--
Max - rotvel AT bolignet-aarhus DOT dk
Re: SWT and JDK 1.5 [message #455703 is a reply to message #455464] Thu, 19 May 2005 18:45 Go to previous messageGo to next message
Jim Adams is currently offline Jim AdamsFriend
Messages: 160
Registered: July 2009
Senior Member
Is that true for all platforms or just linux?

Veronika Irvine wrote:
> JDK 1.2 is all that is required for standalone SWT. If you wish to use the
> SWT/AWT integration class (SWT_AWT) then you need JDK 1.5.
>
> "Max Rotvel" <this.address@is.invalid> wrote in message
> news:op.sqt8j1m6nl651a@trixie.katlan...
>
>>Hmm, I was browsing around on eclipse.org but couldn't find an answer to
>>this:
>>What is minimum version of the JRE required to run standalone SWT
>>applications?
>>
>>On Tue, 10 May 2005 01:00:46 +0200, Steve Northover
>><steve_northover@ca.ibm.com> wrote:
>>
>>
>>>Eventually I imagine. It's not that we aren't following standards but we
>>>need to run on older verisons of the JDK.
>>>
>>>"kkconcome" <kkconcome@yahoo.com> wrote in message
>>>news:c7a2d93fcbe415784e056e9bbd588795$1@www.eclipse.org...
>>>
>>>>Thanks Steve for your reply.
>>>>
>>>>So is SWT going to migrate to J2SE 5.0 and follow its standards?
>>
>>Regards
>>--
>> Max - rotvel AT bolignet-aarhus DOT dk
>
>
>
Re: SWT and JDK 1.5 [message #455860 is a reply to message #455703] Fri, 20 May 2005 17:17 Go to previous message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
It is true for all platforms.
When using the SWT/AWT integration class (SWT_AWT), it will "work" on
Windows with JDK 1.4 but many bugs with keyboard events etc are fixed by
using JDK 1.5.

"Jim Adams" <jim.adams@sas.com> wrote in message
news:d6imtn$kc9$2@news.eclipse.org...
> Is that true for all platforms or just linux?
>
> Veronika Irvine wrote:
>> JDK 1.2 is all that is required for standalone SWT. If you wish to use
>> the SWT/AWT integration class (SWT_AWT) then you need JDK 1.5.
>>
>> "Max Rotvel" <this.address@is.invalid> wrote in message
>> news:op.sqt8j1m6nl651a@trixie.katlan...
>>
>>>Hmm, I was browsing around on eclipse.org but couldn't find an answer to
>>>this:
>>>What is minimum version of the JRE required to run standalone SWT
>>>applications?
>>>
>>>On Tue, 10 May 2005 01:00:46 +0200, Steve Northover
>>><steve_northover@ca.ibm.com> wrote:
>>>
>>>
>>>>Eventually I imagine. It's not that we aren't following standards but
>>>>we
>>>>need to run on older verisons of the JDK.
>>>>
>>>>"kkconcome" <kkconcome@yahoo.com> wrote in message
>>>>news:c7a2d93fcbe415784e056e9bbd588795$1@www.eclipse.org...
>>>>
>>>>>Thanks Steve for your reply.
>>>>>
>>>>>So is SWT going to migrate to J2SE 5.0 and follow its standards?
>>>
>>>Regards
>>>--
>>> Max - rotvel AT bolignet-aarhus DOT dk
>>
>>
Previous Topic:SWT table, scrolling
Next Topic:Opening non modal window
Goto Forum:
  


Current Time: Thu Mar 28 13:09:55 GMT 2024

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

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

Back to the top