Skip to content

Conversation

@rijulshrestha
Copy link

No description provided.

@rijulshrestha rijulshrestha self-assigned this Oct 23, 2025
@rijulshrestha rijulshrestha added the documentation Improvements or additions to documentation label Oct 23, 2025
Copy link
Member

@epanholz epanholz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can still add a bit more context to the introduction. Have a look at the other Getting Started pages, they all describe what files are needed and show more of the HTML page.

Copy link
Member

@epanholz epanholz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This page looks really nice now. I requested some small changes and after that it should be ready.

Comment on lines +59 to +62
const cj = await cheerpjRunLibrary("/app/library.jar");
const MyClass = await cj.com.library.MyClass;
const obj = await new MyClass();
await obj.myMethod();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add a comment here that these are example classes and will look different for whatever library you are using.

## 2. Initialize CheerpJ and load your Java library
## 2. Create a Basic HTML File

Let's create a basic HTML file and include and initialize CheerpJ on your page. cheerpjInit initialises the CheerpJ runtime environment.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change this:
cheerpjInit initialises the CheerpJ runtime environment.

To this, to make it more clear. And add the ` symbols to highlight it as a command:
The `cheerpjInit` command initialises the CheerpJ runtime environment.

## 3. Load and Call the Java Library From Java

This will load `library.jar` from the root of your web server.
Now we can load your Java library by calling cheerpjRunLibrary which will load the library from the root of your web server. We are assuming your HTML file and your .jar files are under the project directory you just created.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cheerpjRunLibrary -> `cheerpjRunLibrary`
.jar -> `.jar`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants