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

From Eclipsepedia

Jump to: navigation, search
(See Also:)
m
Line 18: Line 18:
 
   java -cp eclipse/startup.jar org.eclipse.core.launcher.Main
 
   java -cp eclipse/startup.jar org.eclipse.core.launcher.Main
 
</pre>
 
</pre>
 
 
  
 
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;  
Line 34: Line 32:
 
</pre>
 
</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..
 
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 <tt>-vm</tt> so you can be sure of what VM you are using.
 
You should always use <tt>-vm</tt> so you can be sure of what VM you are using.
 
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.
 
 
  
 
The first time the <tt>eclipse</tt> command is executed,
 
The first time the <tt>eclipse</tt> command is executed,
Line 46: Line 41:
 
The workspace will contain all your projects, along with private metadata  
 
The workspace will contain all your projects, along with private metadata  
 
computed by various plug-ins.  
 
computed by various plug-ins.  
 
 
 
  
 
In Eclipse 3.0, you are prompted to choose a workspace location on start-up.
 
In Eclipse 3.0, you are prompted to choose a workspace location on start-up.
Line 59: Line 51:
 
The use of <tt>-data</tt> is advised because using the default workspace location  
 
The use of <tt>-data</tt> is advised because using the default workspace location  
 
will make it much more difficult for you to upgrade to new versions of Eclipse.
 
will make it much more difficult for you to upgrade to new versions of Eclipse.
 
 
 
 
  
 
== See Also: ==
 
== See Also: ==

Revision as of 11:55, 28 February 2007

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?

FAQ_How_do_I_increase_the_permgen_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.