![]() |
|
|
|||||||
![]() |
Java - How would you invoke arrayList.get() through reflection in 1.4 ?? |
|
|
Thread Tools | Search this Thread |
|
|
#11 |
|
In article <hd2j1t$sfj$>,
markspace <> wrote: > Lew wrote: > > > > > you probably also needed "-target 1.4" and perhaps even > > I had that, it didn't seem to work either. > > Under Properties -> Libraries, there's a "Java Platform" drop down menu. > I don't have Java 1.4 installed, so I can't check, but I'm going to > guess that switching that menu will enable NetBeans to use a different > JDK and also set the -target flag correctly. I was similarly stymied for a time in NetBeans 6.5. On my machine, Java 1.5 is the default; I had to add 1.4.2 and 1.6 in the Tools -> Java Platforms dialog. Even after making 1.6 available, I couldn't change Properties -> Source/Binary Format to JDK 6 until I first set Properties -> Libraries -> Java Platform to JDK 1.6. -- John B. Matthews trashgod at gmail dot com <http://sites.google.com/site/drjohnbmatthews> John B. Matthews |
|
|
|
|
#12 |
|
Posts: n/a
|
On Thu, 5 Nov 2009 06:47:16 -0800 (PST), Sébastien de Mapias
<> wrote, quoted or indirectly quoted someone who said : >if (method.getReturnType().toString().equals("interfa ce >java.util.List")) if you know at compile time you are looking for a java.util.List interface object, you don't need reflection or anything fancy. Just do a Class.forName and cast to a (List) or use generics to cast it for you. You can then use a List ref to access all the methods of List in a straightforward way. -- Roedy Green Canadian Mind Products http://mindprod.com Without deviation from the norm, progress is not possible. ~ Frank Zappa (born: 1940-12-21 died: 1993-12-04 at age: 52) Roedy Green |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Reflection Mutiple Promts | rmoneype | Software | 0 | 05-08-2008 01:49 AM |
| Attachmate / WRQ Reflection Macro Errors | John | Computer Information | 0 | 12-12-2006 10:12 PM |
| looking for another way to invoke "scan for hardware changes" | Jack B. Pollack | Computer Support | 3 | 11-15-2005 01:56 AM |
| gospel and reflection | neil20002us@yahoo.com | Computer Support | 1 | 08-16-2005 01:08 AM |
| gospel and reflection | neil20002us@yahoo.com | Computer Support | 1 | 08-16-2005 12:31 AM |