GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - macagua/example.java.helloworld: "Hello World" Example for Java

BranchesTags
Open more actions menu

Latest commit

 

History

7 Commits
7 Commits

Folders and files

NameName
Last commit message
Last commit date
HelloWorld
HelloWorld
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
Manifest.txt
Manifest.txt
 
 
README.rst
README.rst
 
 

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

  • java - How to run a JAR file - Stack Overflow.
  • Setting an Application's Entry Point (The Java™ Tutorials > Deployment > Packaging Programs in JAR Files).

About

"Hello World" Example for Java

Topics

hello-worldhelloworldjava

Resources

Readme
GPL-2.0 license
Activity

Stars

32 stars

Watchers

3 watching

Forks

279 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.