aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes How to pass -source 1.4 argument in Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "How to pass -source 1.4 argument in Eclipse" Watch "How to pass -source 1.4 argument in Eclipse" New topic
Author

How to pass -source 1.4 argument in Eclipse

Bharat Roy
Ranch Hand

Joined: Jul 01, 2004
Posts: 156
I want to use "assertion" using Eclipse but don't know where to pass -source 1.4 argument. Kindly help.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16305
    
  21

It's done on your Project. Select Preferences/Java Compiler and set Source Compatibility to 1.4 (or higher).

There's also a hyperlink there to set preferences for the entire workspace.


Customer surveys are for companies who didn't pay proper attention to begin with.
Bharat Roy
Ranch Hand

Joined: Jul 01, 2004
Posts: 156
Tim, thanks for the reply but its not working.

The Eclipse editor is complaining, "Syntax error on token assert" - which is not possible as it is getting compiled and run using notepad and command line.

I checked as you said and the default for the project is Java 1.4 version.

BTW I am using Eclipse 3.1.1 if that helps.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Did you check the compliance option ?

Window->Preferences->Java->Compiler->Compliance and Classfiles

Unchech "Use default compliance settings", and set the "source compatiblitiy" to 1.4.


[My Blog]
All roads lead to JavaRanch
Bharat Roy
Ranch Hand

Joined: Jul 01, 2004
Posts: 156
Thanks Satou, it worked
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to pass -source 1.4 argument in Eclipse