Coder Social home page Coder Social logo

javago's Introduction

javago

Java wrapper code generator for Go.

How to use

Install jnigo javago

go get github.com/juntaki/jnigo
go get github.com/juntaki/javago

Run command

$ javago -h
NAME:
   javago - Java binding generator for Go

USAGE:
   javago [global options] command [command options] [arguments...]

VERSION:
   0.0.0

COMMANDS:
     help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --classpath value  Specifies the path the javap command uses to look up classes. (default: "*:.")
   --classfile value  classfile
   --help, -h         show help
   --version, -v      print the version

e.g. generate java.lang.Math wrapper code. Generated file is in sample directory in this repository.

$ javago --classfile java.lang.Math
$ ls java
java.lang.Math.go

Run your app with javago wrapper

Don't forget to add libjvm.so's directory to LD_LIBRARY_PATH.

for debian/ubuntu

export LD_LIBRARY_PATH=/usr/lib/jvm/default-java/jre/lib/amd64/server
export CLASSPATH="." # add your classpath
go build
./yourapp

for mac

export JAVA_HOME=`/usr/libexec/java_home` 
export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/server/
export CLASSPATH="."
go build
./yourapp

javago's People

Contributors

juntaki avatar

Stargazers

Sergio avatar Tatsuro YOKOTA avatar Jam Adams avatar idk avatar Yosuke Kuno avatar 抽象 avatar Hidenori Maehara avatar

Watchers

James Cloos avatar  avatar

Forkers

eyedeekay

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.