- Java 21
- Docker
There are two projects, JShellAPI and JShellWrapper JShellAPI is a REST API, and whenever some code is received, it will create a session, by creating a docker container, which will run JShellWrapper inside and then execute the given code in JShellWrapper.
- Go in Run → Run... → Edit Configurations → create a configuration
- Select the command
JShellWrapper:run - Click on modify options, and check
VM options - Then add
evalTimeoutSeconds=15;sysOutCharLimit=1024in the VM options - Press the run button

- Launch Docker
- Run
./gradlew :JShellWrapper:jibDockerBuildto build the image - Run
./gradlew bootRun
- Launch Docker
- Run
JShellWrapper:jibDockerBuildto build the image - Run
bootRun
- Launch Docker
- Run
jibDockerBuildto create the image - Create a folder outside the project
cdto this folder- Copy
docker-compose.yamlinside it - Optionally, create
config/application.yamlwhere you can put custom config (see the actual application.yaml)
-
- If you don't create it, delete the
command: ["--spring.config.location=file:///home/backend/config/application.yaml"]line in thedocker-compose.yaml
- If you don't create it, delete the
- Run
docker compose buildordocker-compose buildin the folder, depending on your version of Docker. - Run
docker compose startordocker-compose startin the folder, depending on your version of Docker. - Note that some folders or files may be created automatically inside this folder
- File tree representation:
-folder outside the project
-docker-compose.yaml
-config (optionnal)
-application.yaml
See JShellAPI README