From 78790fa50d36f1ad6d1296fe68f13a1161b31c5f Mon Sep 17 00:00:00 2001 From: "Shane F. Carr" Date: Thu, 3 Nov 2022 16:11:07 -0700 Subject: [PATCH] No more sudo --- docs/ide4j/vscode/README.md | 42 ++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/docs/ide4j/vscode/README.md b/docs/ide4j/vscode/README.md index 539ebfedba6..1177185451e 100644 --- a/docs/ide4j/vscode/README.md +++ b/docs/ide4j/vscode/README.md @@ -11,28 +11,56 @@ To get ICU4J running in VSCode, including JUnit support: ``` 3. Run `ant init` in the `icu4j` directory -4. Run `sudo cp -R lib /external-libraries && chmod a+x /external-libraries`. - - *This is a big hack! It allows VSCode to find the required jar files.* - - The same outcome can also be achieved by modifying the paths in the `.classpath` files, as described below. -5. Create a new workspace and add the following directories to it: +4. Create a new workspace and add the following directories to it: - `icu4j/main/classes/*` (all directories at that path) - `icu4j/main/tests/*` (all directories at that path) - `icu4j/tools/misc` -6. ICU4J should now be able to _build_ successfully. However, when you try to run tests, you will get failures because it cannot find the data. To fix this, add the following line to the `.classpath` file of the package you are testing (e.g. `icu4j/main/tests/core/.classpath`): +5. Modify all of the `icu4j/main/tests/.classpath` files as follows: + 1. Change all occurrences of `/external-libraries/` to `../../../lib/`. + 2. Add `classpathentry`s for the data jar files. + + For example: ```xml + + + + + + + + + + + + + + + + + + + + + + + + + + + ``` -7. To prevent your changes to `.classpath` from accidentally being committed, you can run: +6. To prevent your changes to `.classpath` from accidentally being committed, you can run: ```bash $ git update-index --assume-unchanged icu4j/main/tests/core/.classpath ``` -8. If VSCode also tries changing your `org.eclipse.jdt.core.prefs` files, you can ignore those, too: +7. If VSCode also tries changing your `org.eclipse.jdt.core.prefs` files, you can ignore those, too: ```bash $ git update-index --assume-unchanged main/classes/*/.settings/org.eclipse.jdt.core.prefs -- 2.50.1