2009年11月22日 星期日

2009年4月2日 星期四

... //$NON-NLS-1$

means the comment marker indicates which string is not to be translated

2009年3月25日 星期三

2009年3月17日 星期二

in = new DataInputStream (new BufferedInputStream (new FileInputStream (deFile))); in.readFully(bytes);

read a file in one line.

System.getProperty("os.name")

os.name= "Linux" "linux"
os.arch= "mips" "mips"
os.version= "#16 PREEMPT Thu Nov 20 16:17:30 CST 2008""#16 preempt thu nov 20 16:17:30 cst 2008"
java.vendor= "Skelmir, LLC" "skelmir, llc"
java.class.version= "45.0" "45.0"
java.version= "1.1.8" "1.1.8"
file.separator= "/" "/"
path.separator= ":" ":"
org.osgi.framework.bootdelegation="null" "null"
org.osgi.framework.system.packages="null" "null"
org.osgi.supports.framework.extension="null" "null"
microedition.configuration="null" "null"
microedition.profiles="null" "null"
org.osgi.framework.executionenvironment="null" "null"
org.osgi.supports.bootclasspath.extension="null" "null"
org.osgi.supports.framework.fragment="null" "null"
org.osgi.supports.framework.requirebundle="null" "null"
org.osgi.framework.version="1.3" "1.3"
org.osgi.framework.language="en" "en"
org.osgi.framework.vendor="Apache Software Foundation""apache software foundation"
org.osgi.framework.os.name="linux" "linux"
org.osgi.framework.os.version="#16 PREEMPT Thu Nov 20 16:17:30 CST 2008""#16 preempt thu nov 20 16:17:30 cst 2008"
org.osgi.framework.processor="mips" "mips"

2009年3月4日 星期三

Thread.currentThread() .setPriority(1);

set lower priority for the current thread.

2009年2月24日 星期二

File[] files = new File ("/tmp" ) .listFiles();

To get all names of the files under directory /tmp

2009年2月11日 星期三

OSGi Bundles Worldwide.

http://www.google.com/notebook/public/07454133468172869619/BDSOkDAoQitaurfYj

This webpage will collect as much as OSGi compatible bundles as an OSGi Bundle Protal.

2009年2月9日 星期一

context.installBundle( "file:/classes/client1.jar" ).start();

How to install and run another OSGi bundle in Java.
you can get context from your start(BundleContext context).

2009年2月8日 星期日

2009年2月7日 星期六

this.getClass(). getResource( "square.png" )

the image file "square.png" should be under the same directory as the class.