Skip to content

Commit 46fe0c1

Browse files
committed
Minor changes with format and grammar for consistency
1 parent 599d502 commit 46fe0c1

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

sites/cheerpj/src/content/docs/10-getting-started/00-Java-app.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Run a Java application
2+
title: Run a Java Application
33
description: Convert a desktop app to a webapp
44
---
55

@@ -10,12 +10,12 @@ Java source code is not needed to use CheerpJ. If you are building your own appl
1010
**To get started you will need:**
1111

1212
- Your Java application file(s). You can also use this [TextDemo.jar](https://docs.oracle.com/javase/tutorialJWS/samples/uiswing/TextDemoProject/TextDemo.jar) sample.
13-
- An HTML file where your Java app will be wrapped
14-
- A simple HTTP server to test your webpage locally
13+
- An HTML file where your Java app will be wrapped.
14+
- A simple HTTP server to test your webpage locally.
1515

1616
## 1. Create a project directory
1717

18-
Let's start by creating a project folder where all your files will be. Please copy your java and future HTML files here.
18+
Let's start by creating a project folder where all your files will be. Copy your java and future HTML files here.
1919

2020
```shell
2121

@@ -32,7 +32,7 @@ Let's create a basic HTML file like the following example. Please notice the Che
3232
<html lang="en">
3333
<head>
3434
<meta charset="utf-8" />
35-
<title>CheerpJ test</title>
35+
<title>CheerpJ Java App Example</title>
3636
<script src="https://cjrtnc.leaningtech.com/4.2/loader.js"></script>
3737
</head>
3838
<body>
@@ -56,7 +56,7 @@ cheerpjRunMain(
5656
);
5757
```
5858

59-
> [!help] Don't forget to use the /app/ prefix
59+
> [!note] Don't forget to use the /app/ prefix
6060
> It is common for first-time users to forget to add the prefix “/app/” when passing the application location to cheerpJRunJar() or cheerpjRunMain().
6161
6262
## 3. Host your page
@@ -67,9 +67,13 @@ You can now serve this web page on a simple HTTP server, such as the http-server
6767
npx http-server -p 8080
6868
```
6969

70-
> [!tip]
70+
> [!note] Info
7171
> Opening the page directly from the disk (for example, by double-clicking on it) is not supported.
7272
73+
## The result
74+
75+
You will see the CheerpJ display on your browser with some loading messages before showing your application running. Depending on your application and the optimizations applied, this could take just a few seconds.
76+
7377
## What's going on?
7478

7579
- The `<head>` script loads CheerpJ.
@@ -78,13 +82,9 @@ npx http-server -p 8080
7882
- [`cheerpjRunJar`] executes your application!
7983
- `/app/` is a [virtual filesystem] mount point that references the root of the web server this page is loaded from.
8084

81-
## The result
82-
83-
You will see the CheerpJ display on your browser with some loading messages before showing your application running. Depending on your application and the optimizations applied, this could take just a few seconds.
84-
8585
### Is your application not working?
8686

87-
Please try these checks:
87+
If your application doesn't work, check the following:
8888

8989
- The location of your JARs is correct and the prefix `/app/` is added when passing it to [`cheerpjRunJar`] or [`cheerpjRunMain`]. For more information visit the [virtual filesystem] guide.
9090
- Your Java application works normally on your machine without CheerpJ.

sites/cheerpj/src/content/docs/10-getting-started/01-Java-applet.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Run a Java applet
2+
title: Run a Java Applet
33
description: Run a java applet in modern browsers
44
---
55

@@ -23,7 +23,7 @@ CheerpJ can run Java applets in the browser seamlessly. This page will help you
2323

2424
## Running your own applet
2525

26-
**You will need:**
26+
**To get started you will need:**
2727

2828
- Your applet file(s)
2929
- The HTML file where your applet is meant to be displayed.
@@ -56,7 +56,7 @@ For example:
5656
<html lang="en">
5757
<head>
5858
<meta charset="utf-8" />
59-
<title>CheerpJ applet test</title>
59+
<title>CheerpJ Applet Example</title>
6060
<script src="https://cjrtnc.leaningtech.com/4.2/loader.js"></script>
6161
</head>
6262
<body>

sites/cheerpj/src/content/docs/10-getting-started/02-Java-library.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Run a Java library
2+
title: Run a Java Library
33
description: Use Java classes in JavaScript
44
---
55

@@ -13,15 +13,15 @@ Java source code is not required to use CheerpJ. If you are using your own libra
1313
- An HTML file where your Java app will be wrapped.
1414
- A simple HTTP server to test your webpage locally.
1515

16-
## 1. Create a Project Directory
16+
## 1. Create a project directory
1717

1818
Let's start by creating a project folder where all your files will be. Copy your java and future HTML files here.
1919

2020
```shell
2121
mkdir directory_name
2222
```
2323

24-
## 2. Create a Basic HTML File
24+
## 2. Create a basic HTML file
2525

2626
Let's create a basic HTML file and include and initialize CheerpJ on your page. The `cheerpjInit` command initialises the CheerpJ runtime environment.
2727

@@ -41,7 +41,7 @@ Let's create a basic HTML file and include and initialize CheerpJ on your page.
4141
</html>
4242
```
4343

44-
## 3. Load and Call the Java Library From Java
44+
## 3. Load and call the Java library from JavaScript
4545

4646
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.
4747

@@ -50,7 +50,7 @@ Now we can load your Java library by calling `cheerpjRunLibrary` which will load
5050
<html lang="en">
5151
<head>
5252
<meta charset="utf-8" />
53-
<title>CheerpJ Library Mode Test</title>
53+
<title>CheerpJ Library Mode Example</title>
5454
<script src="https://cjrtnc.leaningtech.com/4.2/loader.js"></script>
5555
</head>
5656
<body>
@@ -66,15 +66,15 @@ Now we can load your Java library by calling `cheerpjRunLibrary` which will load
6666
</html>
6767
```
6868

69-
## 3. Host your page
69+
## 4. Host your page
7070

7171
You can now serve this web page on a simple HTTP server, such as the http-server utility.
7272

7373
```shell
7474
npx http-server -p 8080
7575
```
7676

77-
## The Result
77+
## The result
7878

7979
You will see CheerpJ initialize in your browser and load the Java library. Once loaded, the methods from your library can be called directly from JavaScript, just as in the example above. Depending on the size of your library and the optimizations applied, this may take just a few seconds before your code begins executing.
8080

sites/cheerpj/src/content/docs/10-getting-started/03-JNLP.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This quickstart tutorial will take you step by step on how to run your JNLP app
1818
<JNLPRunnerButton />
1919
</div>
2020

21-
You will need:
21+
**To get started you will need:**
2222

2323
- The application `.jnlp` file.
2424
- An HTML file where your Java app will be wrapped.
@@ -217,7 +217,7 @@ cd directory_name
217217
npx http-server -p 8080
218218
```
219219

220-
## The end
220+
## Further reading
221221

222222
This is the end of the tutorial. To learn more about running standalone applications and applets with CheerpJ, you can visit the dedicated tutorials:
223223

0 commit comments

Comments
 (0)