New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

java2js

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

java2js

Converts Java to JavaScript with support for p5.js and QuintOS.

  • 1.0.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9
decreased by-43.75%
Maintainers
1
Weekly downloads
 
Created
Source

Java to Javascript for QuintOS

I've built on top of the java-to-javascript transpiler by @wyattades and got inspiration from the JDK (Java Development Kit) implementation in java2javascript by @BobHanson, @zhourenjian, @abego, and others.

My purpose in creating this project is to allow intro level CS students to write Java code but still use my QuintOS library which is web based. Yes, I went to all this trouble just so some teenagers don't have to run their programs in a boring Java console! I made a barebones JDK implementation in modern Javascript to acheive this.

Known limitations

  • casting to int truncation workaround requires parenthesis around the number being cast

  • no support for method overloading, though a workaround could be made by making a function with the og name route to each of the variations of the overloaded function

  • no support for private/public methods, though this could be done since they are included in modern JavaScript classes

Contribute

I've only done a barebones implementation of Java 17 JDK, a lot is missing, so if you are interested in adding more please go for it and submit a pull request!

FAQs

Package last updated on 16 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc