All Projects → kylestev → jvm.js

kylestev / jvm.js

Licence: MIT license
A Java VM bytecode library written in ES6 for Node.js

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to jvm.js

eta-ffi
A command line tool to automate the generation of ffi import code for the bindings of various Java libraries.
Stars: ✭ 19 (-42.42%)
Mutual labels:  jvm, jar
Miraiandroid
QQ机器人 /(实验性)在Android上运行Mirai-console,支持插件
Stars: ✭ 188 (+469.7%)
Mutual labels:  jvm, jar
clodl
Turn dynamically linked ELF binaries and libraries into self-contained closures.
Stars: ✭ 136 (+312.12%)
Mutual labels:  jvm, jar
LLVM-JVM
[W.I.P] A Just-In-Time Java Virtual Machine written in Haskell
Stars: ✭ 22 (-33.33%)
Mutual labels:  jvm, java-bytecode
Capsule
Dead-Simple Packaging and Deployment for JVM Apps
Stars: ✭ 1,143 (+3363.64%)
Mutual labels:  jvm, jar
Cojen
Java bytecode generation and disassembly tools
Stars: ✭ 28 (-15.15%)
Mutual labels:  jvm, java-bytecode
animeflv
Animeflv is a custom API that has the entire catalog of the animeflv.net website. You can enjoy all the content with subtitles in Spanish and the latest in the world of anime for free.
Stars: ✭ 37 (+12.12%)
Mutual labels:  javascript-library
tung
A javascript library for rendering html
Stars: ✭ 29 (-12.12%)
Mutual labels:  javascript-library
mongo-uri-builder
A node.js module to easily create mongodb connection strings using configuration objects
Stars: ✭ 29 (-12.12%)
Mutual labels:  javascript-library
enterprise
Enterprise-grade component library for the Infor Design System
Stars: ✭ 117 (+254.55%)
Mutual labels:  javascript-library
ionic4-sidemenu-auth
Building a Basic Ionic 4 Login Flow with Angular Router & Side Menu UI
Stars: ✭ 34 (+3.03%)
Mutual labels:  javascript-library
Blog
Where I write stuff.
Stars: ✭ 25 (-24.24%)
Mutual labels:  jvm
picoCSS
picoCSS - really small JavaScript Framework
Stars: ✭ 62 (+87.88%)
Mutual labels:  javascript-library
FilterInputJs
Tiny and Powerful Library for limit an entry (text box,input) as number,string or more...
Stars: ✭ 37 (+12.12%)
Mutual labels:  javascript-library
Java-Interview
「Java面试小抄」一份通向理想互联网公司的面试汇总,包括 Java基础、Java并发、JVM、MySQL、Redis、Spring、MyBatis、Kafka、计算机操作系统、计算机网络、系统设计、分布式、Java 项目实战等
Stars: ✭ 1,352 (+3996.97%)
Mutual labels:  jvm
Kursor
Cursor style with javascript and css
Stars: ✭ 140 (+324.24%)
Mutual labels:  javascript-library
amirajs
Amirajs is Lightweight (~0.4kb compressed) JS Library for DOM Manipulation
Stars: ✭ 12 (-63.64%)
Mutual labels:  javascript-library
hprof-slurp
JVM heap dump analyzer
Stars: ✭ 65 (+96.97%)
Mutual labels:  jvm
j2cache
java实现的缓存策略组件,支持多种缓存产品,开发人员可以像Map一样使用,简单方便。支持的存储方案:jvm\redis\ignite\hazelcast\guava
Stars: ✭ 33 (+0%)
Mutual labels:  jvm
jiface
A Clojure-idiomatic wrapper around Erlang's JInterface
Stars: ✭ 27 (-18.18%)
Mutual labels:  jvm

jvm.js

A bytecode library for Java written in Node.js

npm version

This module is under active development and has not yet reached a stable release. This module will be following SemVer once it is ready for use by 3rd parties.


Installation

$ npm install jvm

And you will be able to get started with using jvm.js. Take a look at the next section for some examples of how to get started.

Examples

jvm.js makes use of Promises instead of passing callbacks in functions. This allows your code to not fall victim to the node callback tree of doom. You'll see examples of it in the examples below.

If you're unfamiliar with Promises, or need a refresher, checkout Mozilla's excellent documentation here.

Loading a Jar's classes

The example below uses ES6 and shows how easy it is to parse a Jar file.

import { Jar } from 'jvm';

Jar.unpack('./test.jar')
  .then((jar) => {
    for (let [name, cls] of jar) {
      if (cls.name === 'client') {
        console.log('found client class!');
        console.log(JSON.stringify({
          name: cls.name,
          superName: cls.superName,
          methodCount: cls.methods.length,
          fieldCount: cls.fields.length
        }, null, 2));
      }
    }
  })
  .catch(console.error.bind(console));
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].