Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,20 @@
# hello-world-java

Ein einfaches Java Hello-World-Projekt. Verwaltet von Junie.

## Ausführen / Run

Ohne Build-Tool können Sie das Programm direkt mit `javac` und `java` kompilieren und starten:

- Kompilieren:
- Windows / macOS / Linux:
- In das Projektverzeichnis wechseln und ausführen:
- `javac -d out src/Main.java`
- Starten:
- `java -cp out Main`

Erwartete Ausgabe:

```
Hello and welcome!
```
8 changes: 8 additions & 0 deletions install_and_run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -e
# Compile Java sources
echo "Compiling sources..."
javac -d out src/Main.java

echo "Running application..."
java -cp out Main
Binary file added out/Main.class
Binary file not shown.
8 changes: 1 addition & 7 deletions src/Main.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
public class Main {
public static void main(String[] args) {
//TIP Press <shortcut actionId="ShowIntentionActions"/> with your caret at the highlighted text
// to see how IntelliJ IDEA suggests fixing it.
System.out.print("Hello and welcome!");


System.out.println("Hello and welcome!");
}
}