Jump to: navigation, search

Difference between revisions of "FAQ How do I run Eclipse?"

(Add the 'eclipse.ini' option to modify eclipse startup configuration)
Line 23: Line 23:
 
If available under the <tt>eclipse/jre</tt>  directory, the Eclipse JRE will be used;  
 
If available under the <tt>eclipse/jre</tt>  directory, the Eclipse JRE will be used;  
 
otherwise the launcher will consult the <tt>JAVA_HOME</tt> system path variable.
 
otherwise the launcher will consult the <tt>JAVA_HOME</tt> system path variable.
A better option is to explicitly specify a JVM of your choice, using the <tt>-vm</tt> command
+
To explicitly specify a JVM of your choice, you can use the <tt>-vm</tt> command
 
line argument:
 
line argument:
 
<pre>
 
<pre>
 
   eclipse -vm c:/jre/bin/javaw.exe
 
   eclipse -vm c:/jre/bin/javaw.exe
 
</pre>
 
</pre>
 
+
Another option is to put startup configuration into an 'eclipse.ini' file. The Eclipse program launcher will read arguments from either the command-line or the configuration file named 'eclipse.ini'. To specify a JVM using configuration file, create a text file named eclipse.ini in the same folder as eclipse.exe with these contents:
 
+
<pre>
 +
-vm
 +
c:/jre/bin/javaw.exe
 +
</pre>
 +
Eclipse now will launch without additional arguments in the command-line, with the JVM specified in the 'eclipse.ini' configuration file. Windows users: please be sure that the file you created has .ini extension, you may need to uncheck the 'Folder Options:View:Hide file extensions for known file types' from the Windows Explorer's Tools menu..
  
  
Line 35: Line 39:
 
Installers for other applications sometimes modify the <tt>JAVA_HOME</tt> variable,  
 
Installers for other applications sometimes modify the <tt>JAVA_HOME</tt> variable,  
 
thus changing the VM used to launch Eclipse without your knowing about it.
 
thus changing the VM used to launch Eclipse without your knowing about it.
 
  
  
Line 65: Line 68:
 
[[FAQ_How_do_I_increase_the_heap_size_available_to_Eclipse%3F]]
 
[[FAQ_How_do_I_increase_the_heap_size_available_to_Eclipse%3F]]
  
 +
[http://www.eclipse.org/swt/launcher.html The Eclipse Program Launcher]
  
 
[[FAQ_Who_shows_the_Eclipse_splash_screen%3F]]
 
[[FAQ_Who_shows_the_Eclipse_splash_screen%3F]]
  
 
<hr><font size=-2>This FAQ was originally published in [http://www.eclipsefaq.org Official Eclipse 3.0 FAQs]. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the [http://www.eclipse.org/legal/epl-v10.html Eclipse Public License v1.0].</font>
 
<hr><font size=-2>This FAQ was originally published in [http://www.eclipsefaq.org Official Eclipse 3.0 FAQs]. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the [http://www.eclipse.org/legal/epl-v10.html Eclipse Public License v1.0].</font>

Revision as of 12:43, 12 June 2006

When you unzip the Eclipse SDK, it creates a base install directory called eclipse. The directory layout looks something like this:

   eclipse/
      features/			''the directory containing Eclipse features''
      plugins/			''the directory containing Eclipse plugins''
      eclipse.exe		''platform executable''
      cpl-v10.html		''the CPL license''
      install.ini	
      jre/				''the JRE to run Eclipse with''
      notice.html	
      readme	
      startup.jar		''classes needed to start the platform''

You can start Eclipse by running eclipse.exe on Windows or eclipse on other platforms. This small launcher runs a JVM with the following arguments:

   java -cp eclipse/startup.jar org.eclipse.core.launcher.Main


If available under the eclipse/jre directory, the Eclipse JRE will be used; otherwise the launcher will consult the JAVA_HOME system path variable. To explicitly specify a JVM of your choice, you can use the -vm command line argument:

   eclipse -vm c:/jre/bin/javaw.exe

Another option is to put startup configuration into an 'eclipse.ini' file. The Eclipse program launcher will read arguments from either the command-line or the configuration file named 'eclipse.ini'. To specify a JVM using configuration file, create a text file named eclipse.ini in the same folder as eclipse.exe with these contents:

-vm
c:/jre/bin/javaw.exe

Eclipse now will launch without additional arguments in the command-line, with the JVM specified in the 'eclipse.ini' configuration file. Windows users: please be sure that the file you created has .ini extension, you may need to uncheck the 'Folder Options:View:Hide file extensions for known file types' from the Windows Explorer's Tools menu..


You should always use -vm so you can be sure of what VM you are using. Installers for other applications sometimes modify the JAVA_HOME variable, thus changing the VM used to launch Eclipse without your knowing about it.


The first time the eclipse command is executed, the platform creates a workspace directory, such as eclipse/workspace. The workspace will contain all your projects, along with private metadata computed by various plug-ins.



In Eclipse 3.0, you are prompted to choose a workspace location on start-up. Previously, the platform stored the workspace in the Eclipse install directory by default. In all versions of Eclipse, you can manually specify the workspace location on the command line, using the -data <workspace-path> command-line argument. The easiest way to quickly start Eclipse on different workspaces for versions before Eclipse 3.0 is to create shortcuts or shell scripts for each launch. The use of -data is advised because using the default workspace location will make it much more difficult for you to upgrade to new versions of Eclipse.



See Also:

FAQ_How_do_I_increase_the_heap_size_available_to_Eclipse?

The Eclipse Program Launcher

FAQ_Who_shows_the_Eclipse_splash_screen?


This FAQ was originally published in Official Eclipse 3.0 FAQs. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the Eclipse Public License v1.0.