This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse Java Editor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse Java Editor" Watch "Eclipse Java Editor" New topic
Author

Eclipse Java Editor

V Bose
Ranch Hand

Joined: Jul 10, 2003
Posts: 113
Is there a way I can specify the file format of a .java file (Mac, PC or Unix) when reading it ? For instance, if I read a java file created on a Mac OS, from a PC, the line temination characters are going to be different...
Tim West
Ranch Hand

Joined: Mar 15, 2004
Posts: 539
You shouldn't need to. As per the JLS, both Unix and Windows line line termination styles are legal. If a Java editor won't render one of these, it's a bug (at least according to the JLS).

In any case, Eclipse renders either type fine.

As for stripping off Windows-style line terminators when moving files about, I tend to use Emacs for this...I've never had to do enough that I've researched a better way. I imagine there's a single sed command that would do it though


--Tim
[ July 20, 2004: Message edited by: Tim West ]
Loren Rosen
Ranch Hand

Joined: Feb 12, 2003
Posts: 156
Eclipse can change the line delimiters of a file, via Source => Convert line delimiters to => ...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Eclipse Java Editor
 
Similar Threads
Java 1.5 and Macintosh
Any drawbacks of using a Mac to program java apps for multiple platforms?
Can I use Java 5.0 for the SCJD and start now?
Using JBindery on Macintosh
Deploying a WAR file on MAC OS X Leopard