Skip to content

Commit

Permalink
add java hello world example
Browse files Browse the repository at this point in the history
  • Loading branch information
vintagewang committed Jun 10, 2012
1 parent 80aedb6 commit 0a7c9de
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 5 deletions.
7 changes: 2 additions & 5 deletions bin/jwrapper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<jvmtype>client</jvmtype>

<mainclass>Hello</mainclass>
<mainclass>com.github.vintage.wang.jwrapper.sample.HelloWorld</mainclass>

<properties>
<java.ext.dirs>${cpd}/../lib</java.ext.dirs>
Expand All @@ -17,10 +17,7 @@
</properties>

<classpaths>
<path>cp1</path>
<path>cp2</path>
<path>${cwd}/../lib</path>
<jars>cp3</jars>
<path>${cpd}/../samples/Hello/target/Hello-1.0-SNAPSHOT.jar</path>
</classpaths>

<options>
Expand Down
25 changes: 25 additions & 0 deletions samples/Hello/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<project xmlns="http:https://maven.apache.org/POM/4.0.0" xmlns:xsi="http:https://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http:https://maven.apache.org/POM/4.0.0 http:https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.github.vintage.wang.jwrapper</groupId>
<artifactId>Hello</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Hello</name>
<url>http:https://maven.apache.org</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.github.vintage.wang.jwrapper.sample;

public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World!");
System.exit(0);
}
}

0 comments on commit 0a7c9de

Please sign in to comment.