forked from NordicID/nur_sample_java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_sample.bat
30 lines (24 loc) · 943 Bytes
/
run_sample.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
@echo off
setlocal enabledelayedexpansion
REM Execute single example
REM usage:
REM Execute bat in command prompt
REM nur_sample_java>run_sample.bat example_path
REM
REM Examples:
REM nur_sample_java>run_sample.bat samples\00_Connection
REM nur_sample_java>run_sample.bat samples\01_SimpleInventory
REM manually set JAVA_HOME
REM SET JAVA_HOME="C:\Program Files\Java\jre1.8.0_31"
if "%JAVA_HOME%" == "" (
echo FAILED
echo JAVA_HOME Environment not set
echo Set JAVA_HOME to point java install dir in system environment
echo Or set JAVA_HOME in this bat file
exit /B 2
)
REM RXTX jar path
SET RXTXJAR=transports/NurApiSerialTransport/rxtx/win_x64/RXTXcomm.jar
REM RXTX native lib jar path
SET RXTXLIBPATH=transports/NurApiSerialTransport/rxtx/win_x64/
"%JAVA_HOME%/bin/java" -Djava.library.path="%RXTXLIBPATH%" -cp "%1/bin;samples/SamplesCommon/bin;transports/jars/*;%RXTXJAR%;import/NurApi.jar" com.nordicid.testapplication.Example