Giter Club home page Giter Club logo

nur_sample_java's Introduction

NUR java samples

This repository contains NurApi java samples.

Directories

  • transports
    • NurApiSerialTransport, RXTX library based transport for NurApi
    • NurApiSocketTransport, TCP/IP transport for NurApi
  • samples
    • Set of console examples (see section 'Compiling samples')
  • import
    • Contains NurApi.jar (see section 'Updating NurApi.jar')

Setup your transport

Compiling & running samples

  • First see Setup your transport section

Windows via command line

  • JAVA_HOME environment variable needs to point java JDK install dir
  • Build all samples: build_all.bat
  • Run sample: run_sample.bat <folder>
    • Example: nur_sample_java>run_sample.bat samples\00_Connection
  • Depending on your platform (x86,x64) you may need to change RXTXJAR path in bat scripts. (defaults x64)

Linux via command line

  • Assumes java and javac are found in path
  • Assumes RXTXcomm.jar found in /usr/share/java/RXTXcomm.jar
  • Assumes librxtxSerial.so found in java library path (usually /usr/lib/jni)
    • Debian based distros you can install RXTX: sudo apt-get install librxtx-java
  • Build all samples: sh build_all.sh
  • Depending on distro, you might need to adjust run_sample.sh script with: -Djava.library.path="/usr/lib/jni/"
  • Run sample: sh run_sample.sh <folder>
    • Example: $> sh run_sample.sh samples/00_Connection

Eclipse IDE

  • Import all projects under samples folder to workspace
  • Might need to fix buildpaths, depending on platform
  • Run sample using right mouse click over project and select: RunAs -> Java Application
  • See output from eclipse Console window

Updating NurApi.jar

You can update to latest NurApi.jar by running script. Script will download latest NurApi.jar from nur_sdk github to import directory.

  • Windows
    • Run in command prompt: UpdateImportsFromGitHub.bat
  • Linux
    • Run in shell: sh UpdateImportsFromGitHub.sh

License

All source files in this repository is provided under terms specified in LICENSE file.

nur_sample_java's People

Contributors

mikkonid avatar turorantanen avatar

Stargazers

Lam Vo avatar

Watchers

James Cloos avatar Lam Vo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.