Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lahcenezzara/java-explorer
Java Explorer
https://github.com/lahcenezzara/java-explorer
beginner-friendly hello-world java java-basics java-programming java-se-17
Last synced: 4 days ago
JSON representation
Java Explorer
- Host: GitHub
- URL: https://github.com/lahcenezzara/java-explorer
- Owner: LahcenEzzara
- Created: 2024-10-29T11:31:19.000Z (16 days ago)
- Default Branch: main
- Last Pushed: 2024-10-29T11:48:00.000Z (16 days ago)
- Last Synced: 2024-10-29T13:30:15.513Z (16 days ago)
- Topics: beginner-friendly, hello-world, java, java-basics, java-programming, java-se-17
- Language: Java
- Homepage: https://lahcenezzara.github.io/java-explorer/
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Java Explorer
This repository contains a simple Java program that prints "Hello World" to the console. It demonstrates a basic setup for running Java code locally using Java SE 17.
## Project Structure
```
java-explorer
├── HelloWorld.java # Java source file
└── HelloWorld.class # Compiled Java bytecode file
```## Getting Started
### Prerequisites
- **Java SE 17**: Make sure Java SE 17 is installed on your system. You can check your version by running:
```sh
java -version
```### Running the Program
1. **Compile the Java file**: In PowerShell or your preferred command line, navigate to the directory containing `HelloWorld.java`, then run:
```sh
javac HelloWorld.java
```
This will generate a `HelloWorld.class` file.2. **Run the compiled program**: Execute the program with:
```sh
java HelloWorld
```
You should see the following output:
```
Hello World
```### Example
PowerShell 7.4.6:
```sh
PS C:\Home\DEV\Java-SE-17\java-explorer> javac HelloWorld.java
PS C:\Home\DEV\Java-SE-17\java-explorer> java HelloWorld
Hello World
PS C:\Home\DEV\Java-SE-17\java-explorer>
```## Code
```java
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
```## License
This project is licensed under the MIT License.