Skip to content

BestSolution-at/example.java.helloworld

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

example.java.helloworld

This is "Hello World" Example for Java.

The structure helloworld package is like this:

example.java.helloworld/
|-- helloworld
|   `-- Main.java
|-- LICENSE
|-- Manifest.txt
`-- README.md

Compile class

For compile the main class for package, execute the follow command:

javac helloworld/Main.java

This generate the Main.class file into helloworld directory.

Run class

For run the main class for package, execute the follow command:

java -cp . helloworld.Main

This show the Hello world message.

Create a JAR file

For pack the main class for package as a JAR file, execute the follow command:

jar cfme Main.jar Manifest.txt helloworld.Main helloworld/Main.class

Run a JAR file

For run the JAR file packed, execute the follow command:

java -jar Main.jar

This show the Hello world message.

Reference

About

"Hello World" Example for Java

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%