$ mkdir fallback接下來就是把想要的字型,看是用複製的或是symbolic link到fallback目錄下
$ ln -s /usr/share/fonts/truetype/ttf-droid/DroidSansFallback.ttf .
$ mkdir fallback接下來就是把想要的字型,看是用複製的或是symbolic link到fallback目錄下
$ ln -s /usr/share/fonts/truetype/ttf-droid/DroidSansFallback.ttf .
$ sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/jaunty multiverse"
$ sudo add-apt-repository ppa:sun-java-community-team/sun-java6
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk (or sun-java5-jdk)
packages/apps/DMClient/src/com/asus/dm/DMMMIFactory.java:3: cannot access com.redbend.vdm.MmiChoiceListThese types of errors are caused by a Java version mismatch between the compiled proxies and your runtime.
bad class file: out/target/common/obj/JAVA_LIBRARIES/XXXX_intermediates/javalib.jar(com/XXXX/vdm/MmiChoiceList.class)
class file has wrong version 50.0, should be 49.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
import com.XXXX.vdm.MmiChoiceList;
^
1 error
Below are a list of some of the version numbers and their corresponding Java runtimes:
To resolve this issue, compile them with the right version of Java SDK
public static void main( String args[] ) throws Exception {
Example1 thread = new Example1();
System.out.println( "Starting thread..." );
thread.start();
Thread.sleep( 3000 );
System.out.println( "Interrupting thread..." );
thread.interrupt();
Thread.sleep( 3000 );
System.out.println("Stopping application..." );
}
public void run() {
while(!stop){
System.out.println( "Thread is running..." );
long time = System.currentTimeMillis();
while((System.currentTimeMillis()-time <>
}
}
System.out.println("Thread exiting under request..." );
}
}
其輸出結果為:
Starting thread...
Thread is running...
Thread is running...
Thread is running...
Interrupting thread...
Thread is running...
Thread is running...
Thread is running...
Stopping application...
Thread is running...
Thread is running...
Thread is running...
甚至,在call Thread.interrupt()後,Thread仍會繼續執行。
public void interrupt()
First the checkAccess
method of this thread is invoked, which may cause a SecurityException
to be thrown.
If this thread is blocked in an invocation of the wait()
, wait(long)
, or wait(long, int)
methods of the Object
class, or of the join()
, join(long)
, join(long, int)
, sleep(long)
, or sleep(long, int)
, methods of this class, then its interrupt status will be cleared and it will receive an InterruptedException
.
If this thread is blocked in an I/O operation upon an interruptible channel
then the channel will be closed, the thread's interrupt status will be set, and the thread will receive a
ClosedByInterruptException
.
If this thread is blocked in a Selector
then the thread's interrupt status will be set and it will return immediately from the selection operation, possibly with a non-zero value, just as if the selector's wakeup
method were invoked.
If none of the previous conditions hold then this thread's interrupt status will be set.
SecurityException
- if the current thread cannot modify this threadpublic class LinkedBlockingQueue
An optionally-bounded blocking queue based on linked nodes. This queue orders elements FIFO (first-in-first-out). The head of the queue is that element that has been on the queue the longest time. The tail of the queue is that element that has been on the queue the shortest time. New elements are inserted at the tail of the queue, and the queue retrieval operations obtain elements at the head of the queue. Linked queues typically have higher throughput than array-based queues but less predictable performance in most concurrent applications.
The optional capacity bound constructor argument serves as a way to prevent excessive queue expansion. The capacity, if unspecified, is equal to Integer.MAX_VALUE
. Linked nodes are dynamically created upon each insertion unless this would bring the queue above capacity.
This class and its iterator implement all of the optional methods of the Collection
and Iterator
interfaces.
This class is a member of the Java Collections Framework.
google用到的function:
boolean | offer(E o) Inserts the specified element at the tail of this queue if possible, returning immediately if this queue is full. |
E | take() Retrieves and removes the head of this queue, waiting if no elements are present on this queue. |
Example: int i = 5;
/*合法,因為如上述, java預設interface中的data member為static final modifier*/