# Eclipse auf der Kommandozeile



## JPN (25. Februar 2005)

Hallo,

  ich habe bei www.eclipse.org nichts dazu gefunden:
 Welche Kommandozeilenoptionen gibt es für Eclipse? Bzw. konkreter: Wie kann ich die Umgebungsvariable file.encoding beim Aufruf der eclipse.exe auf UTF-8 setzen ?

  Vielen Dank für die Hilfe im voraus !

  Gruß 
  Paul


----------



## ocb (25. Februar 2005)

Warum per Kommandozeile?

  Window->Preferences->Editors->Text file encoding


----------



## JPN (25. Februar 2005)

Hi !

 Ich entwickle eine Applikation auf der Basis der RCP. Wenn ich diese Applikation unter Windows schreibe und unter Linux/Gnome ausführe sind die Umlaute unterschiedlich codiert und sehen wenig ansehnlich aus. Ich möchte jetzt beim Starten der Applikation einen Parameter übergeben, damit die Strings auf jedem Betriebssystem gleich codiert werden. Und da bietet sich UTF8 an, da die restlichen Daten als XML im UTF8-Format gespeichert werden Also alles in der selben Codierung.

 Gruß
 Paul


----------



## Thomas Darimont (26. Februar 2005)

Hallo!

Schau doch einfach mal ins readme Verzeichnis deiner Eclipse-Installation.
Dort findest du im Abschnitt "4. Running Eclipse".

Folgendes:

```
4. Running Eclipse

After installing the Eclipse SDK in a directory, you can start the Workbench by running the Eclipse executable included with the release (you also need a 1.4 JRE, not included with the Eclipse SDK). On Windows, the executable file is called eclipse.exe, and is located in the eclipse subdirectory of the install. If installed at c:\eclipse-SDK-3.0-win32, the executable is c:\eclipse-SDK-3.0-win32\eclipse\eclipse.exe. Note: Set-up on most other operating environments is analogous. Special instructions for Mac OS X are listed below.

Depending on the JRE that you are running, the number of plug-ins you are using, and the number of files you will be working with, you may have to increase the amount of memory that is available to the Java VM running Eclipse. Eclipse allows you to pass arguments directly to the Java VM using the -vmargs command line argument, which must follow all other Eclipse specific arguments. To increase the available memory, you would typically use:

    eclipse -vmargs -Xmx<memory size>

The <memory size> value should typically be at least "128M" (128 megabytes). Usually, "256M" (256 megabytes) is ample. You should not set this value to be larger than the amount of physical memory on your machine.

When the Workbench is launched, the first thing you see is a dialog that allows you to select where the workspace will be located. The workspace is the directory where your work will be stored. If you do not specify otherwise, Eclipse creates the workspace as a sibling of the executable (that is, at c:\eclipse-SDK-3.0-win32\eclipse\workspace). This workspace directory is used as the default content area for your projects as well as for holding any required metadata. For shared or multi-workspace installs you must explicitly specify the location for your workspace using the dialog (or via the "-data" command line argument).

Here is a typical Eclipse command line: 

    eclipse -vm c:\jdk1.4.2\jre\bin\javaw -vmargs -Xmx256M

Tip: It's generally a good idea to explicitly specify which Java VM to use when running Eclipse. This is achieved with the "-vm" command line argument as illustrated above. If you don't use "-vm", Eclipse will look on the O/S path. When you install other Java-based products, they may change your path and could result in a different Java VM being used when you next launch Eclipse.

To create a Windows shortcut to an installed Eclipse:

   1. Navigate to eclipse.exe in Windows Explorer and use Create Shortcut on the content menu.
   2. Select the shortcut and edit its Properties. In the Target: field append the command line arguments. 

Opening this shortcut launches Eclipse. (You can drag the shortcut to the Windows Desktop if you want to keep it in easy reach.)
```

HTH,

Gruß Tom


----------

