sp-06/README.md

33 lines
679 B
Markdown
Raw Normal View History

## Environment
```shell
export JAVA_HOME=`/usr/libexec/java_home -v 1.8.0_345`
export PATH="${JAVA_HOME}/bin:$PATH"
```
## Agent
2023-12-13 10:41:52 +00:00
### Compile the agent as JAR
```shell
cd agent/src
find . -name '*.java' -print -exec javac -cp ../lib/\*:. -d ../../out/production/agent \{\} \;
2023-12-13 10:41:52 +00:00
cd ..
jar cfm agent.jar manifest.txt -C ../out/production/agent .
```
## Profiler
### Compile the profiler
```shell
cd profiler/src
find . -name '*.java' -print -exec javac -d ../../out/production/profiler \{\} \;
cd ../..
```
## Run application with agent
2023-12-13 10:41:52 +00:00
```shell
java -javaagent:agent/agent.jar=hello -cp out/production/application:out/production/profiler ch.usi.inf.sp.dbi.Application
2023-12-13 10:41:52 +00:00
```