hengheng123456789

            BlogJava :: 首頁 :: 聯(lián)系 :: 聚合  :: 管理
            297 Posts :: 68 Stories :: 144 Comments :: 0 Trackbacks
          轉(zhuǎn)自:http://beansoft.blogchina.com/

          包括英文版本和中文版本兩種的說明, 特別需要值得一提的是那個 -nl 參數(shù), 可以指定程序啟動時所使用的語言. 例如:
          eclipse -nl en_US
          將啟動英文語言, 這個特性在安裝了國際化語言包以后特別有用, 可以方便的切換各個語言的版本. 注意 IBM WSAD v5.1 也支持這個功能.

          運行 Eclipse

          將 Eclipse 驅(qū)動程序安裝(解壓縮)到某個目錄(例如,c:\eclipse)中之后,通過運行頂級安裝目錄中的 Eclipse 可執(zhí)行文件來啟動"工作臺"。在 Windows 系統(tǒng)上,該可執(zhí)行文件稱為 eclipse.exe,而在 Linux 系統(tǒng)上稱為 eclipse。注意:下列討論描述 Windows 系統(tǒng)上的設(shè)置。Linux 上的設(shè)置是相似的。

          如果您沒有另行指定,則平臺將缺省工作區(qū)目錄創(chuàng)建為可執(zhí)行文件的兄弟目錄(例如 c:\eclipse\workspace)。此工作區(qū)目錄用作項目的缺省內(nèi)容區(qū),還用于保存任何必需的元數(shù)據(jù)。要進(jìn)行共享安裝或多工作區(qū)安裝,應(yīng)明確指出工作區(qū)的位置而不是使用缺省值。有兩種控制工作區(qū)位置的方法:使用當(dāng)前工作目錄或使用 -data 命令行自變量。

          將工作區(qū)位置設(shè)置為在當(dāng)前工作目錄內(nèi)

          在此方案中,工作區(qū)位置將是當(dāng)前工作目錄中稱為 workspace 的目錄。

          實現(xiàn)此目的最容易的方法可能是使用下列步驟來創(chuàng)建快捷方式:

          1. 導(dǎo)航到 Windows 資源管理器中的 eclipse.exe 并使用右鍵拖動來創(chuàng)建 eclipse.exe 的快捷方式。
          2. 編輯快捷方式的屬性,以使啟動位置:字段標(biāo)識工作區(qū)位置的父目錄(例如,c:\users\robert)。
          3. 關(guān)閉屬性對話框并雙擊快捷方式(如果提供的目錄為 c:\users\robert,則工作區(qū)位置將為 c:\users\robert\workspace)。

          當(dāng)然,您也可以使用命令提示符(通過將目錄切換為工作區(qū)父目錄然后運行 eclipse.exe)來獲得同樣的效果。

          使用 -data 設(shè)置工作區(qū)的特定位置

          要使用 -data 命令行自變量,只要將 -data your_workspace_location(例如,-data c:\users\robert\myworkspace)添加至快捷方式屬性中的目標(biāo)字段或顯式地將它包括在命令行上。

          使用 -vm 設(shè)置 java VM

          建議顯式指定在運行 Eclipse 時要使用哪個 Java VM。使用 -vm 命令行自變量(例如,-vm c:\jre\bin\javaw.exe)可以實現(xiàn)此目的。如果不使用 -vm,則 Eclipse 將使用在 O/S 路徑上找到的一個 Java VM。當(dāng)安裝其它產(chǎn)品時,它們可更改您的路徑,導(dǎo)致在下一次啟動 Eclipse 時使用另一 Java VM。

          運行 Eclipse 中的高級主題

          Eclipse 可執(zhí)行文件及平臺本身提供了人們感興趣的開發(fā)或調(diào)試 Eclipse 各部件的許多執(zhí)行選項。運行 Eclipse 可執(zhí)行文件的一般格式是:

          eclipse [platform options] [-vmargs [Java VM arguments]]
          <>Eclipse 啟動參數(shù) <>命令 描述
          原因
          -arch architecture
          定義 Eclipse 平臺在其上運行的處理器體系結(jié)構(gòu)。Eclipse 平臺通常使用 Java os.arch 屬性的常用值來計算最佳設(shè)置。如果在此處指定該項,則這是 Eclipse 平臺使用的值。此處指定的值可作為 BootLoader.getOSArch() 用于插件。示例值有:"x86"、"sparc"、"PA-RISC"和"ppc"。2.0
          -application applicationId
          要運行的應(yīng)用程序。應(yīng)用程序由向 org.eclipse.core.runtime.applications 擴(kuò)展點提供擴(kuò)展的插件來聲明。通常不需要此自變量。如果指定了此項,則該值會覆蓋配置提供的值。如果不指定此項,則會運行"Eclipse 工作臺"。1.0
          -boot bootJarURL
          (建議不使用;用 -configuration 代替;支持 1.0 兼容)。Eclipse 平臺的引導(dǎo)插件代碼(boot.jar)的位置,表示為 URL。如果指定此項,則會用它來為裝入 Eclipse 平臺引導(dǎo)程序類裝入器的類裝入器設(shè)置類路徑。僅當(dāng)更改 startup.jar 和 boot.jar 的相對位置時才需要它。注意,不允許使用相對 URL。 *1.0
          -classloaderproperties [file]
          如果指定的話,則使用給定位置處的類裝入器屬性文件來激活平臺類類裝入器增強(qiáng)。文件自變量可以是文件路徑或 URL。注意,不允許使用相對 URL。單擊此處以獲得更多詳細(xì)信息。 2.0.2
          -configuration configurationFileURL
          Eclipse 平臺配置文件的位置,表示為 URL。配置文件確定 Eclipse 平臺、可用插件集和主要功能部件的位置。注意,不允許使用相對 URL。當(dāng)安裝或更新 Eclipse 平臺時配置文件被寫至此位置。 2.0
          -consolelog
          將 Eclipse 平臺的錯誤日志鏡像到用來運行 Eclipse 的控制臺。與 -debug 組合時很方便使用。1.0
          -data workspacePath
          要運行 Eclipse 平臺的工作區(qū)的路徑。工作區(qū)位置也是項目的缺省位置。相對于從中啟動 eclipse 的目錄來解釋相對路徑。1.0
          -debug [optionsFile]
          將平臺置于調(diào)試方式,并從給定位置處的文件裝入調(diào)試選項(如果指定的話)。此文件指示哪些調(diào)試點可用于插件以及是否已啟用它們。如果未給出文件位置,則平臺在啟動 eclipse 的目錄中查找稱為".options"的文件。URL 和文件系統(tǒng)路徑都可作為文件位置。1.0
          -dev [classpathEntries]
          將平臺置于開發(fā)方式。將可選類路徑條目(用逗號分隔的列表)添加至每個插件的運行時類路徑。例如,當(dāng)工作區(qū)包含要開發(fā)的插件時,指定 -dev bin 會為每個插件項目的名為 bin 的目錄添加類路徑條目,允許在其中存儲最新生成的類文件。除去了冗余或不存在的類路徑條目。1.0
          -endsplash params
          用于在 Eclipse 平臺啟動并運行時關(guān)閉閃屏的內(nèi)部選項。此選項在閃屏處理鏈中不同的位置有不同的語法和語義。2.0
          -featurefeatureId
          主要功能部件的標(biāo)識。主要功能部件為 Eclipse 的已啟動實例提供了產(chǎn)品個性,并確定使用的產(chǎn)品定制信息。2.0
          -keyring keyringFilePath
          磁盤上授權(quán)數(shù)據(jù)庫(或"密鑰環(huán)"文件)的位置。此自變量必須與 -password 選項配合使用。相對于從中啟動 eclipse 的目錄來解釋相對路徑。1.0
          -nl locale
          定義 Eclipse 平臺在其上運行的語言環(huán)境的名稱。Eclipse 平臺通常自動計算最佳設(shè)置。如果在此處指定該項,則這是 Eclipse 平臺使用的值。此處指定的值可作為 BootLoader.getNL() 用于插件。示例值有:"en_US"和"fr_FR_EURO"。2.0
          -nolazyregistrycacheloading
          取消激活裝入優(yōu)化的平臺插件注冊表高速緩存。缺省情況下,僅當(dāng)需要時才從注冊表高速緩存(可用時)中裝入擴(kuò)展的配置元素,以減少內(nèi)存占用。此選項將在啟動時強(qiáng)制完全裝入注冊表高速緩存。2.1
          -noregistrycache
          繞過讀寫內(nèi)部插件注冊表高速緩存文件。2.0
          -nosplash
          運行平臺而不顯示閃屏。1.0
          -os operatingSystem
          定義 Eclipse 平臺在其上運行的操作系統(tǒng)。Eclipse 平臺通常使用 Java os.name 屬性的常用值來計算最佳設(shè)置。如果在此處指定該項,則這是 Eclipse 平臺使用的值。此處指定的值可作為 BootLoader.getOS() 用于插件,并用于解析插件清單文件中提及的路徑中 $os$ 變量的出現(xiàn)。示例值有:"win32"、"linux"、"hpux"、"solaris"和"aix"。1.0
          -password password
          授權(quán)數(shù)據(jù)庫的密碼。與 -keyring 選項配合使用。1.0
          -perspective perspectiveId
          啟動時要在活動工作臺窗口中打開的透視圖。如果沒有指定該參數(shù),則將打開關(guān)閉時活動的透視圖。1.0
          -plugincustomization
          	  propertiesFile
          包含插件首選項缺省設(shè)置的屬性文件的位置。這些缺省設(shè)置覆蓋在主要功能部件中指定的缺省設(shè)置。相對于從中啟動 eclipse 的目錄來解釋相對路徑。2.0
          -plugins pluginsFileURL
          (建議不使用;用 -configuration 代替;支持 1.0 兼容)。 指定 Eclipse 平臺查找插件的文件的位置,表示為 URL。該文件為屬性文件格式,其中鍵是任意用戶定義名稱,值是指向 plugin.xml 文件的顯式路徑或指向包含插件的目錄的路徑的用逗號分隔的列表。注意,不允許使用相對 URL。如果指定此項,則此選項會導(dǎo)致創(chuàng)建適當(dāng)?shù)呐R時配置。 *1.0
          -refresh
          啟動時執(zhí)行工作區(qū)的全局刷新的選項。這將使從上次平臺運行以來在文件系統(tǒng)中所做的任何更改一致。1.0
          -showlocation
          用于在窗口標(biāo)題欄中顯示工作區(qū)的位置的選項。在發(fā)行版 2.0 中,此選項僅與 -data 命令行自變量一起使用。2.0
          -showsplash params
          用于顯示閃屏(由可執(zhí)行的 Eclipse 平臺啟動器執(zhí)行)的內(nèi)部選項。此選項在閃屏處理鏈中不同的位置有不同的語法和語義。2.0
          -vm vmPath
          要用來運行 Eclipse 平臺的"Java 運行時環(huán)境"(JRE)的位置。如果不指定此項,則 JRE 位于 jre(它是 Eclipse 可執(zhí)行文件的兄弟目錄)。相對于從中啟動 eclipse 的目錄來解釋相對路徑。1.0
          -ws windowSystem
          定義 Eclipse 平臺在其上運行的 Windows 系統(tǒng)。Eclipse 平臺通常使用 Java os.name 屬性的常用值來計算最佳設(shè)置。如果在此處指定該項,則這是 Eclipse 平臺使用的值。此處指定的值可作為 BootLoader.getWS() 用于插件、用于配置 SWT 以及用于解析插件清單文件中提及的路徑中 $ws$ 變量的出現(xiàn)。示例值有:"win32"、"motif"和"gtk"。1.0

          將 -vmargs 條目后面的所有自變量(但不包括 -vmargs)作為虛擬機(jī)自變量(即,在要運行的類的前面)直接傳遞到所指示的 Java VM。注意:如果 Eclipse 啟動在 Java vm 自變量(-vmargs)之后提供的自變量(例如,-data),則 Eclipse 將不會啟動并且您將接收到"JVM 已終止。出口代碼為 1"的錯誤。

          在不同的 VM 上運行?

          在 J9 上運行 Eclipse

          當(dāng)在 J9 版本 1.5 上運行 Eclipse 時,建議使用以下 VM 選項:

          eclipse.exe [eclipse arguments] -vm path_to_j9w.exe 
                      -vmargs -ms:32 -mm:2048 -mo:32768 -moi:32768 -mca:32 -mco:128 -mx:2000000

          當(dāng)在 J9 版本 2.0 上運行 Eclipse 時,J9W 選擇的缺省自變量應(yīng)為合適的選項。但是,要覆蓋 Eclipse 可執(zhí)行文件以內(nèi)部方式自動設(shè)置的參數(shù),必須指定 -vmargs 不帶任何參數(shù),如下所示:

          eclipse.exe [eclipse arguments] -vm path_to_j9w.exe -vmargs

          有關(guān)進(jìn)一步信息,參考 J9 VM 文檔和幫助。

          在 IBM Developer Kit, Java(TM) Technology Edition VM 上運行 Eclipse

          IBM Developer Kit, Java(TM) Technology Edition 1.3 Linux 的缺省 VM 設(shè)置適合進(jìn)行初期研究工作,但在進(jìn)行大型開發(fā)時是不夠的。對于大型開發(fā),應(yīng)修改 VM 自變量以使有更多的堆可用。例如,下列設(shè)置將允許 Java 堆增大為 256MB:

          -vmargs -Xmx256M 


          Copyright IBM Corporation and others 2000, 2003

          Running Eclipse

          After you install (unzip) the Eclipse driver in a directory (such as c:\eclipse), start the Workbench by running the Eclipse executable file found in the top level install directory. The executable file is called eclipse.exe on Windows systems and eclipse on Linux systems. Note: the following discussion describes setting up on Windows systems. Setup on Linux is analogous.

          If you do not specify otherwise, the platform creates a default workspace directory as a sibling of the executable (for example, c:\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 should explicitly state the location of your workspace rather than using the default. There are two ways to control the location of your workspace: using the current working directory or using the -data command line argument.

          Setting the workspace location to be inside the current working directory

          In this scenario, the workspace location will be a directory called workspace inside the current working directory.

          Perhaps the easiest way of doing this is to create a shortcut using the following steps:

          1. Navigate to eclipse.exe in the Windows Explorer and using a right button drag, create a shortcut to eclipse.exe.
          2. Edit the properties of the shortcut such that the Start in: field identifies the parent directory of your workspace location (for example, c:\users\robert).
          3. Close the properties dialog and double-click on the shortcut (if the provided directory was c:\users\robert, the workspace location would be c:\users\robert\workspace).

          Of course you can get the same effect using a command prompt by changing directory to your workspace parent's directory and then running eclipse.exe.

          Setting a specific location for the workspace with -data

          To use the -data command line argument, simply add -data your_workspace_location (for example, -data c:\users\robert\myworkspace) to the Target field in the shortcut properties, or include it explicitly on your command line.

          Setting the java VM using -vm

          It is recommended that you explicitly specify which Java VM to use when running Eclipse. This is achieved with the -vm command line argument (for example, -vm c:\jre\bin\javaw.exe). If you don't use -vm, Eclipse will use the first Java VM found on the O/S path. When you install other products, they may change your path, resulting in a different Java VM being used when you next launch Eclipse.

          Advanced Topics in Running Eclipse

          The Eclipse executable and the platform itself offer a number of execution options of interest to people developing or debugging parts of Eclipse. The general form of running the Eclipse executable is:

          eclipse [platform options] [-vmargs [Java VM arguments]]
          <>Eclipse Startup Parameters <>Command Description
          Since
          -arch architecture
          Defines the processor architecture on which the Eclipse platform is running. The Eclipse platform ordinarily computes the optimal setting using the prevailing value of Java os.arch property. If specified here, this is the value that the Eclipse platform uses. The value specified here is available to plug-ins as BootLoader.getOSArch(). Example values: "x86", "sparc", "PA-RISC", "ppc".2.0
          -application applicationId
          The application to run. Applications are declared by plug-ins supplying extensions to the org.eclipse.core.runtime.applications extension point. This argument is typically not needed. If specified, the value overrides the value supplied by the configuration. If not specified, the Eclipse Workbench is run.1.0
          -boot bootJarURL
          (Deprecated; replaced by -configuration; supported for 1.0 compatibility). The location of the Eclipse platform's boot plug-in code (boot.jar), expressed as a URL. If specified, it is used to set the classpath for the class loader that loads the Eclipse platform bootstrap class loader. Only required when changing the relative location of startup.jar and boot.jar. Note that relative URLs are not allowed. *1.0
          -classloaderproperties [file]
          Activates platform class loader enhancements using the class loader properties file at the given location, if specified. The file argument can be either a file path or a URL. Note that relative URLs are not allowed. Click here for more details. 2.0.2
          -configuration configurationFileURL
          The location for the Eclipse Platform configuration file, expressed as a URL. The configuration file determines the location of the Eclipse platform, the set of available plug-ins, and the primary feature. Note that relative URLs are not allowed. The configuration file is written to this location when the Eclipse platform is installed or updated. 2.0
          -consolelog
          Mirrors the Eclipse platform's error log to the console used to run Eclipse. Handy when combined with -debug.1.0
          -data workspacePath
          The path of the workspace on which to run the Eclipse platform. The workspace location is also the default location for projects. Relative paths are interpreted relative to the directory that Eclipse was started from.1.0
          -debug [optionsFile]
          Puts the platform in debug mode and loads the debug options from the file at the given location, if specified. This file indicates which debug points are available for a plug-in and whether or not they are enabled. If a file location is not given, the platform looks in the directory that eclipse was started from for a file called ".options". Both URLs and file system paths are allowed as file locations. 1.0
          -dev [classpathEntries]
          Puts the platform in development mode. The optional classpath entries (a comma separated list) are added to the runtime classpath of each plug-in. For example, when the workspace contains plug-ins being developed, specifying -dev bin adds a classpath entry for each plug-in project's directory named bin, allowing freshly generated class files to be found there. Redundant or non-existent classpath entries are eliminated.1.0
          -endsplash params
          Internal option for taking down the splash screen when the Eclipse platform is up and running. This option has different syntax and semantics at various points along the splash screen processing chain.2.0
          -featurefeatureId
          The ID of the primary feature. The primary feature gives the launched instance of Eclipse its product personality, and determines the product customization information used.2.0
          -keyring keyringFilePath
          The location of the authorization database (or "key ring" file) on disk. This argument must be used in conjunction with the -password option. Relative paths are interpreted relative to the directory that Eclipse was started from.1.0
          -nl locale
          Defines the name of the locale on which the Eclipse platform is running. The Eclipse platform ordinarily computes the optimal setting automatically. If specified here, this is the value that the Eclipse platform uses. The value specified here is available to plug-ins as BootLoader.getNL(). Example values: "en_US" and "fr_FR_EURO".2.0
          -nolazyregistrycacheloading
          Deactivates platform plug-in registry cache loading optimization. By default, extensions' configuration elements will be loaded from the registry cache (when available) only on demand, reducing memory footprint. This option will force the registry cache to be fully loaded at startup.2.1
          -noregistrycache
          Bypasses the reading and writing of an internal plug-in registry cache file.2.0
          -nosplash
          Runs the platform without putting up the splash screen.1.0
          -os operatingSystem
          Defines the operating system on which the Eclipse platform is running. The Eclipse platform ordinarily computes the optimal setting using the prevailing value of Java os.name property. If specified here, this is the value that the Eclipse platform uses. The value specified here is available to plug-ins as BootLoader.getOS(), and used to resolve occurrences of the $os$ variable in paths mentioned in the plug-in manifest file. Example values: "win32", "linux", "hpux", "solaris", "aix".1.0
          -password password
          The password for the authorization database. Used in conjunction with the -keyring option.1.0
          -perspective perspectiveId
          The perspective to open in the active workbench window on startup. If this parameter is not specified, the perspective that was active on shutdown will be opened.1.0
          -plugincustomization
          	  propertiesFile
          The location of a properties file containing default settings for plug-in preferences. These default settings override default settings specified in the primary feature. Relative paths are interpreted relative to the directory that eclipse was started from.2.0
          -plugins pluginsFileURL
          (Deprecated; replaced by -configuration; supported for 1.0 compatibility). The location of the file that specifies where the Eclipse platform finds plug-ins, expressed as a URL. The file is in property file format where the keys are arbitrary user defined names and the values are comma separated lists of either explicit paths to plugin.xml files, or paths to directories containing plug-ins. Note that relative URLs are not allowed. If specified, this option causes the creation of a suitable temporary configuration. *1.0
          -refresh
          Option for performing a global refresh of the workspace on startup. This will reconcile any changes that were made in the file system since the platform was last run. 1.0
          -showlocation
          Option for displaying the location of the workspace in the window title bar. In release 2.0 this option only worked in conjunction with the -data command line argument.2.0
          -showsplash params
          Internal option for showing the splash screen (done by the executable Eclipse platform launcher). This option has different syntax and semantics at various points along the splash screen processing chain.2.0
          -vm vmPath
          The location of Java Runtime Environment (JRE) to use to run the Eclipse platform. If not specified, the JRE is at jre, sibling of the Eclipse executable. Relative paths are interpreted relative to the directory that eclipse was started from.1.0
          -ws windowSystem
          Defines the window system on which the Eclipse platform is running. The Eclipse platform ordinarily computes the optimal setting using the prevailing value of Java os.name property. If specified here, this is the value that the Eclipse platform uses. The value specified here is available to plug-ins as BootLoader.getWS(), used to configure SWT, and used to resolve occurrences of the $ws$ variable in paths mentioned in the plug-in manifest file. Example values: "win32", "motif", "gtk".1.0

          All arguments following (but not including) the -vmargs entry are passed directly through to the indicated Java VM as virtual machine arguments (that is, before the class to run). Note: If an Eclipse startup argument, such as -data, is provided after the Java vm arguments (-vmargs), Eclipse will not start and you will receive a "JVM terminated. Exit code=1" error.

          Running on Different VMs?

          Running Eclipse on J9

          When running Eclipse on J9 version 1.5, it is recommended that you use the following VM options:

          eclipse.exe [eclipse arguments] -vm path_to_j9w.exe 
                      -vmargs -ms:32 -mm:2048 -mo:32768 -moi:32768 -mca:32 -mco:128 -mx:2000000

          When running Eclipse on J9 version 2.0, the default arguments chosen by J9W should be suitable. However, to override the parameters which are automatically set internally by the Eclipse executable, you must specify -vmargs with no following arguments as follows:

          eclipse.exe [eclipse arguments] -vm path_to_j9w.exe -vmargs

          Please refer to the J9 VM documentation and help for further information.

          Running Eclipse on the IBM Developer Kit, Java(TM) Technology Edition VM

          The default VM settings for IBM Developer Kit, Java(TM) Technology Edition 1.3 Linux work well for initial exploration, but are not sufficient for large scale development. For large scale development you should modify your VM arguments to make more heap available. For example, the following setting will allow the Java heap to grow to 256MB:?

          -vmargs -Xmx256M 

          ?

          posted on 2007-03-22 16:33 哼哼 閱讀(5019) 評論(1)  編輯  收藏 所屬分類: JAVA-Eclipse

          Feedback

          # re: Eclipse 運行命令行參數(shù)大全(轉(zhuǎn))[未登錄] 2007-03-22 19:39 BeanSoft
          呵呵, 以前的老文了... 客氣的是 blogchina 說改版就改版, 結(jié)果改的我的文章面目全非, 貼圖也沒了, 真是讓人傷心  回復(fù)  更多評論
            

          主站蜘蛛池模板: 肃南| 黎川县| 进贤县| 石门县| 湛江市| 安远县| 宜宾市| 安泽县| 濉溪县| 崇明县| 神农架林区| 杂多县| 博客| 观塘区| 青铜峡市| 泽普县| 红河县| 龙门县| 三亚市| 长岛县| 元氏县| 屏山县| 九江市| 称多县| 襄樊市| 中超| 郸城县| 民和| 兰西县| 沙田区| 安达市| 仁怀市| 新疆| 莱芜市| 贵南县| 横山县| 武山县| 武义县| 宝应县| 宁津县| 伊川县|