Skip to content

Commit 1a2108e

Browse files
authored
Merge pull request #812 from yeikel/patch-1
docs: use syntax highlighting
2 parents caadcba + 6007165 commit 1a2108e

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,56 +44,56 @@ The org.json package can be built from the command line, Maven, and Gradle. The
4444
**Building from the command line**
4545

4646
*Build the class files from the package root directory src/main/java*
47-
````
47+
```shell
4848
javac org/json/*.java
49-
````
49+
```
5050

5151
*Create the jar file in the current directory*
52-
````
52+
```shell
5353
jar cf json-java.jar org/json/*.class
54-
````
54+
```
5555

5656
*Compile a program that uses the jar (see example code below)*
57-
````
57+
```shell
5858
javac -cp .;json-java.jar Test.java (Windows)
5959
javac -cp .:json-java.jar Test.java (Unix Systems)
60-
````
60+
```
6161

6262
*Test file contents*
6363

64-
````
64+
```java
6565
import org.json.JSONObject;
6666
public class Test {
6767
public static void main(String args[]){
6868
JSONObject jo = new JSONObject("{ \"abc\" : \"def\" }");
6969
System.out.println(jo.toString());
7070
}
7171
}
72-
````
72+
```
7373

7474
*Execute the Test file*
75-
````
75+
```shell
7676
java -cp .;json-java.jar Test (Windows)
7777
java -cp .:json-java.jar Test (Unix Systems)
78-
````
78+
```
7979

8080
*Expected output*
8181

82-
````
82+
```json
8383
{"abc":"def"}
84-
````
84+
```
8585

8686

8787
**Tools to build the package and execute the unit tests**
8888

8989
Execute the test suite with Maven:
90-
```
90+
```shell
9191
mvn clean test
9292
```
9393

9494
Execute the test suite with Gradlew:
9595

96-
```
96+
```shell
9797
gradlew clean build test
9898
```
9999

0 commit comments

Comments
 (0)