RSS feed [root] /features /weblog /java




login:

password:

title search:




 


Thu May 18 10:27:51 HKT 2017

features



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

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

jdbc


5 things you didn't know about ... Java Database Connectivity - https://www.ibm.com/developerworks/library/j-5things10/index.html

(google search) (amazon search)


Sat May 06 14:13:47 HKT 2017 From /weblog/java/features

java8


Introduction of Lambdas expression in Java - http://zeroturnaround.com/labs/java-8-the-first-taste-of-lambdas/ , an example show how lambdas help to clean up the duplication - http://www.nurkiewicz.com[..]mplifying-readwritelock-with-java-8.html

Another article about Java8 change, where Lambdas is the highlight - http://www.infoq.com/news/2013/08/everything-about-java-8 http://www.shaunabram.com/java8/

Nice tutorial - http://www.dreamsyssoft.com/java-8-lambda-tutorial/index.php

Huge list of articles - http://www.baeldung.com/java8

Use lambdas to replace for-loop - http://saltnlight5.blogspot.com.au[..]creating-your-own-loop-structure-in.html https://www.ibm.com/developerworks/library/j-java8idioms3

Overview for new Date/Time library - http://www.infoq.com/articles/java.time

http://www.javacodegeeks.com[..]om/2014/05/java-8-features-tutorial.html

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

Convert SQL feature to stream - http://blog.jooq.org[..]and-their-equivalents-in-java-8-streams/

(google search) (amazon search)


Mon Mar 27 10:38:42 HKT 2017 From /weblog/java/features

reflection


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

http://jroller.com/page/ie?entry=time_to_reconsider_reflection

A very nice tool to get parameter name - http://paranamer.codehaus.org/ (e.g.: user of getUser(User user))

How to improve the performance - http://coding-masters.blogspot.com[..]-reflection-as-fast-as-direct-calls.html

The problem of using reflection to modify final field - http://www.azulsystems.com[..]7-writing-to-final-fields-via-reflection

Using reflection for using test - http://www.javaadvent.com[..]f-hacking-enums-and-modifying-final.html

Sharing about using invokedynamic - http://www.infoq.com/presentations/invokedynamic http://www.infoq.com[..]ticles/Invokedynamic-Javas-secret-weapon https://www.infoq.com/articles/Invokedynamic-Javas-secret-weapon

(google search) (amazon search)


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

javadoc


We can link java source in javadoc page: http://blogs.sun.com[..]amere/Weblog/cool_javadoc_trick#comments

http://marxsoftware.blogspot.hk[..]/inheriting-javadoc-method-comments.html

(google search) (amazon search)


Wed Jun 08 16:58:45 HKT 2016 From /weblog/java/features

java9


http://www.infoq.com[..]s/The-OpenJDK9-Revised-Java-Memory-Model

http://www.javaadvent.com[..]15/12/project-jigsaw-hands-on-guide.html

Incompatibility across versions - http://marxsoftware.blogspot.hk[..]6/06/java-backwards-incompatibility.html

(google search) (amazon search)


Mon Aug 31 17:26:59 HKT 2015 From /weblog/java/features

unsafe


The infamous sun.misc.Unsafe explained: object creation, native memory allocation, native concurrency - http://mydailyjava.blogspot.hk/2013/12/sunmiscunsafe.html

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

Tips of using unsafe - http://vanillajava.blogspot.com.au[..].com.au/2014/06/making-unsafe-safer.html

An overview of it - http://www.infoq.com[..]A-Post-Apocalyptic-sun.misc.Unsafe-World

(google search) (amazon search)


Thu Oct 23 10:36:51 HKT 2014 From /weblog/java/features

IO


Watch service, watch if directory changed - http://www.javacodegeeks.com/2012/02/java-7-watchservice.html

Tips of using bytebuffer - http://worldmodscode.wordpress.com[..]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: http://javarevisited.blogspot.com[..]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.

(google search) (amazon search)


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

agent


http://www.takipioncode.com[..]1/07/double-agent-java-vs-native-agents/

List the pros of using native agent - http://apmblog.compuware.com[..]-for-application-performance-management/

(google search) (amazon search)


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

generics


As Java still need to support Collection.get(Object) , it is easy to get NPE if you use wrong type accidentally
http://jroller.com/page/sstirling?entry=map_get_object_and_java
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 - http://www.pankaj-k.net/archives/2006/11/how_hard_is_tes.html , 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: http://jroller.com/page/dhall?entry=exploring_the_limits_of_java

Some cool feature, apply generic in comparable - http://tech.puredanger.com/2006/11/22/comparator-jdk5/

Wildcast in generic -http://javarevisited.blogspot.com[..]-is-bounded-and-unbounded-wildcards.html

http://javarevisited.blogspot.com.au[..]trized-class-method-Generic-example.html

http://mydailyjava.blogspot.com.au[..]6/advanced-java-generics-retreiving.html

(google search) (amazon search)


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

i18n


Java: Moving conditions into Message files - http://www.mscharhag.com[..]the-java-classes-resourcebundle-and.html

(google search) (amazon search)


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

autoboxing


Type can be changed - http://blog.jooq.org/2013/10/08/java-auto-unboxing-gotcha-beware/

(google search) (amazon search)


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

debugging


VisualVM , a collection of tools for debugging and monitoring - http://www.infoq.com/news/2008/05/visualvm

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

JDK command line tools which help to solving memory issue - http://plumbr.eu/blog/solving-outofmemoryerror-jdk-tools

Show how to get stack trace and memory map from JVM dump - http://fahdshariff.blogspot.gr[..]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 - http://www.javaadvent.com[..]d-and-finger-detection-using-javacv.html

(google search) (amazon search)


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

Unicode


How to Normalize Unicode in java:
http://java.sun.com/javase/6/docs/api/java/text/Normalizer.html
http://unicode.org/faq/normalization.html
http://en.wikipedia.org/wiki/Unicode_normalization

How to use text collator in java - http://errorken.blogspot.com/2011/03/javatextcollator.html

Make the string look like same but not equals - http://vanillajava.blogspot.com.au/2012/09/hidden-code.html

(google search) (amazon search)


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

package


http://www.javacodegeeks.com/2012/05/about-java-packages.html

http://johannesbrodwall.com[..]ames-transformed-my-system-architecture/

(google search) (amazon search)


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

preference


A dirty issue from Java Perference API


java.util.prefs.BackingStoreException: Couldn't get file lock.
at java.util.prefs.FileSystemPreferences.sync(FileSystemPreferences.java:715)
at java.util.prefs.FileSystemPreferences.flush(FileSystemPreferences.java:807)
at com.macquarie.st.adapter.rda.STServer.preparePrefs(STServer.java:501)
at com.macquarie.st.adapter.rda.STServer.start(STServer.java:120)
at com.macquarie.st.commons.core.runtime.STMain.start(STMain.java:170)
at com.macquarie.st.commons.core.runtime.STMain.main(STMain.java:50)

(google search) (amazon search)


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

net


URL handler - http://skife.org[..]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

maths


Compare between StrictMatch, Math and apache FastMath - http://blog.juma.me.uk[..]rformance-of-fastmath-from-commons-math/

A round bug in Java fixed in Java7, nice reading - http://www.javacodegeeks.com[..]mathround0499999999999999917-rounds.html

(google search) (amazon search)


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

tools


Trouble shooting guide, introduct few tools help to check issues - http://java.sun.com/j2se/1.5/pdf/jdk50_ts_guide.pdf

(google search) (amazon search)


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

realtime


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

(google search) (amazon search)


Thu May 05 08:35:19 HKT 2011 From /weblog/java/features

java7


A summary - http://tech.puredanger.com/java7 http://www.developer.com[..]d-to-Make-Developers-More-Productive.htm

concurrency improvement - http://www.infoq.com/news/2007/07/concurrency-java-se-7

Finally it is confirmed - http://www.petefreitag.com/item/778.cfm

You can do this in Java7, look pretty nice
try{
try-code
}
catch (SQLException | IOException) {
catch-code
}

http://extreme-java.blogspot.com[..]7-multi-catch-blocks-for-exceptions.html

(google search) (amazon search)


Thu Dec 03 15:41:18 HKT 2009 From /weblog/java/features

instrument


Use java.lang.instrument.Instrumentation; for profiling - http://java.dzone.com/articles/java-profiling-under-covers

(google search) (amazon search)


Mon Jul 27 01:05:01 HKT 2009 From /weblog/java/features

JNI


Invoking Assembly Language Programs using java native interface - http://today.java.net/lpt/a/330

Best practices for using the Java Native Interface - http://www.ibm.com[..]r-jw22dth-j&S_TACT=105AGX59&S_CMP=grjw22

(google search) (amazon search)



Sat Dec 15 00:47:43 HKT 2007 From /weblog/java/features

java console support


In short:

static final int MIN_PASSWORD_LENGTH = 8;

char[] password;
do {
password = System.console().readPassword(
"Enter password (minimum of %d characters): ", MIN_PASSWORD_LENGTH);
} while (password.length < MIN_PASSWORD_LENGTH);


http://blogs.sun.com[..]e/alanb?entry=java_io_console_is_finally
http://www.javaspecialists.eu/archive/Issue153.html

(google search) (amazon search)