From d8fd89c5f292aa0cda5db0938156950939548343 Mon Sep 17 00:00:00 2001 From: Endolf Date: Fri, 1 Jun 2018 18:27:05 +0100 Subject: [PATCH] Website updates --- docs/index.md | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/docs/index.md b/docs/index.md index 1d5d0d0..34384f1 100644 --- a/docs/index.md +++ b/docs/index.md @@ -21,16 +21,19 @@ often contain a native code portion to interface to the host system. ## Getting Started -Include dependency in your project: +Include the dependency in your project: -1. Maven - Easy way ------ ```xml net.java.jinput jinput {{site.jinput_version}} - pom + + + net.java.jinput + jinput + {{site.jinput_version}} + natives-all ``` You'll also need to add the build plugin in your `build/plugins` section of your pom @@ -43,10 +46,15 @@ Include dependency in your project: A full pom might look like [this one](https://github.com/jinput/jinput/blob/master/examples/example.pom.xml) +## Running + +Add the jinput jar to your classpath, assuming you are using maven and have the native dependencies plugin working, it will have unpacked the native binaries to `target/natives`, you must specify the `java.library.path` property to point to this directy. + +Example +``` +java -cp ~/.m2/repository/net/java/jinput/jinput/{{site.jinput_version}}/jinput-{{site.jinput_version}}.jar:target/examples-pom-{{site.jinput_version}}.jar -Djava.library.path=target/natives net.java.games.input.example.ReadFirstMouse +``` -2. Build from sources - Experts only ------ -See the [readme.md](https://github.com/jinput/jinput) ## Usage ```java