Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Maxim Avezbakiev
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1376
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Joe Pluta
Ranch Hand
Posts: 1376
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic