Skip to content

Commit bb4067a

Browse files
committed
Tried fixing database URL file path separators
1 parent 32d93d2 commit bb4067a

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

java/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,26 @@ The Java snippets are contained in the `snippets` directory under various Java p
66

77
The Java snippets can built using the `pom.xml` in this directory using `mvn package`. The result will be the `sz-sdk-snippets.jar` file in the `target` directory.
88

9+
1. First, set the `SENZING_DIR` environment variable so the `pom.xml` can locate
10+
the `sz-sdk.jar`.
11+
- Linux/macOS:
12+
13+
```console
14+
export SENZING_DIR=/opt/senzing/er
15+
```
16+
17+
- Windows:
18+
19+
```console
20+
set SENZING_DIR=C:\Program Files\Senzing\er
21+
```
22+
23+
1. Run the maven build:
24+
25+
```console
26+
mvn package
27+
```
28+
929
## Running
1030

1131
There are several ways to run the code snippets.

java/runner/java/com/senzing/runner/SnippetRunner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ private static String setupTempRepository(InstallLocations senzingInstall) throw
475475
String supportPath = senzingInstall.getSupportDirectory().getCanonicalPath();
476476
String configPath = configDir.getCanonicalPath();
477477
String resourcePath = resourcesDir.toString();
478-
String databasePath = databaseFile.getCanonicalPath();
478+
String databasePath = databaseFile.getCanonicalPath().replace('\\','/');
479479
String baseConfig = readTextFileAsString(configFile, UTF_8);
480480
String settings = """
481481
{

0 commit comments

Comments
 (0)