Giter Club home page Giter Club logo

jtoxcore's Introduction

jToxcore

JNI wrapper for Toxcore

Currently, it should be possible to simply import the project into Eclipse. The CDT tools for Eclipse are needed, and can be installed via this http://download.eclipse.org/tools/cdt/releases/kepler/ update-site. This is for the most recent version of Eclipse (Kepler)

The project assumes make is available. I don't know the include paths that will be automatically set up when freshly importing this, so direct any questions on importing this to https://github.com/sonOfRa. Also sonOfRa on IRC in both #tox and #tox-dev.

Importing into Eclipse

  1. Clone the repository.
  2. Start Eclipse, and under File -> Import -> General select "Existing Projects into Workspace".
  3. Browse to the location of the git repository, and untick "Copy projects into workspace" (If you copy the project into your workspace, all changes will be made there, and not to the repository)
  4. When done, right click the Project -> New -> Other -> C/C++ -> "Convert to a C/C++ Project (adds C/C++ nature)" 4.1 Select "Convert to C project" 4.2 Select "Makefile Project" 4.3 Select a toolchain. I use Linux GCC, you might have to pick another, depending on your platform and environment
  5. Go to Project -> Properties -> C/C++ General -> Paths and Symbols 5.1 In the "Includes" tab, add ${JAVA_HOME}/include* and ${JAVA_HOME}/include/(linux|win32|whatever) to all languages. 5.2 If tox.h is not on your include path, you have to add it manually, just like you added the above include paths. If you did a 'make install' when building tox, the headers should be in /usr/local/include
  6. Hit Shift+F9 to open the "Make"-Menu. Here you add a make target called "JTox.h", which you can now execute after bringing up the Make menu again. This target creates the header files for each designated native method in the Java Code
  • On Mac OSX, $JAVA_HOME is set to '/Library/Java/JavaVirtualMachines/{jdk version}/Contents/Home' when using the JDK installer from Oracle's website, this doesn't necessarily set up the $JAVA_HOME environment variable.

General Guidelines

  1. Do not expose native calls publicly, wrap them with Java function as shown in the addFriend example
  2. In public facing Java methods, throw Exceptions instead of returning error codes
  3. Group native calls with their corresponding public API method (native method directly above API call)
  4. JavaDoc on public methods is mandatory. Adding JavaDoc to non-public methods is highly encouraged. This means that any Pull Request with undocumented public method WILL BE REJECTED until proper JavaDoc is added.
  5. Do not commit code that only works on Java 7. This API is supposed to work on Android as well, which does not support the full Java 7 specification.

jtoxcore's People

Contributors

benwaffle avatar exonity avatar mh0rst avatar sonofra avatar stqism avatar

Watchers

 avatar  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.