This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes add/edit parameters to the java compiler in Eclipse IDE. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "add/edit parameters to the java compiler in Eclipse IDE." Watch "add/edit parameters to the java compiler in Eclipse IDE." New topic
Author

add/edit parameters to the java compiler in Eclipse IDE.

Maxim Avezbakiev
Greenhorn

Joined: Aug 01, 2002
Posts: 5
Hello.
I start using eclipse IDE.
And I am wandaring how can I add/edit parameter to the java compiler of Eclipse. For example: I want to change the encoding to CP1251.
Thanks in advance.
Maxim.
Joe Pluta
Ranch Hand

Joined: Jun 23, 2003
Posts: 1376
Maxim, you shouldn't have to change the encoding. The workbench should pick up the coding automatically from the file itself. Also, the default encoding as far as I know is CP1252.
What problem are you seeing that you need to resolve?
Joe
Maxim Avezbakiev
Greenhorn

Joined: Aug 01, 2002
Posts: 5
Hi.
I want to be able to write String in other languages not from Latin1 group(Russian or Hebrew for example) inside my source code. Java compiler has a parameter -encoding that supposed to handle this situation.
But I don't know how to add/edit parameters for javac from eclipse.
Thanks in advance.
Maxim.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Eclipse doesn't use javac, but its own iternal compiler. Options can be set in the Preferences (Java/Compiler). Don't know about encoding, though.


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
Joe Pluta
Ranch Hand

Joined: Jun 23, 2003
Posts: 1376
I don't really know about encoding Hebrew text in a source file. In general, though, you might want to consider using resource bundles for static text. That will avoid this sort of problem.
If, however, you really need to be able to enter Hebrew text within the editor, this may help. I found it by searching on "text encoding" in the Help text:
"To change the encoding used by the Java editor to display source files:
With the Java editor open, select Edit > Encoding from the menu bar
Select an encoding from the menu or select Others and, in the dialog that appears, type in the encoding's name.

Note: this setting affects only the way the source is presented.

To change the encoding that the Java editor uses when saving files, specify a text file encoding preference on Window > Preferences > Workbench > Editors."
I hope this helps a little.
Joe
Maxim Avezbakiev
Greenhorn

Joined: Aug 01, 2002
Posts: 5
Thanks guys.
You are right, it helps a little.
And it leads me to the next question:
Can I force the Eclipse to use external java compiler and not the internal one?
Thanks in advance.
Maxim.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Maxim Avezbakiev:
Can I force the Eclipse to use external java compiler and not the internal one?

No. You *could* disable Eclipses autobuild feature and use Ant to compile your classes, though. But you would loose some of the cooler features of eclipse doing so, like incremental compiling.
 
 
subject: add/edit parameters to the java compiler in Eclipse IDE.
 
Similar Threads
Collection specific elements not generic problem
Log4J not printing line number
JAI and Eclipse IDE
What is the best IDE
ANT doesn't understand Java 5 @Override Annotation