Properties 설정값을 어떻게 가져올까 고민하다 알게 된정보이다.
JAVA Project 와 관련된 모든값을 가져오는데
Console 에 찍어서 알아보기 쉽게 했다. 앞에 값은 Key 이고 뒤에 값은 Key 해당하는 값이다.
나중에 하나하나를 활용하고 싶을때는 System.getProperty("user.dir");
user.dir 이 Key 되는것이다. 이렇게 해서 값을 꺼내쓸수 있다.
// 모든 시스템정보를 보여준다
Properties props = System.getProperties();
Enumeration enumm = props.keys();
while (enumm.hasMoreElements()) {
String key = (String) enumm.nextElement();
String val = (String) props.get(key);
StringBuffer strBuild = new StringBuffer();
strBuild.append(key)
.append(" = ")
.append(val);
System.out.println(strBuild.toString());
}
java.vendor = Sun Microsystems Inc.
org.xml.sax.parser = weblogic.xml.jaxp.RegistryParser
weblogic.ListenPort = 7001
os.name = Windows XP
sun.boot.class.path = D:\project\tools\J2SDK1~1.2_1\jre\lib\rt.jar;D:\project\tools\J2SDK1~1.2_1\jre\lib\i18n.jar;D:\project\tools\J2SDK1~1.2_1\jre\lib\sunrsasign.jar;D:\project\tools\J2SDK1~1.2_1\jre\lib\jsse.jar;D:\project\tools\J2SDK1~1.2_1\jre\lib\jce.jar;D:\project\tools\J2SDK1~1.2_1\jre\lib\charsets.jar;D:\project\tools\J2SDK1~1.2_1\jre\classes
sun.java2d.fontpath =
java.vm.specification.vendor = Sun Microsystems Inc.
java.runtime.version = 1.4.2_13-b06
weblogic.Name = myserver
jmx.implementation.vendor = Sun Microsystems
user.name = aaa
jmx.implementation.name = JMX RI
user.language = ko
java.naming.factory.initial = weblogic.jndi.WLInitialContextFactory
sun.boot.library.path = D:\project\tools\J2SDK1~1.2_1\jre\bin
jmx.specification.name = Java Management Extensions
java.version = 1.4.2_13
user.timezone = Asia/Seoul
sun.arch.data.model = 32
javax.rmi.CORBA.UtilClass = weblogic.iiop.UtilDelegateImpl
jmx.specification.version = 1.0 Final Release
java.endorsed.dirs = D:\project\tools\J2SDK1~1.2_1\jre\lib\endorsed
vde.home = .\myserver\ldap
sun.cpu.isalist = pentium i486 i386
jmx.implementation.version = 1.0
file.encoding.pkg = sun.io
weblogic.mbeanLegalClause.ByPass = false
file.separator = \
java.specification.name = Java Platform API Specification
java.class.version = 48.0
user.country = KR
java.home = D:\project\tools\J2SDK1~1.2_1\jre
java.vm.info = mixed mode
os.version = 5.1
org.omg.CORBA.ORBSingletonClass = weblogic.corba.orb.ORB
path.separator = ;
java.vm.version = 1.4.2_13-b06
java.util.prefs.PreferencesFactory = java.util.prefs.WindowsPreferencesFactory
user.variant =
java.protocol.handler.pkgs = weblogic.utils|weblogic.utils|weblogic.net
jmx.specification.vendor = Sun Microsystems
java.awt.printerjob = sun.awt.windows.WPrinterJob
java.security.policy = C:\bea\WEBLOG~1\server\lib\weblogic.policy
sun.io.unicode.encoding = UnicodeLittle
awt.toolkit = sun.awt.windows.WToolkit
java.naming.factory.url.pkgs = weblogic.jndi.factories:weblogic.corba.j2ee.naming.url
user.home = C:\Documents and Settings\aaa
java.specification.vendor = Sun Microsystems Inc.
org.xml.sax.driver = weblogic.apache.xerces.parsers.SAXParser
java.library.path = D:\project\tools\J2SDK1~1.2_1\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\bea\WEBLOG~1\server\bin;D:\project\tools\J2SDK1~1.2_1\jre\bin;D:\project\tools\J2SDK1~1.2_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ESTsoft\ALZip;C:\Program Files\ESTsoft\ALZip;C:\Program Files\IDM Computer Solutions\UltraEdit\;C:\bea\WEBLOG~1\server\bin\oci920_8
java.vendor.url = http://java.sun.com/
java.vm.vendor = Sun Microsystems Inc.
java.runtime.name = Java(TM) 2 Runtime Environment, Standard Edition
java.class.path = D:\project\tools\J2SDK1~1.2_1\lib\tools.jar;C:\bea\WEBLOG~1\server\lib\weblogic_sp.jar;C:\bea\WEBLOG~1\server\lib\weblogic.jar;C:\bea\WEBLOG~1\common\eval\pointbase\lib\pbserver44.jar;C:\bea\WEBLOG~1\common\eval\pointbase\lib\pbclient44.jar;D:\project\tools\J2SDK1~1.2_1\jre\lib\rt.jar;C:\bea\WEBLOG~1\server\lib\webservices.jar;
java.vm.specification.name = Java Virtual Machine Specification
java.vm.specification.version = 1.0
javax.rmi.CORBA.PortableRemoteObjectClass = weblogic.iiop.PortableRemoteObjectDelegateImpl
sun.cpu.endian = little
sun.os.patch.level = Service Pack 2
java.io.tmpdir = C:\DOCUME~1\aaa\LOCALS~1\Temp\
java.vendor.url.bug = http://java.sun.com/cgi-bin/bugreport.cgi
os.arch = x86
java.awt.graphicsenv = sun.awt.Win32GraphicsEnvironment
java.ext.dirs = D:\project\tools\J2SDK1~1.2_1\jre\lib\ext
user.dir = D:\project\codeDomain
line.separator =
java.vm.name = Java HotSpot(TM) Client VM
javax.xml.soap.MessageFactory = weblogic.webservice.core.soap.MessageFactoryImpl
org.omg.CORBA.ORBClass = weblogic.corba.orb.ORB
file.encoding = MS949
javax.xml.rpc.ServiceFactory = weblogic.webservice.core.rpc.ServiceFactoryImpl
weblogic.ProductionModeEnabled =
java.specification.version = 1.4
'자바(JAVA)' 카테고리의 다른 글
오늘날짜를 포맷에 따라구하기 (1) | 2008.08.12 |
---|---|
프로그램 종료시점에서 처리를 해주고싶을때 (0) | 2008.08.09 |
velocity 문법 간단 정리 (0) | 2008.08.09 |
테이블 컴퍼지트에서 체크박스넣기 (0) | 2008.08.07 |
hibernate antlr/ANTLRException 에러 (0) | 2008.08.03 |
JSTL cannot be resolved error (1) | 2008.08.03 |
제네릭(generic)을 통해 Java Collections 구현 (0) | 2008.08.02 |
smtp 서버이용 메일보내기 (0) | 2008.07.29 |