Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

bang head error

 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
hi
can anyone please tell me how can i remove following error... tell me briefly.
paying attention to this post and also reply is encouraged from my side..

regards.
Amir iqbal


Note:
i am so confused coz when i use the same code in a desktop project no error like this generated. but when i try the same code in
JSP-Servlet meanz web application the following error frustrate me...


THE ERROR IS:
C:\Documents and Settings\aamir\Desktop\tryone\src\CompileSourceInMemory.java:35: generics are not supported in -source 1.4

(use -source 5 or higher to enable generics)

DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<JavaFileObject>();
 
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
You have specified that you want the compiler to use the 1.4 style checking, and generic is a feature of Java 1.5.

Somewhere you are using something like
ArrayList<String> which is only allowed in 1.5

Either change the switch to your compiler to 1.5 or higher, or remove the use of generics in your source code.

(Hi Pat, I just edited your post so that the generics <String> was visible - PC)
[ March 29, 2008: Message edited by: Paul Clapham ]
 
Ranch Hand
Posts: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
your thread is still alive.

please don't post the same question multiple times, as it wastes people's time when multiple redundant conversations take place.
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic