No description
.idea | ||
agent | ||
application | ||
profiler | ||
.gitignore | ||
hs_err_pid5684.log | ||
lab-6-maggicl.iml | ||
README.md |
Environment
export JAVA_HOME=`/usr/libexec/java_home -v 1.8.0_345`
export PATH="${JAVA_HOME}/bin:$PATH"
Agent
Compile the agent as JAR
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
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
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
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