• Post Reply 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

Is it me or just Eclipse... JEdit too...

 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hola,
I have recently downloaded Eclipse 3.0.2 and happily rushed to try it out on a simple app from a Java book. In an attempt to run that app in Eclipse it reported several synthax errors, but when I tried to compile the same app "manually" (source code in Notepad, javac command on the command prompt etc.) none of those errors were reported and the app executed just as expected. No changes were made in the source code while attempting to compile from the command prompt. How can that be, a synthax error in Eclipse is not a synthax error out of it?!
JEdit is a story too... compiler plug-in is reported to be missing when attempting to compile, although Plug-in Manager lists it as present and I am sure that it was downloaded... am I doing something wrong?
 
author & internet detective
Posts: 41855
904
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Gjorgi,
Can you post the error that you are getting? That will help us give a more specific answer.

In general, Eclipse allows you to customize whether certain things are treated as warnings, errors or ignored. For example, you can have Eclipse warn you about unused code. It is possible these settings are what is triggering your error. It could also be a classpath issue.
 
Gjorgi Var
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And here it is:

It basically objects to use of commas during array initialization (although I don't understand why is the last objection on ")").
The same untouched code that raised the exception was not at all objectionable during command-line compilation...
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, let's see the code. Tell us which is line 20.
 
Gjorgi Var
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

And there it is...
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Eclipse 3.0 doesn't recognise the 1.5 language constructs you're using and reports them as syntax errors.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jeroen is right. I you want to use Java 5, you need to install the latest Eclipse 3.1 milestone.
 
reply
    Bookmark Topic Watch Topic
  • New Topic