52 lines
No EOL
1.2 KiB
Markdown
52 lines
No EOL
1.2 KiB
Markdown
## Environment
|
|
|
|
```shell
|
|
export JAVA_HOME=`/usr/libexec/java_home -v 1.8.0_345`
|
|
export PATH="${JAVA_HOME}/bin:$PATH"
|
|
```
|
|
|
|
## Agent
|
|
|
|
### Compile the agent as JAR
|
|
|
|
```shell
|
|
export JAVA_HOME=`/usr/libexec/java_home -v 1.8.0_345`
|
|
export PATH="${JAVA_HOME}/bin:$PATH"
|
|
cd agent/src
|
|
find . -name '*.java' -print -exec javac -cp ../lib/\*:. -d ../../out/production/agent \{\} \;
|
|
cd ..
|
|
jar cfm agent.jar manifest.txt -C ../out/production/agent .
|
|
jar tf agent.jar
|
|
```
|
|
|
|
## Profiler
|
|
|
|
### Compile the profiler
|
|
|
|
```shell
|
|
export JAVA_HOME=`/usr/libexec/java_home -v 1.8.0_345`
|
|
export PATH="${JAVA_HOME}/bin:$PATH"
|
|
cd profiler/src
|
|
find . -name '*.java' -print -exec javac -d ../../out/production/profiler \{\} \;
|
|
cd ../..
|
|
```
|
|
|
|
## Application
|
|
|
|
### Compile the application
|
|
|
|
```shell
|
|
export JAVA_HOME=`/usr/libexec/java_home -v 1.8.0_345`
|
|
export PATH="${JAVA_HOME}/bin:$PATH"
|
|
cd application/src
|
|
find . -name '*.java' -print -exec javac -d ../../out/production/application \{\} \;
|
|
cd ../..
|
|
```
|
|
|
|
### Run application with agent
|
|
|
|
```shell
|
|
export JAVA_HOME=`/usr/libexec/java_home -v 1.8.0_345`
|
|
export PATH="${JAVA_HOME}/bin:$PATH"
|
|
java -javaagent:agent/agent.jar=hello -cp out/production/application -Xbootclasspath/p:out/production/profiler ch.usi.inf.sp.dbi.Application
|
|
``` |