Thanks to visit codestin.com
Credit goes to github.com

Skip to content

java2script 3.3.1-v3 #189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Jan 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ java2script/java2script is the overall master of the project. However, all activ
These notes are for Java developers who want to convert their Java applets or Java applications to
JavaScript, allowing continued, simultaneous one-source development of both Java and JavaScript.

A discussion of application limitations and features is at https://github.com/BobHanson/java2script/blob/master/sources/net.sf.j2s.core/dist/swingjs/differences.txt

Developers of java2script/SwingJS itself should read README-developers.md

Bob Hanson ([email protected])
Expand Down Expand Up @@ -56,27 +58,31 @@ In the author's own words, "There are Java APIs that are impossible to implement

https://www.leaningtech.com/cheerpj/ "CheerpJ converts Java applications or libraries into JavaScript. Works on bytecode, does not require access to the source code. Compatible with 100% of Java including reflection and dynamic classes. Existing Java archives can be converted to Web applications effortlessly"

This sounds terrific. Very straightforward -- just convert the Java class files to JavaScript. I don't doubt that most of what is written here is true. I am dubious about that "100%" claim, as there are plenty of problems in Java that would take considerably more work than just using class files directly. The Java Reporter demonstration at https://www.leaningtech.com/cheerpj/demos/ crashed both Firefox and Chrome for me, so I cannot really evaluate what I see here.
This sounds terrific. And truly it is. I am very impressed! Basically run the Java byte code in JavaScript. The Java Reporter demonstration at https://www.leaningtech.com/cheerpj/demos/ crashed both Firefox and Chrome for me, so I cannot really evaluate what I see here. But I have played with the JFiddle at https://javafiddle.leaningtech.com/, and it is pretty amazing.

The primary differences between java2script/SwingJS and CheerpJ, to the best of my knowledge, include:

- implementing a true HTML5 UI rather than just painting a canvas the way Java does
- fast start-up time. SwingJS applications generally start within a second or two, sometimes within 100 ms
- small downloads, anywhere from about 800K for a small non-GUI program to 10 MB for a full-blown Swing application (JSmol)
- class-level just-in-time dynamic class loading; no need to retrieve entire JAR files just for a few methods
- leveraging features of HTML5 and modern JavaScript rather than just painting a canvas the way Java does natively
- delivering an easily interpretable and debuggable JavaScript translation of Java classes, with little or no obscurification (unless that is desired)
- well-designed JavaScript-friendly Java core classes that leverage the considerable power of HTML5 rather than ignoring that completely
- well-designed JavaScript-friendly Java core classes that leverage the considerable power of JavaScript
- open source and completely extensible

# History - 2019-

SwingJS is now more than just "Swing"-JS. AWT applets and applications are now supported. A test suite of over 500 AWT applets has been used to refine the AWT runtime classes with great success. Many thanks to Karsten Blankenagel (University of Wuppertal) for access to this source code set.
SwingJS is now more than just "Swing"+JavaScript. AWT applets and applications are now supported. A test suite of over 500 AWT applets has been used to refine the AWT runtime classes with great success. Many thanks to Karsten Blankenagel (University of Wuppertal) for access to this source code set.

Examples include:

MathePrisma (http://www.matheprisma.uni-wuppertal.de/) This site is still using the Java applets as of 2019.03.12; JavaScript versions still in development.

# History - 2017-

https://github.com/BobHanson/java2script/tree/hanson1 (development branch)

https://github.com/BobHanson/java2script (development master)
https://github.com/BobHanson/java2script (master)

Current development "Version 3 development master" involves a completely rewritten transpiler (2017) “CompilationParticipant” that follows the Eclipse Java compiler. The implementation nearly perfectly emulates the Java Virtual Machine. It includes fully qualified methods, compile-time method binding, generic methods and classes, Java 8 lambda functions and streams, Java reflection and dynamic class loading for efficient modular just-in-time performance, Java Swing components, modal and nonmodel dialogs, audio, jpdf, the AWT event thread, and many other added packages. Java applications and applets can both be run in JavaScript in any browser.

Expand Down
2 changes: 1 addition & 1 deletion sources/net.sf.j2s.core/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Java2Script Core
Bundle-SymbolicName: net.sf.j2s.core;singleton:=true
Bundle-Version: 3.2.10
Bundle-Version: 3.3.1
Bundle-Activator: net.sf.j2s.core.CorePlugin
Bundle-Vendor: j2s.sourceforge.net
Require-Bundle: org.eclipse.core.runtime,
Expand Down
Binary file modified sources/net.sf.j2s.core/dist/swingjs/SwingJS-site.zip
Binary file not shown.
Loading