aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes Is it me or just Eclipse... JEdit too... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Is it me or just Eclipse... JEdit too..." Watch "Is it me or just Eclipse... JEdit too..." New topic
Author

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

Gjorgi Var
Ranch Hand

Joined: Feb 24, 2004
Posts: 85
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

Joined: May 26, 2003
Posts: 30758
    
156

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Gjorgi Var
Ranch Hand

Joined: Feb 24, 2004
Posts: 85
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

Joined: Jul 08, 2003
Posts: 24187
    
  34

Well, let's see the code. Tell us which is line 20.


[Jess in Action][AskingGoodQuestions]
Gjorgi Var
Ranch Hand

Joined: Feb 24, 2004
Posts: 85

And there it is...
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
Eclipse 3.0 doesn't recognise the 1.5 language constructs you're using and reports them as syntax errors.


42
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Jeroen is right. I you want to use Java 5, you need to install the latest Eclipse 3.1 milestone.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Is it me or just Eclipse... JEdit too...