mirror of
https://github.com/leaningtech/cheerpj-meta.git
synced 2025-03-15 01:54:48 +01:00
Move from 2.2 to 2.3
This commit is contained in:
parent
2558c35c2e
commit
85c2f7addc
10
README.md
10
README.md
@ -8,11 +8,11 @@ title: CheerpJ - Convert Java to WebAssembly and JavaScript
|
||||
|
||||
CheerpJ is a Java bytecode to WebAssembly and JavaScript compiler, compatible with 100% of Java, which allows to compile any Java SE application, library or Java applet into a WebAssembly/JavaScript application.
|
||||
|
||||
**Main project link**: <http://leaningtech.com/cheerpj/>
|
||||
**Main project link**: <https://leaningtech.com/cheerpj/>
|
||||
|
||||
**Download latest version**: [](https://leaningtech.com/download-cheerpj/) [](Changelog)
|
||||
**Download latest version**: [](https://leaningtech.com/download-cheerpj/) [](Changelog)
|
||||
|
||||
**Link to latest runtime**: ``https://cjrtnc.leaningtech.com/2.2/loader.js``
|
||||
**Link to latest runtime**: ``https://cjrtnc.leaningtech.com/2.3/loader.js``
|
||||
|
||||
If you are unsure how to start, try our [Tutorial](https://docs.leaningtech.com/cheerpj/Tutorial).
|
||||
|
||||
@ -39,7 +39,7 @@ What is unique about CheerpJ?
|
||||
Getting Started
|
||||
-------
|
||||
|
||||
You can download CheerpJ for Linux, Windows and macOS on our website (https://leaningtech.com/cheerpj/)
|
||||
You can download CheerpJ for Linux, Windows and macOS on our website (<https://leaningtech.com/cheerpj/>)
|
||||
|
||||
To get started with CheerpJ, please refer to the following pages:
|
||||
1. [CheerpJ Tutorial](https://docs.leaningtech.com/cheerpj/Tutorial)
|
||||
@ -49,7 +49,7 @@ To get started with CheerpJ, please refer to the following pages:
|
||||
Demos
|
||||
------
|
||||
|
||||
Several demos of CheerpJ can be found at https://leaningtech.com/demo/?cheerpjfilter
|
||||
Several demos of CheerpJ can be found at <https://leaningtech.com/demo/?cheerpjfilter>.
|
||||
|
||||
|
||||
Bugs and Questions
|
||||
|
@ -91,4 +91,4 @@ CheerpJ uses WebAssembly internally for some components of the runtime, but Java
|
||||
|
||||
## What is the status of CheerpJ?
|
||||
|
||||
CheerpJ 2.2, was released on 14th May, 2021. CheerpJ is actively developed by [Leaning Technologies Ltd](https://leaningtech.com), a British-Dutch company focused on compile-to-JavaScript and compile-to-WebAssembly solutions.
|
||||
CheerpJ is actively developed by [Leaning Technologies Ltd](https://leaningtech.com), a British-Dutch company focused on compile-to-JavaScript and compile-to-WebAssembly solutions.
|
||||
|
@ -4,7 +4,7 @@ title: Getting started
|
||||
|
||||
This page will help you getting started with CheerpJ and converting your first Java application to JavaScript in no time.
|
||||
|
||||
To start, make sure to download the latest available version of CheerpJ [here](http://leaningtech.com/download-cheerpj/). Decompress the Cheerpj 2.2 archive anywhere, for example in ```~/cheerpj_2.2```.
|
||||
To start, make sure to download the latest available version of CheerpJ [here](https://leaningtech.com/download-cheerpj/). Decompress the Cheerpj 2.3 archive anywhere, for example in ```~/cheerpj_2.3```.
|
||||
|
||||
**Important:** Converting an applet is documented at the bottom of this page.
|
||||
|
||||
@ -15,7 +15,7 @@ To start, make sure to download the latest available version of CheerpJ [here](h
|
||||
The basic usage is very simple:
|
||||
|
||||
```
|
||||
~/cheerpj_2.2/cheerpjfy.py my_application_archive.jar
|
||||
~/cheerpj_2.3/cheerpjfy.py my_application_archive.jar
|
||||
```
|
||||
|
||||
This command will generate a file called ```my_application_archive.jar.js```, which needs to be deployed in the same folder of the original .JAR archive, and hosted on a web server. Instructions on how to serve the converted JavaScript on a web page are provided below.
|
||||
@ -25,7 +25,7 @@ This command will generate a file called ```my_application_archive.jar.js```, wh
|
||||
**Note to Windows users:** You will need to have python3 installed on the system. Python provides a launcher called ```py``` that will automatically detect and use the right version of python for a given script. To use ```cheerpjfy.py``` on Windows you need to prefix all the commands with ```py```, for example:
|
||||
|
||||
```
|
||||
py c:\cheerpj_2.2\cheerpjfy.py application.jar
|
||||
py c:\cheerpj_2.3\cheerpjfy.py application.jar
|
||||
```
|
||||
|
||||
# Converting multiple JARs to JAR.JS's files
|
||||
@ -33,17 +33,17 @@ py c:\cheerpj_2.2\cheerpjfy.py application.jar
|
||||
If your JAR has any dependencies in the form of further JAR archives, the ```cheerpjfy.py``` command line must be modified as follows:
|
||||
|
||||
```
|
||||
~/cheerpj_2.2/cheerpjfy.py --deps my_dependency_archive.jar my_application_archive.jar
|
||||
~/cheerpj_2.3/cheerpjfy.py --deps my_dependency_archive.jar my_application_archive.jar
|
||||
```
|
||||
|
||||
This command will generate ```my_application_archive.jar.js``` but **not** ```my_dependency_archive.jar.js```. Each archive should be compiled separately by invoking ```~/cheerpj_2.2/cheerpjfy.py my_dependency_archive.jar```.
|
||||
This command will generate ```my_application_archive.jar.js``` but **not** ```my_dependency_archive.jar.js```. Each archive should be compiled separately by invoking ```~/cheerpj_2.3/cheerpjfy.py my_dependency_archive.jar```.
|
||||
|
||||
It is in general safe to put the target JAR in the ```--deps``` list, although it is not required. If you have an application composed of many JARs you can do something like this:
|
||||
|
||||
```
|
||||
for f in one.jar two.jar three.jar
|
||||
do
|
||||
~/cheerpj_2.2/cheerpjfy.py --deps one.jar:two.jar:three.jar $f
|
||||
~/cheerpj_2.3/cheerpjfy.py --deps one.jar:two.jar:three.jar $f
|
||||
done
|
||||
```
|
||||
|
||||
@ -55,7 +55,7 @@ done
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CheerpJ test</title>
|
||||
<script src="https://cjrtnc.leaningtech.com/2.2/loader.js"></script>
|
||||
<script src="https://cjrtnc.leaningtech.com/2.3/loader.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
@ -70,7 +70,7 @@ This page will initialize the CheerpJ system, create a graphical environment to
|
||||
|
||||
You can now serve this web page on a simple http server, such as the http-server utility.
|
||||
```
|
||||
http-server ~/cheerpj_2.2/
|
||||
http-server ~/cheerpj_2.3/
|
||||
```
|
||||
|
||||
# Converting an applet
|
||||
@ -80,7 +80,7 @@ Applets can be run by Chrome users using the [CheerpJ Applet Runner](https://chr
|
||||
To support all browsers, you can add the following tags to your page:
|
||||
|
||||
```
|
||||
<script src="https://cjrtnc.leaningtech.com/2.2/loader.js"></script>
|
||||
<script src="https://cjrtnc.leaningtech.com/2.3/loader.js"></script>
|
||||
<script>cheerpjInit({enablePreciseAppletArchives:true});</script>
|
||||
```
|
||||
|
||||
@ -96,7 +96,7 @@ To avoid potential conflicts with native Java we recommend replacing the origina
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CheerpJ applet test</title>
|
||||
<script src=" https://cjrtnc.leaningtech.com/2.2/loader.js"></script>
|
||||
<script src=" https://cjrtnc.leaningtech.com/2.3/loader.js"></script>
|
||||
<script>cheerpjInit({enablePreciseAppletArchives:true});</script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -14,7 +14,7 @@ A basic HTML file to load a CheerpJ application will look as follows:
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CheerpJ test</title>
|
||||
<script src="https://cjrtnc.leaningtech.com/2.2/loader.js"></script>
|
||||
<script src="https://cjrtnc.leaningtech.com/2.3/loader.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
@ -30,7 +30,7 @@ A basic HTML file to load a CheerpJ application will look as follows:
|
||||
|
||||
To load the most recent runtime, use the following link:
|
||||
```html
|
||||
<script src="https://cjrtnc.leaningtech.com/2.2/loader.js"></script>
|
||||
<script src="https://cjrtnc.leaningtech.com/2.3/loader.js"></script>
|
||||
```
|
||||
|
||||
More in general, you can use this line:
|
||||
|
@ -8,7 +8,7 @@ CheerpJ is very easy to use, this tutorial will guide you step by step into comp
|
||||
|
||||
Visit [our download page](https://leaningtech.com/download-cheerpj/) and download the CheerpJ archive for your platform. CheerpJ is available for Linux, Mac OS X and Windows.
|
||||
|
||||
CheerpJ is distributed as an archive for all the platforms, you can unpack the archive anywhere in the system. During the tutorial we will assume that CheerpJ has been unpacked in the home directory and its root is ```~/cheerpj_2.2/```. Please keep in mind to use a different path in the following commands if you have chosen a different position or you are using a different version of CheerpJ.
|
||||
CheerpJ is distributed as an archive for all the platforms, you can unpack the archive anywhere in the system. During the tutorial we will assume that CheerpJ has been unpacked in the home directory and its root is ```~/cheerpj_2.3/```. Please keep in mind to use a different path in the following commands if you have chosen a different position or you are using a different version of CheerpJ.
|
||||
|
||||
# Build or download the JAR file
|
||||
|
||||
@ -20,7 +20,7 @@ CheerpJ provides a convenient python program to convert whole JARs to JavaScript
|
||||
|
||||
```
|
||||
cd ~/cheerpj_tutorial/
|
||||
~/cheerpj_2.2/cheerpjfy.py TextDemo.jar
|
||||
~/cheerpj_2.3/cheerpjfy.py TextDemo.jar
|
||||
```
|
||||
|
||||
**NOTE**: ```cheerpjfy.py``` it's a python3 program, you need to have python3 installed on your system.
|
||||
@ -36,7 +36,7 @@ Copy the following HTML code into ```~/cheerpj_tutorial/cheerpj_tutorial.html```
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CheerpJ test</title>
|
||||
<script src="https://cjrtnc.leaningtech.com/2.2/loader.js"></script>
|
||||
<script src="https://cjrtnc.leaningtech.com/2.3/loader.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
@ -50,7 +50,7 @@ Copy the following HTML code into ```~/cheerpj_tutorial/cheerpj_tutorial.html```
|
||||
|
||||
Let's break down what is going on:
|
||||
|
||||
* We first include the CheerpJ loader from our cloud runtime. (https://cjrtnc.leaningtech.com/2.2/loader.js). This file is the only script that needs to be loaded to use CheerpJ. CheerpJ will _automatically_ load all other files, including the ```TextDemo.jar.js``` we generated above.
|
||||
* We first include the CheerpJ loader from our cloud runtime. (https://cjrtnc.leaningtech.com/2.3/loader.js). This file is the only script that needs to be loaded to use CheerpJ. CheerpJ will _automatically_ load all other files, including the ```TextDemo.jar.js``` we generated above.
|
||||
* We initialize CheerpJ using the ```cheerpjInit()``` API. See [Runtime API](Runtime-API) for more information.
|
||||
* We want to run a graphical application (i.e. a Swing or AWT application), so we need to initialize a _virtual display_ in the page. CheerpJ will render all Java windows into this display.
|
||||
* We can now start the JAR file. CheerpJ will _automatically_ download the ```TextDemo.jar.js``` file as soon as the first application class is loaded
|
||||
|
Loading…
x
Reference in New Issue
Block a user