1
0
mirror of https://github.com/quinton-ashley/java2js synced 2024-12-29 10:11:54 +01:00
This commit is contained in:
Quinton Ashley 2022-02-21 12:13:53 -05:00
parent 28c28d298a
commit 0d4f10034f
3 changed files with 35 additions and 3 deletions

View File

@ -1,8 +1,8 @@
# Java to JavaScript (java2js)
`java2js` can translate simple Java programs to JavaScript and runs them using a JavaScript based JDK.
java2js can translate simple Java programs to JavaScript and runs them using a JavaScript based JDK.
Try out the demo in the docs folder of this repository. `index.html` and `ide.js` are a barebones implementation.
[Try it out!](https://quinton-ashley.github.io/java2js/) The demo files are located in the docs folder of this repository, its a barebones implementation that shows what is possible with java2js.
## Java classes included in the java2js JDK

View File

@ -7,6 +7,7 @@
<style>
body,
textarea {
display: flex;
background: #000;
color: #eee;
}
@ -17,6 +18,20 @@
tab-size: 2;
}
.mid {
cursor: pointer;
width: 2vw;
padding: 0.5vw;
background-repeat: repeat-y;
}
img,
p {
width: inherit;
text-align: center;
font-size: 2vw;
}
#javaFile {
width: 48vw;
height: 97vh;
@ -39,6 +54,23 @@
autocapitalize="off"
placeholder="Create a Java class with a main method here..."
></textarea>
<div class="mid" onclick="location.href = 'https:\/\/github.com/quinton-ashley/java2js';">
<img src="favicon.ico" alt="" />
<p>j</p>
<img src="favicon.ico" alt="" />
<p>a</p>
<img src="favicon.ico" alt="" />
<p>v</p>
<img src="favicon.ico" alt="" />
<p>a</p>
<img src="favicon.ico" alt="" />
<p>2</p>
<img src="favicon.ico" alt="" />
<p>j</p>
<img src="favicon.ico" alt="" />
<p>s</p>
<img src="favicon.ico" alt="" />
</div>
<textarea
id="javaConsole"
spellcheck="false"

View File

@ -1,6 +1,6 @@
{
"name": "java2js",
"version": "1.1.12",
"version": "1.2.0",
"description": "Converts Java to JavaScript and runs it with a JS JDK",
"main": "jdk.js",
"scripts": {