Skip to content

Commit 930989a

Browse files
authored
feat: java (#23)
1 parent 48e2144 commit 930989a

4 files changed

Lines changed: 44 additions & 0 deletions

File tree

.github/workflows/java.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Java
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- feature/**
8+
- fix/**
9+
10+
paths:
11+
- '.github/workflows/java.yaml'
12+
- 'hello-world/java/**'
13+
14+
jobs:
15+
build:
16+
name: Test
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v2
22+
23+
- name: Test
24+
run: make java

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ This is an over-engineered "[Hello, World!](https://en.wikipedia.org/wiki/%22Hel
1313
| [Dockerfile](hello-world/dockerfile) | [![Dockerfile](https://github.com/jeliasson/hello-world/actions/workflows/dockerfile.yaml/badge.svg?branch=main)](https://github.com/jeliasson/hello-world/actions/workflows/dockerfile.yaml) |
1414
| [Go](hello-world/go) | [![Go](https://github.com/jeliasson/hello-world/actions/workflows/go.yaml/badge.svg?branch=main)](https://github.com/jeliasson/hello-world/actions/workflows/go.yaml) |
1515
| [HTML](hello-world/html) | [![HTML](https://github.com/jeliasson/hello-world/actions/workflows/html.yaml/badge.svg?branch=main)](https://github.com/jeliasson/hello-world/actions/workflows/html.yaml) |
16+
| [Java](hello-world/java) | [![Java](https://github.com/jeliasson/hello-world/actions/workflows/java.yaml/badge.svg?branch=main)](https://github.com/jeliasson/hello-world/actions/workflows/java.yaml) |
1617
| [JavaScript](hello-world/javascript) | [![JavaScript](https://github.com/jeliasson/hello-world/actions/workflows/javascript.yaml/badge.svg?branch=main)](https://github.com/jeliasson/hello-world/actions/workflows/javascript.yaml) |
1718
| [PHP](hello-world/php) | [![PHP](https://github.com/jeliasson/hello-world/actions/workflows/php.yaml/badge.svg?branch=main)](https://github.com/jeliasson/hello-world/actions/workflows/php.yaml) |
1819
| [Python](hello-world/python) | [![Python](https://github.com/jeliasson/hello-world/actions/workflows/python.yaml/badge.svg?branch=main)](https://github.com/jeliasson/hello-world/actions/workflows/python.yaml) |

hello-world/java/HelloWorld.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
public class HelloWorld {
2+
public static void main(String[] args) {
3+
System.out.println("Hello, World!");
4+
}
5+
}

hello-world/java/Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.SILENT:
2+
3+
all: build prepare run clean
4+
5+
build:
6+
javac HelloWorld.java
7+
8+
prepare:
9+
10+
run:
11+
java HelloWorld
12+
13+
clean:
14+
rm -f *.class

0 commit comments

Comments
 (0)