File: Desktop.md

package info (click to toggle)
mapsforge 0.17.0%2Bdfsg.1-2
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 40,772 kB
  • sloc: java: 43,307; xml: 6,707; sh: 140; makefile: 23
file content (17 lines) | stat: -rw-r--r-- 645 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
### Desktop

To run the desktop samples can use the Gradle `run` task.

Can change the [mainClassName](../mapsforge-samples-awt/build.gradle) to run each sample and pass args:
```groovy
./gradlew :mapsforge-samples-awt:run -Pargs=/path/to/map
```

To create a standalone executable jar, adapt the main class in [build gradle](../mapsforge-samples-awt/build.gradle), then run:
```groovy
./gradlew :mapsforge-samples-awt:fatJar
```
The jar file can be found in `build/libs` folder. Depending on the main class, pass args on execution via command line:
```
java -jar mapsforge-samples-awt-master-SNAPSHOT-jar-with-dependencies.jar /path/to/map
```