If you are developing in Java and have maven installed, you can skip this setup and work with the work environment of your choice. However, if you don't have an active Java development environment, please follow these instructions to make ensure you are all set up and ready to write the code for the exercise.
- Install Git. You can do it from here.
- Clone the code for this project by running in the folder where you want the project
git clone https://github.com/irachle/JavaInstrumentationWorkshop.git- Download and install Intellij Community Edition for free. Make sure you download the Community Edition.
- Open the project you have cloned in step 1.
- Open project settings
File -> Project Structure -> Project. - In the
Project SDKsection, clickNew -> Download JDK. - Select the desired SDK version (the project was tested with JDK 1.8, 17 and 23) and click
Download and Install. - Once the JDK is installed, select it as the
Project SDKand clickApplyandOK.
- Open the terminal in Intellij.
- Build the project
mvn installTo execute the tested app without the profiler run
java -jar ./tested-app/target/tested-app-1.0.jarTo execute the tested app with the profiler run
java -javaagent:./profiler/target/profiler-1.0-jar-with-dependencies.jar -jar ./tested-app/target/tested-app-1.0.jar