User Tools

Site Tools


java:misc

Log4j

Auf ChainSaw loggen

log4j.appender.chainsaw=org.apache.log4j.net.SocketAppender
log4j.appender.chainsaw.remoteHost=localhost
log4j.appender.chainsaw.port=4445
log4j.appender.chainsaw.locationInfo=true

JUnit & Co

Java Virtual Machine

Remote Debugging

(Quelle unbekannt, vermutlich Sun oder IBM)

Listen for a socket connection on port 8000. Suspend this VM before main
class loads (suspend=y by default). Once the debugger application connects,
it can send a JDWP command to resume the VM.

-Xrunjdwp:transport=dt_socket,server=y,address=8000

Choose an available shared memory transport address and print it to
stdout. Listen for a shared memory connection at that address. Allow the VM
to begin executing before the debugger application attaches.

-Xrunjdwp:transport=dt_shmem,server=y,suspend=n

Attach to a running debugger application via socket on host myhost at
port 8000. Suspend this VM before main class loads.

-Xrunjdwp:transport=dt_socket,address=myhost:8000

Attach to a running debugger application via shared memory at transport
address “mysharedmemory”. Suspend this VM before main class loads.

-Xrunjdwp:transport=dt_shmem,address=mysharedmemory

Wait for an instance of java.io.IOException to be thrown in this VM.
Suspend the VM (suspend=y by default). Listen for a socket connection on
port 8000. Execute the following: “/usr/local/bin/debugstub dt_socket
myhost:8000”. This program can launch a debugger process in a separate
window which will attach to this VM and begin debugging it.

-Xrunjdwp:transport=dt_socket,server=y,address=8000,onthrow=java.io.IOException,launch=/usr/local/bin/debugstub

Wait for an uncaught exception to be thrown in this VM. Suspend the VM.
Select a shared memory transport address and listen for a connection at that
address. Execute the following: “d:\bin\debugstub.exe dt_shmem <address>”,
where <address> is the selected shared memory address. This program can
launch a debugger process in a separate window which will attach to this VM
and begin debugging it.

-Xrunjdwp:transport=dt_shmem,server=y,onuncaught=y,launch=d:\bin\debugstub.exe

Java Performance

Garbage Collecting

JDBC / JPA

Java XML

java/misc.txt · Last modified: 2013/09/05 10:45 by hgoebl