Category Archives: java

jstack on 64 bits

sudo /usr/java/default/bin/jstack -J-d64 -m sudo /usr/java/default/bin/jmap -J-d64 -heap 23670 Advertisements

Posted in java | Tagged | Leave a comment

concurrency model with Actor

Actor model everything is a Actor, natively concurrent. Support in programming language Erlang: language level. Erlang is the best platform for concurrency and distributed application so far. Python eventlet why gevent Gevent: good, bad and ugly gevent tutorial Java: library level. Akka

Posted in erlang, eventlet, gevent, java, python | Leave a comment

VisualVM remote monitoring JVM

JMX set up for JVM argument -Dcom.sun.management.jmxremote.port=8086 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false

Posted in java, visualvm | Leave a comment

JVM GC tuning

HeapDump-XX:+HeapDumpOnOutOfMemoryError-XX:HeapDumpPath=/home/blah/pid.hprof

Posted in java | Leave a comment

install sun-jdk 6, 7 on Ubuntu 12.04

http://www.devsniper.com/ubuntu-12-04-install-sun-jdk-6-7/ sudo update-alternatives –config java sudo update-alternatives –config javac sudo update-alternatives –install “/usr/bin/java” “java” “/usr/lib/jvm/jdk1.7.0/bin/java” 1 sudo update-alternatives –install “/usr/bin/javac” “javac” “/usr/lib/jvm/jdk1.7.0/bin/javac” 1 sudo update-alternatives –install “/usr/bin/javaws” “javaws” “/usr/lib/jvm/jdk1.7.0/bin/javaws” 1

Posted in java, ubuntu | Leave a comment

java & xml spaghetti

  There are so many alternatives when it comes to parse XML in Java.  The popular ones being used are JAXP, Xerces2, SAX–> JDOM (higher level)–> JAXB (even higher level). My personal favoraite for parsing only is dom4j. It supports XPATH … Continue reading

Posted in java | Leave a comment

when JAXB is a bad idea

 JAXB is an interesting parser generator. I used JavaCC 5 yrs ago to generate some Java classes from a grammar defined for some COBOL copybook. It is a similar idea but the grammar is called XML schema now.   Let … Continue reading

Posted in java | Leave a comment