RSS feed [root] /weblog /java




login:

password:

title search:




 


Wed Jun 23 23:53:07 AEST 2021

java



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

Thu Sep 09 10:17:05 AEST 2021 From /weblog/java/features

java16


https://www.infoq.com/articles/java-16-new-features

(google search) (amazon search)


Tue Jul 13 00:21:23 AEST 2021 From /weblog/java/fundamental

collections


Detailed decision of arraylist and linkedlist, consist of a lot benchmark results, take a look if interested: http://javachaos.crazyredpanda.com/?p=99

One bug from java HashMap explaining it can be difficult to achieve fail-fast - http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6625725 http://java.dzone.com/articles/do-your-iterators-always-fail

Performance difference of difference collection - http://java-persistence-performance.blogspot.com[..]0/12/what-is-faster-jvm-performance.html http://leolewis.website.org[..]/2011/07/14/java-collection-performance/

A treelist implementation - http://binkley.blogspot.com/2007_02_01_archive.html

Implement LRU cache using LinkedHashMap - http://vanillajava.blogspot.com[..]11/06/java-secret-lru-cache-in-java.html

Problem of using soft-reference for automate cache clean up - http://comments.gmane.org[..]gmane.comp.java.jsr.166-concurrency/7982

if it claims that an element is contained in it, this might be in error, but if it claims that an element is not contained in it, then this is definitely true. - http://codingjunkie.net/guava-bloomfilter/

Comment of various collections library - http://plumbr.eu/blog/selecting-your-collections-library

List of FAQ of Java collections - http://www.journaldev.com[..]lections-interview-questions-and-answers

Java Collections – Performance (Time Complexity) - http://infotechgems.blogspot.com.br[..]1/java-collections-performance-time.html

Performance improvement for HashMap for Java8 - http://www.nurkiewicz.com[..]hashmap-performance-improvements-in.html

Introduction to GS collection - http://www.infoq.com[..]s/gs-collections-examples-tutorial-part1 http://www.infoq.com[..]s/gs-collections-examples-tutorial-part2

removeEldestEntry, interesting function of linkedhashmap - http://www.ageofjava.com[..]/prevent-your-caches-from-exploding.html

How new version of java help immutable style - https://dzone.com/articles/java-collections-are-evolving

https://blog.frankel.ch/map-merge-compute

Hash puzzle with stringbuilder - https://threadreaderapp.com/thread/1402520496143540228.html

(google search) (amazon search)


Thu Jun 24 23:58:59 AEST 2021 From /weblog/java/fundamental

memory


From java code to java heap, detail of how java use memory - http://www.ibm.com[..]rks/java/library/j-codetoheap/index.html

Algorithm of determine suitable thread pool size - http://www.javacodegeeks.com[..]reading-stories-about-robust-thread.html

Detail of how to analysis how much memory you need - http://www.javacodegeeks.com[..]m/2012/12/how-much-memory-do-i-need.html

Chinese introduction of memory model - http://www.infoq.com/cn/articles/java-memory-model-1

Difference between PermGem and MetaSpace - http://javaeesupportpatterns.blogspot.com.au[..]02/java-8-from-permgen-to-metaspace.html

How many bytes a boolean value takes in Java? - https://www.pixelstech.net[..]many-bytes-a-boolean-value-takes-in-Java

🚀 Demystifying JVM Memory Management - https://foojay.io/today/demystifying-jvm-memory-management/

Quest to the OS: Java Native Memory - https://blog.picnic.nl[..]o-the-os-java-native-memory-5d3ef68ffc0a

(google search) (amazon search)


Thu Jun 24 23:52:43 AEST 2021 From /weblog/java/performance

vm


5 tips for proper Java Heap size - http://javaeesupportpatterns.blogspot.hk[..]07/5-tips-for-proper-java-heap-size.html

What does JVM do - http://www.azulsystems.com[..]t/uploads/2011/03/2011_WhatDoesJVMDo.pdf

How Azul do pauseless GC - http://www.artima.com/forums/flat.jsp?forum=226&thread=309917

New feature, DoEscapeAnalysis http://www.google.com.hk/search?q=DoEscapeAnalysis

A very nice blog about VM detail
http://blogs.sun.com/roller/page/jonthecollector?catname=%2FJava

Tips for configing 64bit system with large pagesize - http://andrigoss.blogspot.com/2008/02/jvm-performance-tuning.html

http://jeremymanson.blogspot.com[..]garbage-collector-in-latest-openjdk.html

http://www.cliffc.org[..]-optimize-hot-loops-and-allow-debugging/
Just an idea - http://jaxenter.com[..]aded-virtual-memory-in-java.1-46188.html
How java use native memory ( in aix ) - https://www.ibm.com[..]erworks/java/library/j-nativememory-aix/

How JRebel enable dynamic adding or removing method in running VM, using existing Java technology like classloading and agent to breakthough hotswap limitation - http://www.zeroturnaround.com[..]loading_java_classes_401_hotswap_jrebel/

Biased locking - http://blogs.sun.com/dave/entry/biased_locking_in_hotspot

Aleksey Shipilëv: One Stop Page - http://shipilev.net/

Discussion about safepoint - http://psy-lob-saw.blogspot.se/2015/12/safepoints.html

JVM Pauses - It's more than GC - https://blanco.io/blog/jvm-safepoint-pauses/

(google search) (amazon search)


Sun Jun 20 22:54:51 AEST 2021 From /weblog/java/fundamental

fields


http://mindprod.com/jgloss/transient.html

http://mindprod.com/jgloss/volatile.html

https://www.claudiodesio.com/posts/constants.html

(google search) (amazon search)


Sun Jun 20 22:53:30 AEST 2021 From /weblog/java/features

net


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

Talking to Postgres Through Java 16 Unix-Domain Socket Channels - https://www.morling.dev[..]ugh-java-16-unix-domain-socket-channels/

(google search) (amazon search)


Sun Jun 20 22:52:11 AEST 2021 From /weblog/java/features

vector


FizzBuzz – SIMD Style! - https://www.morling.dev/blog/fizzbuzz-simd-style/

(google search) (amazon search)


Fri Jun 18 10:28:23 AEST 2021 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

VM options about dumps - https://inside.java/2021/04/30/failed-writing-core-dump/

(google search) (amazon search)


Sun Mar 21 23:59:18 AEDT 2021 From /weblog/java/deploy

maven


How to Publish Artifacts on Maven Central - https://medium.com[..]-artifacts-on-maven-central-24342fd286cd https://andresalmiray.com[..]ing-to-maven-central-using-apache-maven/

Switching Java versions the whole day long - https://maarten.mulders.it[..]021/03/introduction-to-maven-toolchains/

(google search) (amazon search)


Mon Mar 08 16:05:16 AEDT 2021 From /weblog/java/fundamental

i18n


A very good tutorial of how to config and develop i18n web application
http://www.javaworld.com/javaworld/jw-05-2004/jw-0524-i18n_p.html

and a shorter one
http://www.arachna.com[..]/spidaman/20050215#a_java_i18n_checklist

and a tip
http://java.oreilly.com/lpt/a/1847

An introduction of a useful API for localized currency handling DecimalFormatSymbols
http://blog.marcnuri.com[..]mbols-DecimalFormat-DecimalFormatSymbols

Benchmark of various charset detector - http://fredeaker.blogspot.com[..]007/01/character-encoding-detection.html

Work with filename with non-ASCII char - https://webtide.com[..]-internationalization-and-normalization/

(google search) (amazon search)


Wed Feb 24 14:49:26 AEDT 2021 From /weblog/java/string

intern


String.intern() is designed for constant strings, it's implemented in C/C++ in the hotspot core code, and it has a fixed-size hashmap of around 20K entries and if more than this number of strings are interned, the performance degrades linearly since there are hash collisions and the code has to search down linked lists.

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6988220

String.intern in Java 7 and 8 - http://java-performance.info/string-intern-in-java-6-7-8/ http://java-performance.info[..]-intern-java-6-7-8-multithreaded-access/ http://java-performance.info/string-intern-java-7-8-part-3/

Suggestion of improving string decoding - https://cl4es.github.io/2021/02/23/Faster-Charset-Decoding.html

(google search) (amazon search)


Sun Feb 21 00:10:54 AEDT 2021 From /weblog/java/features

Graal


Java on Truffle — Going Fully Metacircular - https://medium.com[..]le-going-fully-metacircular-215531e3f840 https://www.infoq.cn/article/gTHX7fc0CLTtV9FCbGjO

(google search) (amazon search)


Sun Feb 14 01:24:00 AEDT 2021 From /weblog/java/fundamental

crash


In this post we will be looking at crash logs, the hs_err file, that is generated when the Java Virtual Machine crashes. Trying to find what is going wrong, and which component to blame, is important to understand how to interpret the crash log file. The focus will be on understanding the frames that make up the stack trace. - https://inside.java/2021/02/12/deciphering-the-stacktrace/

(google search) (amazon search)


Sun Feb 14 01:17:38 AEDT 2021 From /weblog/java/tools

monitoring


Java Flight Recorder, a tool to record all detail of how the API work for undo and replay and detail profiling - http://docs.oracle.com/cd/E15289_01/doc.40/e15070/toc.htm

Creating Custom JFR Events - http://hirt.se/blog/?p=444

Java Mission Control - http://blog.eisele.net[..]-mission-control-52-is-finally-here.html http://hirt.se/blog/?p=343 http://hirt.se/blog/?p=364&cpage=1#comment-98 https://www.infoq.com/news/2016/10/Java-Flight-Recorder-Mission

Support of JMX from common java library - http://www.javacodegeeks.com[..]ling-jmx-in-hibernate-ehcache-qurtz.html

sample code show how to get vm info at jmx - http://blogs.sun.com/jmxetc/entry/how_to_retrieve_remote_jvm

An excellent short tutorial of JMX - http://java.sun.com/developer/technicalArticles/J2SE/jmx.html

Monitoring all tomcat 5 JMX information, with free tools and java startup config - http://jroller.com[..]illiams/20050202#monitoring_tomcat_5_5_x

Task manager like jconsole plugin - http://blog.luminis.nl[..]is/entry/top_threads_plugin_for_jconsole

Performance cost of JMX - http://weblogs.java.net[..]nus/archive/2006/07/how_much_does_i.html

Monitoring Local and Remote Applications Using JMX 1.2 and JConsole - http://onjava.com/lpt/a/5226

Collections of tools - http://www.javacodegeeks.com[..]/client-side-server-monitoring-with.html

remote conenction with ssh - http://theholyjava.wordpress.com[..]nitoring-remote-jvm-over-ssh-jmx-or-not/

IBM healthcare API - http://www.ibm.com[..]rary/j-healthcareapi1/index.html?ca=drs- http://www.ibm.com/developerworks/java/jdk/tools/healthcenter/

JVM Statistics with jstat - http://marxsoftware.blogspot.hk[..]k/2017/05/jvm-statistics-with-jstat.html

Useful JDK tools - https://blog.marcinchwedczuk.pl/useful-jdk-tools-part-1

(google search) (amazon search)


Fri Feb 12 11:37:17 AEDT 2021 From /weblog/java/fundamental

Assemble


The tool that allow you write JVM instruction using assemble like command

http://jasclipse.sourceforge.net/

An article about assemble Java - http://www.theserverside.com[..]s/content/GuideJavaBytecode/article.html

Overview of bytecode - http://arhipov.blogspot.com[..]/2011/01/java-bytecode-fundamentals.html http://www.javaadvent.com/2013/12/mastering-java-bytecode.html https://blog.jamesdbloom.com/JavaCodeToByteCode_PartOne.html

(google search) (amazon search)


Fri Feb 05 00:57:57 AEDT 2021 From /weblog/java/network

socket


Talking to Postgres Through Java 16 Unix-Domain Socket Channels - https://www.morling.dev[..]ugh-java-16-unix-domain-socket-channels/

(google search) (amazon search)


Wed Jan 06 23:49:46 AEDT 2021 From /weblog/java/string

construction


Java's String.repeat Method in Action: Building PreparedStatement with Dynamic Number of Parameters - https://marxsoftware.blogspot.com[..]k11-string-repeat-preparedstatement.html

(google search) (amazon search)


Wed Dec 30 23:49:03 AEDT 2020 From /weblog/java/concurrency

Thread


An API to get the state of a thread, but someone say it is not reliable - http://java.sun.com[..]5.0/docs/api/java/lang/Thread.State.html http://java.silke-wingens.de/2011/03/13/threads-states/?lang=en

http://www.nabble.com[..]readed-programs-tf3627394.html#a10128844

Having said that, I have to note that using Thread#getState() is not
something you can absolutely rely on as the behavior isn't guaranteed
to be the same on all platforms. That is, it can be a useful tool for
debugging and test-driving but not ideal for regression (unit)
testing.

Overview of Java thread - http://java67.blogspot.hk[..]t-thread-and-javalangthread-in-java.html

Loom - https://webtide.com/do-looms-claims-stack-up-part-1/ https://webtide.com/do-looms-claims-stack-up-part-2/

(google search) (amazon search)


Mon Dec 21 01:24:50 AEDT 2020 From /weblog/java/performance

hotspot


How can jruby take advantage of hotspot - http://headius.blogspot.com[..]nderstanding-jvm-jit-and-helping-it.html

Discussion about OOME - http://www.codingthearchitecture.com[..]01/14/jvm_lies_the_outofmemory_myth.html

How hotspot optimization ofoptimzate Polymorphism - http://blogs.azulsystems.com/cliff/2008/03/another-round-o.html

List of tools - http://www.jroller.com/lmchung/entry/java_performance_tools

an issue of hotspot but haven't handle in 5 year - http://bugs.sun.com/view_bug.do?bug_id=6186134

A test for how hotspot inline method - http://java.dzone.com/articles/how-aggressive-method-inlining http://nurkiewicz.blogspot.com.au[..]ggressive-is-method-inlining-in-jvm.html

Various JIT optimization that JVM doing - http://blog.takipi.com[..]uper-useful-jit-optimization-techniques/

https://www.reddit.com[..]ava_as_fast_as_c_when_it_comes_to_stack/

(google search) (amazon search)


Wed Oct 14 15:11:16 AEDT 2020 From /weblog/java/libraries

high performance


Reactor framework, base on disruptor - http://www.infoq.com/news/2013/11/reactor-goes-ga

One http library to consider, Comsat - http://blog.paralleluniverse.co/2015/12/02/http-clients/

disruptor 高性能队列最佳选择 - https://xie.infoq.cn/article/7cee25201ffdaba3b8644d68d?y=qun0825

Babl High-Performance WebSocket Server - https://epickrram.blogspot.com[..]l-high-performance-websocket-server.html https://github.com/babl-ws/babl

(google search) (amazon search)


Thu Oct 08 11:22:27 AEDT 2020 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/developerworks/java/library/j-jni/index.html

Other library try to simple using native library - https://inside.java/2020/10/06/jextract/

(google search) (amazon search)


Thu Oct 08 00:11:17 AEDT 2020 From /weblog/java/features

java15


https://www.infoq.com/news/2020/09/java15-released

(google search) (amazon search)



Wed Aug 26 16:25:14 AEST 2020 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 - https://github.com/paul-hammant/paranamer (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

LamdbaMetafactory is pretty fast. (*) - https://www.optaplanner.org[..]8/01/09/JavaReflectionButMuchFaster.html

(google search) (amazon search)


Tue Jul 14 16:44:05 AEST 2020 From /weblog/java/fundamental

object


We can control how the default hashcode return, and and what the difference of default hashcode between java7 and 8 - https://blog.codinghorror.com/complaint-driven-development/

http://sigpwned.com/2018/08/10/string-hashcode-is-plenty-unique/

https://shipilev.net/jvm/objects-inside-out

https://www.baeldung.com/jvm-measuring-object-sizes

(google search) (amazon search)