• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

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

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 1376
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic