From 426320aef79e40859d680722cb040e7aeebec37b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9?= Date: Fri, 10 Jul 2026 16:35:54 +0200 Subject: [PATCH] Modifies some script invocations that are causing the build to fail on Windows. Adds a Build section in the Readme. --- README.md | 19 ++++++++++++++++++- web-ui/package.json | 4 ++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index baa083e..c5ce059 100644 --- a/README.md +++ b/README.md @@ -131,4 +131,21 @@ JVisualBook assumes a trusted local user: - Submitted snippets are real Java code evaluated by JShell. - Snippets can consume arbitrary CPU and memory up to the 5-second execution timeout. - Snippets may access files, environment variables, and network resources available to the Java process. -- The app must not be deployed as a shared or public-facing service. \ No newline at end of file +- The app must not be deployed as a shared or public-facing service. + + +## Build + +You can build your notebook by using the following Maven command: + +```shell +mvn clean package +``` + +It builds a JAR file with the name `jvisualbook-.jar` in the `target` directory, where `version` is the version of your Maven project. + +Then you can run `java -jar target/jvisualbook-.jar` to start the web UI, and connect to it at the following default URL: `http://localhost:8080`. + +If you are running the application from an IDE, you can directly execute the `target/jvisualbook-.jar` file from your IDE. + +In both cases, the application will look for any `.jsh` file at the root of the project, and will open the first one it finds. By defaut it opens the `readme.jsh` file. diff --git a/web-ui/package.json b/web-ui/package.json index 2798a80..90a94d0 100644 --- a/web-ui/package.json +++ b/web-ui/package.json @@ -19,10 +19,10 @@ "eslint-plugin-react-hooks": "^7.1.1" }, "scripts": { - "copy-monaco": "mkdir -p public && rm -rf public/vs && cp -r node_modules/monaco-editor/min/vs public", + "copy-monaco": "mkdir public && rm -rf public/vs && cp -r node_modules/monaco-editor/min/vs public", "prebuild": "npm run copy-monaco", "build": "vite build", - "clean": "rm -rf dist", + "clean": "rm -rf dist public", "lint": "eslint src" } } \ No newline at end of file