diff --git a/README.md b/README.md new file mode 100644 index 0000000..4370b60 --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +HelloWorld +========== + +A simple Java application that can be compiled into a .jar file using Maven. + +To build +-------- + mvn clean package + +To run +------ + java -cp target/helloworld-1.0.jar com.coveros.demo.helloworld.HelloWorld diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..f9f55a0 --- /dev/null +++ b/pom.xml @@ -0,0 +1,38 @@ + + + 4.0.0 + + com.coveros.demo + helloworld + 1.1 + jar + + Hello World + The most basic of Java programs. + https://www.coveros.com/ + 2018 + + + UTF-8 + UTF-8 + 1.8 + + 3.8.1 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven.compiler.plugin.version} + + ${jdk.version} + ${jdk.version} + + + + + \ No newline at end of file diff --git a/src/main/java/com/coveros/demo/helloworld/HelloWorld.java b/src/main/java/com/coveros/demo/helloworld/HelloWorld.java new file mode 100644 index 0000000..ae297a9 --- /dev/null +++ b/src/main/java/com/coveros/demo/helloworld/HelloWorld.java @@ -0,0 +1,15 @@ +package com.coveros.demo.helloworld; + +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; + +public class HelloWorld { + + public static void main(final String[] args) { + final DateTimeFormatter dtf = DateTimeFormatter.ofPattern("h:mm:ss a 'on' MMMM d, yyyy'.'"); + final LocalDateTime now = LocalDateTime.now(); + + System.out.println("Hello, World! The current time is " + dtf.format(now)); + } + +} diff --git a/test b/test deleted file mode 100644 index a6525f9..0000000 --- a/test +++ /dev/null @@ -1 +0,0 @@ -this is test file for java project