Eclipse RCP를 개발하다보면 Eclipse Framework에서 기본적으로 제공하는 View들을 사용하고자 할 때가 있다.
예를 들어 Project Explorer, Outline 등이 있다.
이와 같은 View들을 추가하기 위해서는 각 View ID를 알아야 한다. 이 ID를 일일이 찾기 쉽지 않고, ID만으로는 어떤 View인지 식별이 잘 안되는 경우가 있다. 이럴 때 간편하게 ID를 확인하는 방법이 Plug-in Spy를 이용하는 것이다.
Eclipse에서 참조하고자 하는 View를 열어 Focus on 시킨 후 Alt +Shift + F1 을 누르면
아래와 같이 View ID(Identifier)를 확인할 수 있다.
확인한 View ID에 관련된 plugin이 없을 경우, Depency에 추가하고 Perspective에 addView시켜주면 Eclipse에서 기본적으로 제공하는 View들을 RCP에서 사용할 수 있다.
Monday, 27 April 2015
[Java] How to open a PDF File ( PDF 파일 열기)
자바에서 PDF를 포함한 파일을 여는 방법.
rundll32을 이용하는 방법도 있지만, 이는 Windows 플랫폼에 한정된다.
이 때는 java.awt.Desktop을 이용하면 Platform에 상관없이 구현이 가능하다.
Ex)
rundll32을 이용하는 방법도 있지만, 이는 Windows 플랫폼에 한정된다.
이 때는 java.awt.Desktop을 이용하면 Platform에 상관없이 구현이 가능하다.
Ex)
package pe.dorbae.blog.sample;
import java.awt.Desktop;
import java.io.File;
import java.io.IOException;
public class OpenPDF {
public static void main ( String [] args) throws Exception {
String path = System. getProperty ( "user.dir" ) + File. separatorChar + "HelloJava.pdf" ;
File pdfFile = new File( path );
if ( !pdfFile .exists())
throw new Exception( path + " is not exists." );
if ( Desktop . isDesktopSupported()) {
try {
Desktop .getDesktop ().open( pdfFile);
} catch ( IOException e) {
throw new Exception( "Openning " + path + " is failed.", e.getCause());
}
} else {
throw new Exception( "Openning " + path + " is not supported in this desktop.");
}
}
}
|
Wednesday, 22 April 2015
[OSGI] Launch Parameter
Parameter | 설명 |
---|---|
consoleLog | 어플리케이션의 에러 메시지를 System.out (Standard-out)으로 출력한다. System.out으로 출력되는 메시지는 Eclipse IDE Console 뷰로 볼 수 있다. |
nl | 어플리케이션의 실행 언어를 지정할 수 있다. 예를 들어 -nl ko 를 주면 한국어를 사용하여 어플리케이션을 실행한다. 이는 Translation을 테스트할 때 용이하다. |
console | OSGi 콘솔에 접근할 수 있도록 한다.OSGi 콘솔을 통해 어플리케이션의 상태를 확인할 수 있다. |
noExit | Application이 충돌나도 OSGi 콘솔을 열어둔다. 이를 통해서 어플리케이션이 구동되는 동안 어플리케이션의 충돌 여부에 상관없이 어플리케이션 Dependencies를 분석할 수 있도록 한다. |
clearPersistedState | Eclipse4는 어플리케이션 모델의 실행 시 변경 사항을 캐시 시키는데 이것을 삭제한다. 실제로 변경 사항은 Workspace Location에 저장된다. |
Tuesday, 21 April 2015
[Java] System Properties 값들 정리
System 클래스에 있는 getProperty( String key) 메소드를 이용하여 시스템 정보를 가져올 수 있다.
주요 프로퍼티는
java.version : Java 버전
java.vendor : Java 공급자
java.vendor.url : Java 공급자 URL
java.home : Java가 위치한 디렉터리
java.class.version : Java 클래스의 버전 ( 48(1.4), 49(1.5), 50(1.6), 51(1.7), 52(1.8) ...
java.class.path : App ClassLoader에 로딩된 클래스 경로
java.ext.dir : Ext ClassLoader에 로드할 클래스가 위치한 경로
os.name : OS명 의 이름
os.arch : OS 아키텍처
os.version : OS 버전
file.separator : 파일 구분자 /(Unix계열), \(Windows) ※ File 클래스의 separator변수(String) 을 사용해도 된다.
path.separator : 경로 구분자. :(Unix계열), ;(Windows) ※ File 클래스의 separator변수(String) 을 사용해도 된다.
line.separator : 개행 문자 0x0A(LF, Unix계열), 0x0D0x0A(CR/LF, Windows) ※ Unix 계열은 개행문자가 1Byte, Windows는 2Bytes 명심
user.name : 사용자 계정명
user.home : 사용자 홈 디렉토리
user.dir : 현재 작업 디렉토리
Java 실행 시 JVM 옵션으로 -D[key]=[value] 와 같이 key와 value를 Define해주면
System.getProperty( key)로 정의된 값을 불러 올 수 있다.
실행 시마다 동적으로 바뀌는 값을 구현하는데 용이하다.
ex)
다음과 같은 클래스를 실행시키면
java -Dmy.name=dorbae Hello
위와 같은 결과가 출력된다.
아래는 기본적인 Java 프로그램에 있는 시스템 환경 값들이다.
awt.toolkit = sun.awt.windows.WToolkit
file.encoding = MS949
file.encoding.pkg = sun.io
file.separator = \
java.awt.graphicsenv = sun.awt.Win32GraphicsEnvironment
java.awt.printerjob = sun.awt.windows.WPrinterJob
java.class.path = D:\Eclipse\Eclipse-Luna_iScheduler\workspace\pe.dorbae.util\bin;D:\Eclipse\Eclipse-Luna_iScheduler\workspace\pe.dorbae.util\lib\logger\log4j-1.2.16.jar;D:\Eclipse\Eclipse-Luna_iScheduler\workspace\pe.dorbae.util\lib\logger\slf4j-api-1.7.5.jar;D:\Eclipse\Eclipse-Luna_iScheduler\workspace\pe.dorbae.util\lib\logger\slf4j-log4j12-1.7.5.jar;D:\Eclipse\Eclipse-Luna_iScheduler\workspace\pe.dorbae.util\lib\sap\sapjco3.jar
java.class.version = 50.0
java.endorsed.dirs = C:\Program Files\Java\jre6\lib\endorsed
java.ext.dirs = C:\Program Files\Java\jre6\lib\ext;C:\Windows\Sun\Java\lib\ext
java.home = C:\Program Files\Java\jre6
java.io.tmpdir = C:\Users\ADMINI~1\AppData\Local\Temp\
java.library.path = C:\Program Files\Java\jre6\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jdk1.7.0_45/bin/../jre/bin/server;C:/Program Files/Java/jdk1.7.0_45/bin/../jre/bin;C:/Program Files/Java/jdk1.7.0_45/bin/../jre/lib/amd64;C:\Program iles\Java\jdk1.7.0_45\bin;C:\Program Files\Java\jdk1.6.0_33\bin;C:\Program Files (x86)\Wizvera\Delfino;C:\Windows\system32;C:\Windows;C:\Windows\system32\wbem;C:\Windows\system32\windowspowershell\v1.0\;c:\program files\tortoisesvn\bin;c:\program files\ibm\gsk8\lib64;c:\program files (x86)\ibm\gsk8\lib;C:\PROGRA~1\IBM\SQLLIB\BIN;C:\PROGRA~1\IBM\SQLLIB\FUNCTION;C:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL;D:\Eclipse\Eclipse_Android\sdk\tools;C:\Program Files (x86)\IDM Computer Solutions\UltraEdit\;D:\Eclipse\Eclipse-Luna_iScheduler\eclipse;;.
java.runtime.name = Java(TM) SE Runtime Environment
java.runtime.version = 1.6.0_33-b05
java.specification.name = Java Platform API Specification
java.specification.vendor = Sun Microsystems Inc.
java.specification.version = 1.6
java.vendor = Sun Microsystems Inc.
java.vendor.url = http://java.sun.com/
java.vendor.url.bug = http://java.sun.com/cgi-bin/bugreport.cgi
java.version = 1.6.0_33
java.vm.info = mixed mode
java.vm.name = Java HotSpot(TM) 64-Bit Server VM
java.vm.specification.name = Java Virtual Machine Specification
java.vm.specification.vendor = Sun Microsystems Inc.
java.vm.specification.version = 1.0
java.vm.vendor = Sun Microsystems Inc.
java.vm.version = 20.8-b03
line.separator =
os.arch = amd64
os.name = Windows 7
os.version = 6.1
path.separator = ;
sun.arch.data.model = 64
sun.boot.class.path = C:\Program Files\Java\jre6\lib\resources.jar;C:\Program Files\Java\jre6\lib\rt.jar;C:\Program Files\Java\jre6\lib\sunrsasign.jar;C:\Program Files\Java\jre6\lib\jsse.jar;C:\Program Files\Java\jre6\lib\jce.jar;C:\Program Files\Java\jre6\lib\charsets.jar;C:\Program Files\Java\jre6\lib\modules\jdk.boot.jar;C:\Program Files\Java\jre6\classes
sun.boot.library.path = C:\Program Files\Java\jre6\bin
sun.cpu.endian = little
sun.cpu.isalist = amd64
sun.desktop = windows
sun.io.unicode.encoding = UnicodeLittle
sun.java.command = com.dorbae.util.DorbaeSystemUtil
sun.java.launcher = SUN_STANDARD
sun.jnu.encoding = MS949
sun.management.compiler = HotSpot 64-Bit Tiered Compilers
sun.os.patch.level = Service Pack 1
user.country = KR
user.dir = D:\Eclipse\Eclipse-Luna_iScheduler\workspace\pe.dorbae.util
user.home = C:\Users\Administrator
user.language = ko
user.name = Administrator
user.timezone =
user.variant =
주요 프로퍼티는
java.version : Java 버전
java.vendor : Java 공급자
java.vendor.url : Java 공급자 URL
java.home : Java가 위치한 디렉터리
java.class.version : Java 클래스의 버전 ( 48(1.4), 49(1.5), 50(1.6), 51(1.7), 52(1.8) ...
java.class.path : App ClassLoader에 로딩된 클래스 경로
java.ext.dir : Ext ClassLoader에 로드할 클래스가 위치한 경로
os.name : OS명 의 이름
os.arch : OS 아키텍처
os.version : OS 버전
file.separator : 파일 구분자 /(Unix계열), \(Windows) ※ File 클래스의 separator변수(String) 을 사용해도 된다.
path.separator : 경로 구분자. :(Unix계열), ;(Windows) ※ File 클래스의 separator변수(String) 을 사용해도 된다.
line.separator : 개행 문자 0x0A(LF, Unix계열), 0x0D0x0A(CR/LF, Windows) ※ Unix 계열은 개행문자가 1Byte, Windows는 2Bytes 명심
user.name : 사용자 계정명
user.home : 사용자 홈 디렉토리
user.dir : 현재 작업 디렉토리
Java 실행 시 JVM 옵션으로 -D[key]=[value] 와 같이 key와 value를 Define해주면
System.getProperty( key)로 정의된 값을 불러 올 수 있다.
실행 시마다 동적으로 바뀌는 값을 구현하는데 용이하다.
ex)
다음과 같은 클래스를 실행시키면
java -Dmy.name=dorbae Hello
위와 같은 결과가 출력된다.
아래는 기본적인 Java 프로그램에 있는 시스템 환경 값들이다.
awt.toolkit = sun.awt.windows.WToolkit
file.encoding = MS949
file.encoding.pkg = sun.io
file.separator = \
java.awt.graphicsenv = sun.awt.Win32GraphicsEnvironment
java.awt.printerjob = sun.awt.windows.WPrinterJob
java.class.path = D:\Eclipse\Eclipse-Luna_iScheduler\workspace\pe.dorbae.util\bin;D:\Eclipse\Eclipse-Luna_iScheduler\workspace\pe.dorbae.util\lib\logger\log4j-1.2.16.jar;D:\Eclipse\Eclipse-Luna_iScheduler\workspace\pe.dorbae.util\lib\logger\slf4j-api-1.7.5.jar;D:\Eclipse\Eclipse-Luna_iScheduler\workspace\pe.dorbae.util\lib\logger\slf4j-log4j12-1.7.5.jar;D:\Eclipse\Eclipse-Luna_iScheduler\workspace\pe.dorbae.util\lib\sap\sapjco3.jar
java.class.version = 50.0
java.endorsed.dirs = C:\Program Files\Java\jre6\lib\endorsed
java.ext.dirs = C:\Program Files\Java\jre6\lib\ext;C:\Windows\Sun\Java\lib\ext
java.home = C:\Program Files\Java\jre6
java.io.tmpdir = C:\Users\ADMINI~1\AppData\Local\Temp\
java.library.path = C:\Program Files\Java\jre6\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jdk1.7.0_45/bin/../jre/bin/server;C:/Program Files/Java/jdk1.7.0_45/bin/../jre/bin;C:/Program Files/Java/jdk1.7.0_45/bin/../jre/lib/amd64;C:\Program iles\Java\jdk1.7.0_45\bin;C:\Program Files\Java\jdk1.6.0_33\bin;C:\Program Files (x86)\Wizvera\Delfino;C:\Windows\system32;C:\Windows;C:\Windows\system32\wbem;C:\Windows\system32\windowspowershell\v1.0\;c:\program files\tortoisesvn\bin;c:\program files\ibm\gsk8\lib64;c:\program files (x86)\ibm\gsk8\lib;C:\PROGRA~1\IBM\SQLLIB\BIN;C:\PROGRA~1\IBM\SQLLIB\FUNCTION;C:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL;D:\Eclipse\Eclipse_Android\sdk\tools;C:\Program Files (x86)\IDM Computer Solutions\UltraEdit\;D:\Eclipse\Eclipse-Luna_iScheduler\eclipse;;.
java.runtime.name = Java(TM) SE Runtime Environment
java.runtime.version = 1.6.0_33-b05
java.specification.name = Java Platform API Specification
java.specification.vendor = Sun Microsystems Inc.
java.specification.version = 1.6
java.vendor = Sun Microsystems Inc.
java.vendor.url = http://java.sun.com/
java.vendor.url.bug = http://java.sun.com/cgi-bin/bugreport.cgi
java.version = 1.6.0_33
java.vm.info = mixed mode
java.vm.name = Java HotSpot(TM) 64-Bit Server VM
java.vm.specification.name = Java Virtual Machine Specification
java.vm.specification.vendor = Sun Microsystems Inc.
java.vm.specification.version = 1.0
java.vm.vendor = Sun Microsystems Inc.
java.vm.version = 20.8-b03
line.separator =
os.arch = amd64
os.name = Windows 7
os.version = 6.1
path.separator = ;
sun.arch.data.model = 64
sun.boot.class.path = C:\Program Files\Java\jre6\lib\resources.jar;C:\Program Files\Java\jre6\lib\rt.jar;C:\Program Files\Java\jre6\lib\sunrsasign.jar;C:\Program Files\Java\jre6\lib\jsse.jar;C:\Program Files\Java\jre6\lib\jce.jar;C:\Program Files\Java\jre6\lib\charsets.jar;C:\Program Files\Java\jre6\lib\modules\jdk.boot.jar;C:\Program Files\Java\jre6\classes
sun.boot.library.path = C:\Program Files\Java\jre6\bin
sun.cpu.endian = little
sun.cpu.isalist = amd64
sun.desktop = windows
sun.io.unicode.encoding = UnicodeLittle
sun.java.command = com.dorbae.util.DorbaeSystemUtil
sun.java.launcher = SUN_STANDARD
sun.jnu.encoding = MS949
sun.management.compiler = HotSpot 64-Bit Tiered Compilers
sun.os.patch.level = Service Pack 1
user.country = KR
user.dir = D:\Eclipse\Eclipse-Luna_iScheduler\workspace\pe.dorbae.util
user.home = C:\Users\Administrator
user.language = ko
user.name = Administrator
user.timezone =
user.variant =
Friday, 17 April 2015
[OSGI] Eclipse Runtime Options
Eclipse에서 사용하는 Runtime Options
다양한 옵션들이 있다.
앞선 Workspace와 관련된 -data [ @none | @noDefault | @user.home | @user.dir ]
주의 깊게 볼 것!
The Eclipse runtime options
Version 3.8 - Last revised May 15, 2012
The Eclipse platform is highly configurable. Configuration input takes the form of command line arguments and System property settings. In many cases the command line arguments are simply short cuts for setting the related System properties. In fact, there are many more System property settings than command line arguments.
Command line arguments
Listed below are the command line arguments processed by various parts of the Eclipse runtime. Many of these values can also be specified using System properties either on the command line using -D VM arguments, by specifying their values in a config.ini file or by using a <launcher>.ini file. Using the two latter techniques it is possible to customize your Eclipse without using command line arguments at all.
For each argument in the list, its corresponding System property key is given (in {}). Also given is the Eclipse runtime layer in which the command line argument is processed (in ()). This is useful for people replacing parts of the runtime to suit special needs.
- -application <id> (Runtime)
- equivalent to setting eclipse.application to <id>
- -arch <architecture> (OSGi)
- equivalent to setting osgi.arch to <architecture>
- -clean (OSGi)
- equivalent to setting osgi.clean to "true"
- -configuration <location> (Main)
- equivalent to setting osgi.configuration.area to <location>
- -console [[host:]port] (OSGi)
- equivalent to setting osgi.console to [[host:]port].
- -consoleLog (Runtime)
- equivalent to setting eclipse.consoleLog to "true"
- -data <location> (OSGi)
- equivalent to setting osgi.instance.area to <location>
- -debug [options file] (OSGi)
- equivalent to setting osgi.debug to [options file] or the empty string to simply enable debug (i.e., if the options file location is not specified)
- -dev [entries] (OSGi)
- equivalent to setting osgi.dev to [entries] or the empty string to simply enable dev mode (i.e., if entries are not specified)
- -eclipse.keyring <file path> (Equinox)
- Set to override location of the default secure storage
- -eclipse.password <file path> (Equinox)
- If specified, the secure storage treats contents of the file as a default password. When not set, password providers are used to obtain a password.
- -feature <feature id> (Runtime)
- equivalent to setting eclipse.product to <feature id>
- -framework <location> (Main)
- equivalent to setting osgi.framework to <location>
- -initialize (Main)
- initializes the configuration being run. All runtime related data structures and caches are refreshed. Any user/plug-in defined configuration data is not purged. No application is run, any product specifications are ignored and no UI is presented (e.g., the splash screen is not drawn)
- -install <location> (Main)
- equivalent to setting osgi.install.area to <location>
- --launcher.defaultAction <option> (Executable)
- specifies the default action to take when the launcher is started without any "-" arguments on the command line. Currently the only supported value is "openFile". The "openFile" option tells the launcher that if it is called with a command line that only contains arguments that do not start with "-", then those arguments should be treated as if they followed "--launcher.openFile".
eclipse myFile.txt
This is the kind of command line the launcher will receive on windows when you double click a file that is associated with eclipse, or you select and choose "Open With" or "Send To" Eclipse. - --launcher.openFile <space separated list of files> (Executable)
- a space separated list of files to pass to the application. This option is typically used to pass a list of files to be opened by an Eclipse application. This option requires SWT in order to fire the necessary SWT_OPENDOC event for the files that are specified. Relative paths will be resolved first against the current working directory, and second against the eclipse program directory.
- --launcher.library <location> (Executable)
- the location of the eclipse executable's companion shared library. If not specified the executable looks in the plugins directory for the appropriate org.eclipse.equinox.launcher.[platform] fragment with the highest version and uses the shared library named eclipse_* inside.
- --launcher.ini <location> (Executable)
- the location of the product .ini file to use. If not specified the executable will look for a file beside the launcher with the same name and the extension .ini. (i.e. eclipse.exe looks for eclipse.ini, product.exe looks for product.ini)
- --launcher.suppressErrors (Executable)
- If specified the executable will not display any error or message dialogs. This is useful if the executable is being used in an unattended situation.
- --launcher.secondThread (Executable) MACOSX ONLY
- If specified the executable will create the Java VM on a secondary thread. This should used if a swing application is being run. SWT will NOT work if this option is specified.
- --launcher.timeout <value> (Executable)
- a timeout value for how long the launcher should spend trying to communicate with an already running eclipse before the launcher gives up and launches a new eclipse instance. Default is 60 (seconds).
- --launcher.XXMaxPermSize <value> (Executable)
- If specified, and the executable detects that the VM being used is a Sun VM, then the launcher will automatically add the -XX:MaxPermSize=<value> vm argument. The executable is not capable of detecting Sun VMs on all platforms.
- --launcher.appendVmargs (Executable)
- If specified, any VM arguments on the commandline will be appended to any VM arguments specified in the launcher .ini file. Using this option is recommended in every launcher .ini file that specifies VM arguments, because the default behavior of overriding VM arguments can have unexpected side-effects.
- --launcher.overrideVmargs (Executable)
- If specified on the commandline, overrides the effect of --launcher.appendVmargs in a launcher .ini file such that none of the VM arguments in the .ini file are considered as soon as a -vmargs option is detected on the commandline.
- --launcher.GTK_version <value> (Executable) Linux ONLY
- specifies which version of GTK+ will be used by Eclipse on Linux. The currently acceptable values are "2" for GTK+ 2.x and "3" for GTK+ 3.x. If specified, this parameter takes precedence over setting the
SWT_GTK3
environment variable. - -name <string>
- The name to be displayed in the task bar item for the splash screen when the application starts up (not applicable on Windows). Also used as the title of error dialogs opened by the launcher. When not set, the name is the name of the executable.
- -nl <locale> (OSGi)
- equivalent to setting osgi.nl to <locale>
- -nlExtensions <nlExtensions> (OSGi)
- indicates NL extensions and is equivalent to setting osgi.nl.extensions to <nlExtensions>
- -noExit (OSGi)
- equivalent to setting osgi.noShutdown to "true"
- -noLazyRegistryCacheLoading (Runtime)
- equivalent to setting eclipse.noLazyRegistryCacheLoading to "true"
- -noRegistryCache (Runtime)
- equivalent to setting eclipse.noRegistryCache to "true"
- -noSplash (Executable, Main)
- controls whether or not the splash screen is shown
- -os <operating system> (OSGi)
- equivalent to setting osgi.os to <operating system>
- -pluginCustomization <location> (Runtime)
- equivalent to setting eclipse.pluginCustomization to <location>
- -product <id> (OSGi)
- equivalent to setting eclipse.product to <id>
- -protect [root, master] (Executable, Main)
- setting the value to "root" prevents Eclipse from being started as a root user, either directly or via programs that run with administrative privileges like 'sudo'. This option is currently implemented only on Linux/UNIX based platforms. "master" can be used to prevent starting of the master instance in a shared install configuration. This option can be used on all platforms supported by Eclipse.
- -registryMultiLanguage (Runtime)
- equivalent to setting eclipse.registry.MultiLanguage to "true"
- -showSplash <bitmap> (Executable, Main)
- specifies the bitmap to use in the splash screen. If specified, the launcher may be able to show the splash screen before starting the Java VM. If not specified, Main will find the bitmap using the osgi.splashLocation and osgi.splashPath properties.
- -startup <location> (Executable)
- The location of jar used to startup eclipse. The jar referred to should have the Main-Class attribute set to org.eclipse.equinox.launcher.Main. If this parameter is not set, the executable will look in the plugins directory for theorg.eclipse.equinox.launcher bundle with the highest version.
- -user <location> (OSGi)
- equivalent to setting osgi.user.area to <location>
- -vm <path to java vm> (Executable, Main)
- when passed to the Eclipse executable, this option is used to locate the Java VM to use to run Eclipse. It should be the full file system path to an appropriate: Java jre/bin directory, Java Executable, Java shared library (jvm.dll or libjvm.so), or a Java VM Execution Environment description file. If not specified, the Eclipse executable uses a search algorithm to locate a suitable VM. In any event, the executable then passes the path to the actual VM used to Java Main using the -vm argument. Java Main then stores this value in eclipse.vm.
- -vmargs [vmargs*] (Executable, Main)
- when passed to the Eclipse, this option is used to customize the operation of the Java VM to use to run Eclipse. If specified, this option must come at the end of the command line. Even if not specified on the executable command line, the executable will automatically add the relevant arguments (including the class being launched) to the command line passed into Java using the -vmargs argument. Java Main then stores this value in eclipse.vmargs.
- -ws <window system> (OSGi)
- equivalent to setting osgi.ws to <window system>
Bidirectional Support
- -dir <dir>
- indicates the orientation of the workbench and is equivalent to setting eclipse.orientation to <dir>.
- -bidi <value>
- Indicates the default base text direction and whether special bidi processing should be enabled.
- Valid arguments are "on=[y|n];textDir=[ltr|rtl|auto]",.
- Example: -bidi "on=y;textDir=rtl"
Obsolete command line arguments
The following command line arguments are no longer relevant or have been superseded and are consumed by the runtime and not passed on to the application being run to maintain backward compatibility. .
- -boot
- see -configuration
- -classLoaderProperties
- no longer relevant
- -endSplash <command>
- no longer relevant
- -firstUse
- no longer relevant
- -newUpdates
- no longer relevant
- -noPackagePrefixes
- no longer relevant
- -noUpdate
- no longer relevant
- -plugins
- no longer relevant
- -update
- no longer relevant
Others
The following command line arguments are defined by various Eclipse plug-ins and are only supported if the defining plug-in is installed, resolved and activated.
- -noVersionCheck (workbench)
- <description>
- -perspective (workbench)
- <description>
- -refresh (org.eclipse.core.resources)
- <description>
- -showLocation (org.eclipse.ui.ide.workbench)
- <description>
- -allowDeadlock
- <description>
System properties
The following System properties are used by the Eclipse runtime. Note that those starting with "osgi" are specific to the OSGi framework implementation while those starting with "eclipse" are particular to the Eclipse runtime layered on top of the OSGi framework.
Many of these properties have command line equivalents (see the command line arguments section and the value in braces {}). Users are free to use either command line or property settings to specify a value. Properties can be set in the following ways:
- use -DpropName=propValue as a VM argument to the Java VM
- set the desired property in the config.ini file in the appropriate configuration area
- eclipse.activateRuntimePlugins
- controls activation of runtime plug-ins. RCP applications not requiring services provided by runtime plug-ins can set this property to "false" to avoid activation of runtime plug-ins on Eclipse startup
- eclipse.allowAppRelaunch
- if set to "true" then the main thread will continue to wait for another application descriptor to be launched after the currently running application has quit. Stopping the system.bundle (i.e. the bundle with a bundle ID equal to zero) will force the main thread to stop waiting for another application to launch. The default value is "false"
- eclipse.application {-application}
- the identifier of the application to run. The value given here overrides any application defined by the product (see eclipse.product) being run
- eclipse.application.launchDefault
- Controls launching the default application automatically once the platform is running. A default application is identified by the eclipse.product or the eclipse.application options. The default value is "true". Setting this property to "false" will prevent the default application from launching automatically. Once the platform is running the main thread will wait for an application to be launched using an application descriptor service.
- eclipse.application.registerDescriptors
- Controls registration of application descriptor services for all installed applications. The default value is "false". If set to "false" only the default application will have an application descriptor service registered. If set to "true" then all installed applications will have an application descriptor service registered.
- eclipse.commands
- a new-line separated list of all command-line arguments passed in when launching Eclipse
- eclipse.consoleLog
- if "true", any log output is also sent to Java's System.out (typically back to the command shell if any). Handy when combined with -debug
- eclipse.debug.startupTime
- the time in milliseconds when the Java VM for this session was started
- eclipse.ee.install.verify
- if set to "true" then the framework will check the required execution environment at bundle install time. The default value is "false".
- eclipse.exitOnError
- if set to "true" then the platform will exit if an unhandled error occurs. The default value is "true".
- eclipse.gcj
- An option, if "true", that suppresses any warnings Eclipse may provoke when running on GCJ. See bug 191254 for details.
- eclipse.ignoreApp
- if set to "true" then the main launching thread will not start the default application and will proceed in shutting down the platform and exiting. The default value is "false". This is different than theeclipse.application.launchDefault option because the main thread will not wait for an application descriptor service to be launched.
- eclipse.log.level
- sets the level used when logging messages to the eclipse log.
- ERROR - enables logging only ERROR messages.
- WARNING - enables logging of ERROR and WARNING messages.
- INFO - enables logging of ERROR, WARNING and INFO messages.
- ALL - enables logging of all messages (default value)
- eclipse.log.backup.max
- the max number of backup log files to allow. The oldest backup log file will be deleted after the max number of backup log files is reached as a result of rotating the log file. The default value is "10". A negative or zero value will cause the default value to be used.
- eclipse.log.size.max
- the max size in Kb that the log file is allowed to grow. The log file is rotated when the file size exceeds the max size. The default value is "1000". A negative value will cause the default value to be used. A zero value indicates no max log size.
- eclipse.noExtensionMunging
- if "true", legacy registry extension are left as-is. By default such extensions are updated to use the new extension point ids found in Eclipse 3.0.
- eclipse.noLazyRegistryCacheLoading {-noLazyRegistryCacheLoading}
- if "true", the platform's plug-in registry cache loading optimization is deactivated. By default, configuration elements are loaded from the registry cache (when available) only on demand, reducing memory footprint. This option forces the registry cache to be fully loaded at startup.
- eclipse.noRegistryCache {-noRegistryCache}
- if "true", the internal extension registry cache is neither read or written
- eclipse.pluginCustomization {-pluginCustomization}
- the file system 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 current working directory for Eclipse itself.
- eclipse.product {-product}
- the identifier of the product being run. This controls various branding information and what application is used.
- eclipse.registry.MultiLanguage {-registryMultiLanguage}
- if "true", extension registry supports translation to multiple languages. By default extension registry provides translation only to the Eclipse locale specified by the osgi.nl.
- eclipse.service.jobs
- controls registration of OSGi services. Set to "false" to suppress registration of OSGi services by the
org.eclipse.core.jobs
plug-in - eclipse.service.pref
- Controls registration of OSGi services. Set to "false" to suppress registration of OSGi services by the
org.eclipse.equinox.preferences
plug-in - eclipse.startTime
- This property is set at the time Eclipse is started. The value of this property a string representation of the value returned by System.currentTimeMillis(). This value is not intended to be set by users.
- eclipse.stateSaveDelayInterval
- the delay interval (in milliseconds) for persisting state change requests. The default is 30000 ms (30 seconds). State change requests are delayed to prevent massive amounts of disk writes while performing administrative operations (e.g. installing bundles). The delay interval is used to wait for a period of inactivity before persisting the framework state information.
- eclipse.security
- specifies that a security policy and manager should be configured when the framework is launched. If the launcher is used (org.eclipse.equinox.launcher) and this property is set to any value then the launcher will configure a java.security.Policy that grants all permissions to the launcher and the framework. When the framework is launched it will use this property to determine the security manager to use. If set to osgi then the Equinox security manager is used. This security manager is required to fully support the OSGi Conditional Permission Admin specification. If the property is set to the empty string then java.lang.SecurityManager will be used; otherwise the property specifies a security manager class that should be used as the security manager.
- eclipse.trace.size.max NEW
- the max size in Kb that the trace file is allowed to grow. The trace file is rotated when the file size exceeds the max size. The default value is "1000". A negative value will cause the default value to be used. A zero value indicates no max trace size.
- eclipse.trace.backup.max NEW
- the max number of backup trace files to allow. The oldest backup trace file will be deleted after the max number of backup trace files is reached as a result of rotating the trace file. The default value is "10". A negative or zero value will cause the default value to be used.
- eclipse.vm {-vm}
- the path to the Java executable used to run Eclipse. This information is used to construct relaunch command lines.
- eclipse.vmargs {-vmargs}
- lists the VM arguments used to run Eclipse. This information is used to construct relaunch command lines.
- eclipse.orientation {-dir}
- the workbench orientation which can be ltr (left-to-right) or rtl (right-to-left).
- equinox.security.vm
- If set to "server", security modules will not attempt to substitute VM's JAAS processing.
- osgi.adaptor
- the class name of the OSGi framework adaptor to use.
- osgi.arch {-arch}
- the processor architecture value. The value should be one of the processor architecture names known to Eclipse (e.g., x86, ppc, sparc, ...). See org.eclipse.osgi.service.environment.Constants for known values.
- osgi.baseConfiguration.area
- specifies a base configuration that is used when osgi.configuration.area is not specified.
- osgi.bundlefile.limit
- specifies a limit on the number of jar files the framework will keep open. The minimum value allowed is 10. Any value less than 10 will disable the bundle file limit, making the the number of jar files the framework keeps open unlimited. By default the value is 100.
- osgi.bundles
- The comma-separated list of bundles which are automatically installed and optionally started once the system is up and running. Each entry is of the form:
<URL | simple bundle location>[@ [<start-level>] [":start"]]
The start-level indicates the OSGi start level at which the bundle should run. If the start-level (>0 integer) is omitted then the framework will use the default start level for the bundle. If the "start" tag is added then the bundle will be marked as started after being installed. Simple bundle locations are interepreted as relative to the framework's parent directory. If the location is not a fully qualified path or URL then a search is done to find the highest version available. Note that the reference: protocol can only be used to refer to content specified by a file: URL (e.g. reference:file:/path/to/mybundle_1.0.0.jar). If the bundle is a directory bundle then using a file: URL without the use of reference: is not supported (e.g. file:/path/to/myDirectoryBundle_1.0.0/ must use reference:file:/path/to/myDirectoryBundle_1.0.0/) - osgi.bundles.defaultStartLevel
- this is the startlevel that all bundles will be set to if installed by Eclipse Update. Bundles which are specified on the osgi.bundles list can specify a particular startlevel. If they do not specify a startlevel then they default to the value of osgi.bundles.defaultStartLevel. The default value of osgi.bundles.defaultStartLevel is 4.
- osgi.compatibility.bootdelegation
- if set to "true" then the parent (boot by default) classloader is delegated to as a last resort if a class or resource cannot be found. The default value is "true".
- osgi.compatibility.errorOnFailedStart
- A bundle may specify a lazy activation policy using the bundle manifest headers Eclipse-LazyStart or Bundle-ActivationPolicy. According to the OSGi R4.1 specification, if a bundle with a lazy activation policy fails to start then class loads must still succeed. Before the OSGi R4.1 specification Eclipse defined the lazy activation policy such that failed starts would cause class loading errors to be thrown. If osgi.compatibility.errorOnFailedStart is set to "true" then failed starts will result in class loading errors; otherwise the activation error is logged and the classes are allowed to load from bundles which failed to start. The default value is "true".
- osgi.compatibility.eagerStart.LazyActivation
- The OSGi R4.1 specification mandates that all bundles must be marked for start before they are allowed to activate. This includes bundles which specify a lazy activation policy. A new method Bundle.start(options) has been added to allow lazy activated bundles to be activated according to their lazy activation policy. Before the OSGi R4.1 specification Eclipse defined the lazy activation policy such that lazy activated were automatically activated on first class load even though they were not marked for activation. If osgi.compatibility.eagerStart.LazyActivation is set to "true" then bundles with the lazy activation policy will automatically be marked for activation; otherwise bundles with the lazy activation policy must be started with the new Bundle.start(options) method before being allowed to lazy activate. The default value is "true".
- osgi.checkConfiguration
- if set to "true" then timestamps are check in the configuration cache to ensure that the cache is up to date with respect to the contents of the installed bundles. The default value is "false".
- osgi.classloader.singleThreadLoads
- if set to "true" then only one thread is allowed to load a class at a time. The default value is "false". This option can be used to work around certain VM bugs which can cause deadlock. See bug 121737. Note that recent discussions in bug 227587 have shown that this option introduces another kind of deadlock.
- osgi.classloader.lock
- the classloader locking strategy to use when defining classes. The valid types are the following:
- classname - lock on the classname.
- classloader - lock on the classloader (default value).
- osgi.classloader.copy.natives NEW
- If set to "true" then native code which is loaded from a bundle will be copied to a unique location on disk each time a class loader asks to load the library from the bundle. This may be needed in scenarios where the framework is restarted without shutting down the VM. The default value is "false".
- osgi.classloader.type NEW
- If set to "parallel" then a check is done on JavaSE 7 for the ClassLoader#registerAsParallelCapable method and if found then it is called to allow for parallel class loads. On Java SE 7 this is the preferred way to avoid class loader deadlock because of cyclic class loaders.
- osgi.clean
- if set to "true", any cached data used by the OSGi framework and eclipse runtime will be wiped clean. This will clean the caches used to store bundle dependency resolution and eclipse extension registry data. Using this option will force eclipse to reinitialize these caches.
- osgi.configuration.cascaded
- if set to "true", this configuration is cascaded to a parent configuration. The parent configuration is specified by the osgi.sharedConfiguration.area. See the section on locations for more details.
- osgi.configuration.area {-configuration}
- the configuration location for this run of the platform. The configuration determines what plug-ins will run as well as various other system settings. See the section on locations for more details.
- osgi.configuration.area.default
- the default configuration location for this run of the platform. The configuration determines what plug-ins will run as well as various other system settings. This value (i.e., the default setting) is only used if no value for the osgi.configuration.area is set. See the section on locations for more details.
- osgi.console {-console [[host:]port]}
- if set to a non-null value, the OSGi console (if installed) is enabled. This is handy for investigating the state of the system. The value syntax is [[host:]port] where the port and optional host name specify which port and hostname on which the console listens and directs its output to. If the value does not specify a valid port or hostname (including the empty string) then the console will listen to System.in and direct its output to System.out. In order for this option to be supported the Equinox console must be installed. See Console Shell for more information.
- osgi.contextClassLoaderParent
- the classloader type to use as the parent classloader of the context classloader used by the Framework. The valid types are the following:
- app - the application classloader.
- boot - the boot classloader.
- ext - the extension classloader.
- fwk - the framework classloader.
- ccl - the original context classloader that was set when the framework launched (default value).
- osgi.debug {-debug}
- if set to a non-null value, the platform is put in debug mode. If the value is a string it is interpreted as the location of the .options file. This file indicates what debug points are available for a plug-in and whether or not they are enabled. If a location is not specified, the platform searches for the .options file under the install directory.
- osgi.dev {-dev}
- if set to the empty string, dev mode is simply turned on. This property may also be set to a comma-separated class path entries which are added to the class path of each plug-in or a URL to a Java properties file containing custom classpath additions for a set of plug-ins. For each plug-in requiring a customized dev time classpath the file will contain an entry of the form
<plug-in id>=<comma separated list of classpath entries to add>
where plug-in id "*" matches any plug-in not otherwise mentioned. - osgi.filepermissions.command
- specifies an optional OS specific command to set file permissions on extracted native code. On some operating systems it is required that native libraries be set to executable. This optional property allows you to specify the command. For example, on a UNIX style OS you could have the following value:
osgi.filepermissions.command="chmod +rx [fullpath]"
The [fullpath] is used to substitute the actual file path by the framework. - osgi.framework
- the URL location of the OSGi framework. Useful if the Eclipse install is disjoint. See the section on locations for more details.
- osgi.frameworkClassPath
- a comma separated list of classpath entries for the OSGi framework implementation. Relative locations are interpreted as relative to the framework location (see osgi.framework)
- osgi.framework.extensions
- a comma-separated list of framework extensions. Each entry is of the form:
<simple bundle location>
Simple bundle locations are searched in the parent directory of the org.eclipse.osgi bundle. Framework extensions may be used to run Eclipse with a different framework adaptor. The framework extension may contain an eclipse.properties file to set system properties. For example, a framework extension that provides a framework adaptor implementation can specify what the adaptor class is by setting the osgi.adaptor property. - osgi.framework.shape
- set to the shape of the Eclipse OSGi Framework implementation. This property is set when the Eclipse platform is started and is not intended by be set by the user. The value "jar" indicates that the Eclipse OSGi Framework is contained in a single jar. The value "folder" indicates that the Eclipse OSGi Framework is contained in a directory.
- osgi.framework.library.extensions
- a comma separated list of additional library file extensions that must be searched for. If not set then only the library name returned by System.mapLibraryName(String) will be used to search. This is needed for certain operating systems which allow more than one extension for a library. For example AIX allows library extensions of .a and .so, but System.mapLibraryName(String) will only return names with the .a extension.
- osgi.frameworkParentClassloader
- the classloader type to use as the parent classloader for the the Framework. The valid types are the following:
- app - the application classloader.
- boot - the boot classloader.
- ext - the extension classloader.
- current - the classloader used to load the equinox launcher.
- osgi.framework.activeThreadType
- if set to normal then an active framework thread is started when the framework is launched that monitors the lifecycle of the framework. This thread is a non-daemon thread and is used to prevent the VM from shutting down when the framework is active and only daemon threads are active in the VM. When the framework is shutdown then the active framework thread will quit which should allow the VM to shutdown as long as no other non-deamon threads are active in the VM. The default value is set to normal. Setting this option to any other value besides normal will prevent the active framework thread from getting started when the framework is launched.
- osgi.framework.useSystemProperties
- controls whether the framework properties are backed by the global System properties or held privately for each instance of the framework. By default the framework properties are backed by the System properties (e.g. true). This property is useful when running multiple instances of the OSGi Framework within the same VM and each instance has a separate set of configuration properties (e.g. set in the config.ini).
- osgi.genericAliases
- a comma separated list of generic aliases that can be used to map existing manifest headers onto Eclipse-GenericCapability and Eclipse-GenericRequire manifest headers. The osgi.genericAliases property uses the following syntax:
osgi.genericAliases ::= generic-alias ( ',' generic-alias ) * generic-alias ::= capability-alias ':' require-alias ':' capability-type
For example, to map the OSGi headers Export-Service and Import-Service headers onto Eclipse-GenericCapability and Eclipse-GenericRequire headers you would use the following value:
osgi.genericAliases=Export-Service:Import-Service:osgi.service
- osgi.hook.configurators
- a comma separated list of hook configurators. If this property is set then the list of configurators specified will be the only configurators used. Any hook configurators specified in hookconfigurators.properties files will be ignored.
- osgi.hook.configurators.include
- a comma separated list of additional hook configurators. This is helpful for configuring optional hook configurators. This option is ignored if the osgi.hook.configurators option is used.
- osgi.hook.configurators.exclude
- a comma separated list of hook configurators to exclude. This is helpful for disabling hook configurators that are specified in hook configurator properties files. This option is ignored if the osgi.hook.configurators option is used.
- osgi.java.profile
- a URL to the JRE profile file to use. The specified URL is read as a Java properties file. A JRE profile contains values for the properties org.osgi.framework.system.packages, org.osgi.framework.bootdelegation and org.osgi.framework.executionenvironment. If the osgi.java.profile is not set then a profile is selected based on the java.specification.version value of the running JRE.
- osgi.java.profile.bootdelegation
- a java profile osgi.java.profile may contain a "org.osgi.framework.bootdelegation" property. This value may be used to set the system property "org.osgi.framework.bootdelegation". The osgi.java.profile.bootdelegation indicates the policy for bootdelegation to be used. The following values are valid (default is ignore):
- ignore - indicates that the "org.osgi.framework.bootdelegation" value in the java profile should be ignored. The system property "org.osgi.framework.bootdelegation" will be used to determine which packages should be delegated to boot.
- override - indicates that the "org.osgi.framework.bootdelegation" in the java profile should override the system property "org.osgi.framework.bootdelegation".
- none - indicates that the "org.osgi.framework.bootdelegation" in the java profile AND the system properties should be ignored. This is the most strict option. Running with this option causes the framework to use the OSGi R4 strict boot delegation model.
- osgi.install.area {-install}
- the install location of the platform. This setting indicates the location of the basic Eclipse plug-ins and is useful if the Eclipse install is disjoint. See the section on locations for more details.
- osgi.instance.area {-data}
- the instance data location for this session. Plug-ins use this location to store their data. For example, the Resources plug-in uses this as the default location for projects (aka the workspace). See the section on locationsfor more details.
- osgi.instance.area.default
- the default instance data location for this session. Plug-ins use this location to store their data. For example, the Resources plug-in uses this as the default location for projects (aka the workspace). This value (i.e., the default setting) is only used if no value for the osgi.instance.area is set. See the section on locations for more details.
- osgi.locking
- the locking type to use for this run of the platform. The valid locking types are "java.io", "java.nio", and "none". The default value is "java.nio" unless the JRE does not support "java.nio" then "java.io" is the default.
- osgi.manifest.cache
- the location where generated manifests are discovered and generated. The default is in the configuration area but the manifest cache can be stored separately.
- osgi.nl {-nl}
- the name of the locale on which Eclipse platform will run. NL values should follow the standard Java locale naming conventions.
- osgi.nl.extensions {-nlExtensions}
- the NL extensions, such as collation rules (sorting, searching, grouping), calendar system (locale) and currency format. This is a list of keyword=value pairs. For example:
-nlExtensions "@collation=phonebook;calendar=hebrew;currency=USD"
- osgi.nl.user
- the name of the locale when the user explicitly adds -nl to the command-line arguments.
- osgi.noShutdown {-noExit}
- if "true", the OSGi Framework will not be shut down after the Eclipse application has ended. This is useful for examining the OSGi Framework after the Eclipse application has ended. Note that the VM will terminate if no active non-daemon threads exists. See osgi.framework.activeThreadType.
- osgi.os {-os}
- the operating system value. The value should be one of the operating system names known to Eclipse (e.g., win32, linux, ...). See org.eclipse.osgi.service.environment.Constants for known values.
- osgi.parentClassloader
- the classloader type to use as the parent classloader for all bundles installed in the Framework. The valid types are the following:
- app - the application classloader.
- boot - the boot classloader.
- ext - the extension classloader.
- fwk - the framework classloader.
- osgi.requiredJavaVersion
- The minimum java version that is required to launch Eclipse. The default value is "1.4.1".
- osgi.resolverMode
- the mode used to resolve bundles installed in the Framework. The default resolver mode is not strict. The following options are available.
- strict - the resolver is in strict mode and will enforce access restriction rules when loading classes and resources from exported packages which specify the x-internal or x-friends directives.
- development - used for development time resolution. This mode disables certain resolver rules that are not needed at development time. For example, singleton selection is disabled to allow the development of multiple versions of a singleton bundle
- osgi.resolver.usesMode
- the resolver mode used to resolve uses directives on Export-Package statements.
- aggressive - aggressively seeks a solution with no class space inconsistencies (default value). This mode may be very expensive depending on the number of bundles and number of duplicate exports in the system.
- tryFirst - only tries the first solution selected by the resolver. This mode is very fast but may result in unresolved bundles because of class space inconsistencies.
- ignore - ignores all uses directives on exports. This mode is very fast by may result in inconsistent class spaces in resolved bundles.
- osgi.sharedConfiguration.area
- the shared configuration location for this run of the platform. If the osgi.configuration.cascaded property is set to "true" then shared configuration area is used as the parent configuration.
- osgi.signedcontent.support
- A comma separated list of options for signed content support. The valid types are the following:
- certificate - enables parsing and verification of certificates.
- trust - enables verification of certificate trust. This option implies "certificate".
- runtime - enables verification of signed bundle content at runtime. This option implies "certificate".
- authority - enables the default authorization engine. This option implies "certificate" and "trust"..
- all - same as "certificate,trust,runtime,authority".
- osgi.signedcontent.trust.engine
- A service property key used to identify an implementation of the org.eclipse.osgi.service.security.TrustEngine service. A TrustEngine service should be registered with a unique value for this property to allow selection of the TrustEngine service implementation. The osgi.signedcontent.trust.engine property can be used as a configuration property to select particular TrustEngine service implementations at runtime. If this property is not set then all available TrustEngine services are used at runtime.
- osgi.splashLocation
- the absolute URL location of the splash screen (.bmp file) to to show while starting Eclipse. This property overrides any value set in osgi.splashPath.
- osgi.splashPath
- a comma separated list of URLs to search for a file called splash.bmp. This property is overriden by any value set in osgi.splashLocation.
- osgi.startLevel
- the start level value the framework will be set to at startup. The default value is 6.
- osgi.strictBundleEntryPath
- On some operating systems Equinox may return a bundle entry that is requested with a path that does not correspond to an actual bundle entry path. For example, on Windows file name comparison operations are case insensitive. When this property is set to true, Equinox operates more strictly by checking that the requested bundle entry path exists. The default value is false for compatibility with the previous behaviour of Equinox. This property is relevant only when the bundle is installed from a folder (not jarred) and is ignored otherwise.
- osgi.support.multipleHosts NEW
- if set to true then the framework will attempt to attach a fragment to all available host bundles which satisfy the fragment bundle's Fragment-Host constraint. The default value is false.
- osgi.support.signature.verify
- This option has been deprecated. Use osgi.signedcontent.support instead.
- osgi.support.class.certificate
- if set to true then the certificates available from a signed bundle are used when defining the classes from the signed bundle. The default value is true. This option only takes effect when osgi.signedcontent.support is set to certificate.
- osgi.syspath
- set to the path where the eclipse OSGi Framework (org.eclipse.osgi) implementation is located. For example, "<eclipse install path>/eclipse/plugins". This property is set when the Eclipse platform is started and is not intended by be set by the user.
- osgi.user.area {-user}
- the location of the user area. The user area contains data (e.g., preferences) specific to the OS user and independent of any Eclipse install, configuration or instance. See the section on locations for more details.
- osgi.user.area.default
- the default location of the user area. The user area contains data (e.g., preferences) specific to the OS user and independent of any Eclipse install, configuration or instance. This value (i.e., the default setting) is only used if no value for the osgi.user.area is set. See the section on locations for more details.
- osgi.ws {-ws}
- the window system value. The value should be one of the Eclipse window system names known to Eclipse (e.g., win32, motif, ...).
Locations
The Eclipse runtime defines a number of locations which give plug-in developers context for reading/storing data and Eclipse users a control over the scope of data sharing and visibility. Eclipse defines the following notions of location:
- User (-user) {osgi.user.area} [@none, @noDefault, @user.home, @user.dir, filepath, url]
- User locations are specific to, go figure, users. Typically the user location is based on the value of the Java
user.home
system property but this can be overridden. Information such as user scoped preferences and login information may be found in the user location. - Install (-install) {osgi.install.area} [@user.home, @user.dir, filepath, url]
- An install location is where Eclipse itself is installed. In practice this location is the directory (typically "eclipse") which is the parent of the eclipse.exe being run or the plugins directory containing the org.eclipse.equinox.launcher bundle. This location should be considered read-only to normal users as an install may be shared by many users. It is possible to set the install location and decouple eclipse.exe from the rest of Eclipse.
- Configuration (-configuration) {osgi.configuration.area} [@none, @noDefault, @user.home, @user.dir, filepath, url]
- Configuration locations contain files which identify and manage the (sub)set of an install to run. As such, there may be many configurations per install. Installs may come with a default configuration area but typical startup scenarios involve the runtime attempting to find a more writable configuration location.
- Instance (-data) {osgi.instance.area} [@none, @noDefault, @user.home, @user.dir, filepath, url]
- Instance locations contain user-defined data artifacts. For example, the Resources plug-in uses the instance area as the workspace location and thus the default home for projects. Other plugins are free to write whatever files they like in this location.
While users can set any of these locations, Eclipse will compute reasonable defaults if values are not given. The most common usecase for setting location is the instance area or, in the IDE context, the workspace. To run the default Eclipse configuration on a specific data set you can specify:
eclipse -data c:\mydata
More detail
Locations are URLs. For simplicity, file paths are also accepted and automatically converted to file: URLs. For better control and convenience, there are also a number of predefined symbolic locations which can be used. Note that not all combinations of location type and symbolic value are valid. A table below details which combinations are possible. Since the default case is for all locations to be set, valid and writable, some plug-ins may fail in other setups even if they are listed as possible. For example, it is unreasonable to expect a plug-in focused on user data (e.g., the Eclipse Resources plug-in) to do much if the instance area is not defined. It is up to plug-in developers to choose the setups they support and design their functionality accordingly.
- @none
- Indicates that the corresponding location should never be set either explicitly or to its default value. For example, an RCP style application which has no user data may use osgi.instance.area=@none to prevent extraneous files being written to disk. @none must not be followed by any additional path segments.
- @noDefault
- Forces a location to be undefined or explicitly defined (i.e., Eclipse will not automatically compute a default value). This is useful where you want to allow for data in the corresponding location but the Eclipse default value is not appropriate. @noDefault must not be followed by any additional path segments.
- @user.home
- Directs Eclipse to compute a location value relative to the user's home directory. @user.home can be followed by additional path segments. In all cases, the string "@user.home" is simply replaced with the value of the Java "user.home" System property. For example, setting
osgi.instance.area=@user.home/myWorkspace
results in a value of
file:/users/bob/myWorkspace - @user.dir
- Directs Eclipse to compute a location value relative to the current working directory. @user.dir can be followed by additional path segments. In all cases, the string "@user.dir" is simply replaced with the value of the Java "user.dir" System property. For example, setting
osgi.instance.area=@user.dir/myWorkspace
results in a value of
file:/usr/share/eclipse/myWorkspace
location/value |
supports default
|
file/URL
|
@none
|
@noDefault
|
@user.home
|
@user.dir
|
instance
|
yes
|
yes
|
yes
|
yes
|
yes
|
yes (default)
|
configuration
|
yes
|
yes
|
yes*
|
yes*
|
yes
|
yes
|
install
|
no
|
yes
|
no
|
no
|
yes
|
yes
|
user
|
yes
|
yes
|
yes
|
yes
|
yes
|
yes
|
* indicates that this setup is technically possible but pragmatically quite difficult to manage. In particular, without a configuration location the Eclipse runtime may only get as far as starting the OSGi framework.
Read-only Locations
A location may be specified as a read-only location by appending ".readOnly" to the location property and setting it to the value "true". The following properties can be used to specify their corresponding locations as read-only:
- osgi.configuration.area.readOnly osgi.configuration.area
- osgi.sharedConfiguration.area.readOnly osgi.sharedConfiguration.area
- osgi.instance.area.readOnly osgi.instance.area
- osgi.user.area.readOnly osgi.user.area
Variable substitution in config.ini
The config.ini file located in the configuration area can be used to define configuration property values. This file is a simple properties file with key=value pairs. The values contained in the config.ini file may optionally contain variables that can be substituted with the values of either system properties or environment properties. A variable which is to be substituted in the configuration value is surrounded by '$' characters. For example, the following uses a windows environment variable LOCALAPPDATA to configure the instance area location:
osgi.instance.area.default=$LOCALAPPDATA$/eclipse/workspace
Launcher ini file
The eclipse.exe and more generally executables for RCP applications now read their parameters from an associated ini file. This file offers a platform independent way to pass in arguments that previously had to be specified directly on the command line such as vm or vm arguments. Although all parameters can be specified in this file, it recommend for maintainability and consistency across various installations to only specify the vm location and the vm arguments in this ini file and use the config.ini file for others.
File format
This file must be named after the executable name (for example, eclipse.exe will read eclipse.ini, whereas launcher.exe will read launcher.ini) and every parameter must be specified on a new line in the file. Here is an example of such a file specifying the vm location and some parameters:
-vm c:/myVm/java.exe -vmargs -Dms40M
출처 : http://help.eclipse.org/luna/index.jsp
Labels:
eclipse,
eclipse.osgi,
java,
osgi,
plugin,
rcp,
runtime option,
workspace
Subscribe to:
Posts (Atom)