From 2501d5c0d4e322049c279bbacaf05d500a55f852 Mon Sep 17 00:00:00 2001 From: irachle <85437680+irachle@users.noreply.github.com> Date: Wed, 2 Oct 2024 02:30:40 +0300 Subject: [PATCH] Create DEV_ENV_SETUP.md Create a readme file that will guide and help set up a working Java development environment from scratch. --- DEV_ENV_SETUP.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 DEV_ENV_SETUP.md diff --git a/DEV_ENV_SETUP.md b/DEV_ENV_SETUP.md new file mode 100644 index 0000000..ff1f9c9 --- /dev/null +++ b/DEV_ENV_SETUP.md @@ -0,0 +1,40 @@ +*** +Setup you dev environment. +--------------------------- +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 the following to make sure you are all set up and ready to write the code for the excercise. + +// todo - the purpese of this readme is to help setup a working environment in conferences where participants have almost no knowledge in Java development. +// todo - this is what we thoght might help in conferences like Hackeriot where the level of Java knowlegde is CS graduate level at most and bootcamp or personal interest knowledge is even more common. +// todo - pass all text with chatgpt. +// todo - write this as a trubleshoot guide - with how to test that the step was success full and perhaps guide how to fix common problems (path, restart, and others) + +Prepare work environment with Maven and IDE +-------------------------------------------- +To prepare your work environment, follow these steps: +1. IDE. \ + If you don't have a preferred working IDE, download and install [Intellij](https://www.jetbrains.com/idea/download/) Community Edition for free. Make sure you download the Community Edition. +2. JDK \ + If you don't have a JDK installed, download any version of JDK. The project was tested with JDK 1.8 and JDK 23. You can use IntelliJ to download the JDK by following the steps explained [here](https://www.jetbrains.com/help/idea/sdk.html#set-up-jdk). + // todo - write how to test that the JDK is installed by running java --version (can also wok for JRE), how to set JAVA_HOME, perhaps suggest to download using intellij but give the option to download independently. jdk23 will work +4. Maven \ + Download Maven, the build tool used in this project, from [here](https://maven.apache.org/download.cgi) and extract it to a folder (no installation required). + Then, add the maven/build folder to the PATH variable. + // todo - write here how to make sure maven is installed. + + + +Test and run the profiler +------------------------- +Build the project +```shell +mvn install +``` +To execute the tested app without the profiler run +```shell +java -jar ./tested-app/target/tested-app-1.0.jar +``` +To execute the tested app with the profiler run +```shell +java -javaagent:./profiler/target/profiler-1.0-jar-with-dependencies.jar -jar ./tested-app/target/tested-app-1.0.jar +```