RSS feed [root] /features /weblog /java



title search:


Wed Oct 07 21:10:30 HKT 2020

features diff of difference version of Java

(google search) (amazon search)
download zip of files only

Thu Oct 08 08:22:27 HKT 2020 From /weblog/java/features


Invoking Assembly Language Programs using java native interface -

Best practices for using the Java Native Interface -

Other library try to simple using native library -

(google search) (amazon search)

Wed Oct 07 21:52:51 HKT 2020 From /weblog/java/features


Introduction of Lambdas expression in Java - , an example show how lambdas help to clean up the duplication -[..]mplifying-readwritelock-with-java-8.html

Another article about Java8 change, where Lambdas is the highlight -

Nice tutorial -

Huge list of articles -

Use lambdas to replace for-loop -[..]creating-your-own-loop-structure-in.html

Overview for new Date/Time library -[..]/02/java-date-time-timezone-formats.html[..]om/2014/05/java-8-features-tutorial.html

Grouping and partitioning with stream -[..]/11/java-8-streams-api-grouping-and.html
In a nutshell, make sure to never override a default method in another interface -[..]va-8-default-methods-can-break-your.html

Convert SQL feature to stream -[..]and-their-equivalents-in-java-8-streams/

Simple overview of steam operation -[..]va-8-stream-intermediate-operations.html

Behind the scenes: How do lambda expressions really work in Java? -[..]o-lambda-expressions-really-work-in-java

(google search) (amazon search)

Wed Oct 07 21:11:17 HKT 2020 From /weblog/java/features


(google search) (amazon search)

Wed Aug 26 14:25:14 HKT 2020 From /weblog/java/features


Good : dynamic, generic
Bad: slow, don't work with Obfuscators and most searching and refactoring tools

A very nice tool to get parameter name - (e.g.: user of getUser(User user))

How to improve the performance -[..]-reflection-as-fast-as-direct-calls.html

The problem of using reflection to modify final field -[..]7-writing-to-final-fields-via-reflection

Using reflection for using test -[..]f-hacking-enums-and-modifying-final.html

Sharing about using invokedynamic -[..]ticles/Invokedynamic-Javas-secret-weapon

LamdbaMetafactory is pretty fast. (*) -[..]8/01/09/JavaReflectionButMuchFaster.html

(google search) (amazon search)

Tue Jun 02 08:32:20 HKT 2020 From /weblog/java/features


JDK 14 Foreign-Memory Access API Overview -[..]-memory-access-api-overview-70951fe221c9

Pattern Matching for instanceof in Java 14 -[..]ttern-matching-for-instanceof-in-java-14

(google search) (amazon search)

Tue Jun 02 08:30:26 HKT 2020 From /weblog/java/features


The infamous sun.misc.Unsafe explained: object creation, native memory allocation, native concurrency -

Features that help for writing low latency application -[..]1/sunmiscunsafe-and-off-heap-memory.html

Tips of using unsafe -[..]

An overview of it -[..]A-Post-Apocalyptic-sun.misc.Unsafe-World[..]ine/the-unsafe-class-unsafe-at-any-speed

(google search) (amazon search)

Tue Jun 02 08:28:50 HKT 2020 From /weblog/java/features


Watch service, watch if directory changed -

Tips of using bytebuffer -[..]2/14/the-java-bytebuffer-a-crash-course/

path : ..\.\Java.txt
absolute path : C:\Users\WINDOWS 8\workspace\Demo\..\.\Java.txt
canonical path : C:\Users\WINDOWS 8\workspace\Java.txt

Read more:[..]getcanonicalpath-java.html#ixzz3A8Zya6YG

Jump to a position of a file, inputstream.skip() is faster than reader.skip(), and reader.skip() is faster than randomAccessFile.

Java & Files: An Introduction -

(google search) (amazon search)

Thu Jul 04 20:55:41 HKT 2019 From /weblog/java/features


(google search) (amazon search)

Thu Oct 11 22:28:42 HKT 2018 From /weblog/java/features


(google search) (amazon search)

Thu May 18 10:28:15 HKT 2017 From /weblog/java/features


5 things you didn't know about ... Java Database Connectivity -

(google search) (amazon search)

Tue Nov 29 11:43:01 HKT 2016 From /weblog/java/features


We can link java source in javadoc page:[..]amere/Weblog/cool_javadoc_trick#comments[..]/inheriting-javadoc-method-comments.html

(google search) (amazon search)

Mon Mar 17 10:27:52 HKT 2014 From /weblog/java/features


List the pros of using native agent -[..]-for-application-performance-management/

(google search) (amazon search)

Mon Jan 06 16:30:32 HKT 2014 From /weblog/java/features


As Java still need to support Collection.get(Object) , it is easy to get NPE if you use wrong type accidentally
I met this problem when using wicket, one cool feature of ListMultipleChoice is that if the list I press into the constructor is not List, it will persist the type information.
However, if you use this API carelessly and think the List return from the HTML form is always List . Then you will get strangle null pointer exception when you operate with the list instead of ClassCastException, as java will surpress the ClassCastException from ArrayList.get(i) sliencely and just return null to caller.

A related one but not really related to generics - , look like the behaviours difference of primittive and wrapper class at NULL is very easy to get hard to check bug

Another one, JDK generic try to cast to wrong class internally:

Some cool feature, apply generic in comparable -

Wildcast in generic -[..]-is-bounded-and-unbounded-wildcards.html[..]trized-class-method-Generic-example.html[..]6/advanced-java-generics-retreiving.html

(google search) (amazon search)

Tue Dec 10 11:58:22 HKT 2013 From /weblog/java/features


Java: Moving conditions into Message files -[..]the-java-classes-resourcebundle-and.html

(google search) (amazon search)

Tue Oct 22 22:46:35 HKT 2013 From /weblog/java/features


Type can be changed -

(google search) (amazon search)

Thu Feb 21 09:29:49 HKT 2013 From /weblog/java/features


VisualVM , a collection of tools for debugging and monitoring -

Presentation of BTrace, which allow user to have event base tracing -[..]ts/8510/98299/BTrace_BOF-5552_J12008.pdf

JDK command line tools which help to solving memory issue -

Show how to get stack trace and memory map from JVM dump -[..]gr/2012/08/analysing-java-core-dump.html

(google search) (amazon search)

Tue Jan 01 10:18:52 HKT 2013 From /weblog/java/features

image analysis

Using OpenCV to detect palm -[..]d-and-finger-detection-using-javacv.html

(google search) (amazon search)

Wed Sep 26 22:53:25 HKT 2012 From /weblog/java/features


How to Normalize Unicode in java:

How to use text collator in java -

Make the string look like same but not equals -

(google search) (amazon search)

Sat Aug 18 09:19:36 HKT 2012 From /weblog/java/features


(google search) (amazon search)

Fri Jun 08 00:50:22 HKT 2012 From /weblog/java/features


A dirty issue from Java Perference API

java.util.prefs.BackingStoreException: Couldn't get file lock.
at java.util.prefs.FileSystemPreferences.sync(
at java.util.prefs.FileSystemPreferences.flush(

(google search) (amazon search)

Fri May 18 00:36:46 HKT 2012 From /weblog/java/features


URL handler -[..]ibrary/2012/05/14/java_url_handlers.html , UrlSchemeRegistry.register("dinner", DinnerHandler.class);

(google search) (amazon search)

Sun May 13 00:21:50 HKT 2012 From /weblog/java/features


Compare between StrictMatch, Math and apache FastMath -[..]rformance-of-fastmath-from-commons-math/

A round bug in Java fixed in Java7, nice reading -[..]mathround0499999999999999917-rounds.html

(google search) (amazon search)

Sat Nov 12 10:22:50 HKT 2011 From /weblog/java/features


Trouble shooting guide, introduct few tools help to check issues -

(google search) (amazon search)

Mon Sep 19 00:41:52 HKT 2011 From /weblog/java/features


Develop with real-time Java, Create applications with predictable response times -[..]/training/kp/j-kp-rtj/index.html?ca=drs-

(google search) (amazon search)