Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Gjorgi Var
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • 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?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34410
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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...
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator

And there it is...
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • 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.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic