README
------

It needs to be compiled as a shared native library (.so) and then loaded into
JVM using -agentlib command line parameter.


Examples
--------

Before you can run the example, you need to make sure that
libabrt-java-connector.so is placed somewhere in the ld searched directories
or configure LD_LIBRARY_PATH environment variable to point to a directory
containing the library.

$MyClass is a placeholder for your Java class.

Example1:
- this example prints the detected errors to the terminal only
- reporting to ABRT is disabled by default

$  java -agentlib:abrt-java-connector $MyClass -platform.jvmtiSupported true


Example2:
- this example shows how to enable reporting errors to ABRT
- ABRT gets enabled by passing option 'abrt' with value 'on'
- options sent to the agent are specified right behind it's name

$  java -agentlib:abrt-java-connector=abrt=on $MyClass -platform.jvmtiSupported true


Example3:
- this example shows how to configure the log output destination
- output option is designed for this purpose
- by default abrt-java-connector prints the log to abrt_checker_$PID.log file in the current directory
- the first command prints agent's output to /tmp/abrt-agent.log file

$  java -agentlib:abrt-java-connector=output=/tmp/abrt-agent.log $MyClass -platform.jvmtiSupported true

- the second command completely disables logging to file

$  java -agentlib:abrt-java-connector=output= $MyClass -platform.jvmtiSupported true


Example4:
- this example shows how to enable reporting of caught exceptions
- caught option is designed for this purpose
- by default no caught exception is reported
- user must provide a colon separated list of exception type names

$  java -agentlib:abrt-java-connector=caught=java.io.FileNotFoundException:java.io.FileNotFoundException $MyClass -platform.jvmtiSupported true
