diff --git a/jws/.gitignore b/jws/.gitignore new file mode 100644 index 0000000000..6346853947 --- /dev/null +++ b/jws/.gitignore @@ -0,0 +1,7 @@ +/target/ +.classpath +.project +.settings +/.settings/ +/settings/ +.tern-project diff --git a/jws/java-core-samples-lib/jardiff.jar b/jws/java-core-samples-lib/jardiff.jar new file mode 100644 index 0000000000..08b5bb61ab Binary files /dev/null and b/jws/java-core-samples-lib/jardiff.jar differ diff --git a/jws/java-core-samples-lib/jnlp-servlet.jar b/jws/java-core-samples-lib/jnlp-servlet.jar new file mode 100644 index 0000000000..c27167c647 Binary files /dev/null and b/jws/java-core-samples-lib/jnlp-servlet.jar differ diff --git a/jws/pom.xml b/jws/pom.xml new file mode 100644 index 0000000000..dea98fb41a --- /dev/null +++ b/jws/pom.xml @@ -0,0 +1,86 @@ + + + 4.0.0 + com.example + jws + war + 0.0.1-SNAPSHOT + + jws-example + + + 3.0.2 + 3.0.0 + 7.0 + 7.0 + + + + + javax.jnlp + jnlp-servlet + ${jnlp-servlet.version} + system + ${project.basedir}/java-core-samples-lib/jnlp-servlet.jar + + + javax.jnlp + jardiff + ${jardiff.version} + system + ${project.basedir}/java-core-samples-lib/jardiff.jar + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + ${maven-jar-plugin.version} + + + compile + + jar + + + + + com.example.Hello + + + ${project.basedir}/target/jws + + + + + + + org.apache.maven.plugins + maven-war-plugin + ${maven-war-plugin.version} + + + package + + + + + + ${project.basedir}/java-core-samples-lib/ + + **/*.jar + + WEB-INF/lib + + + + + + ${project.artifactId} + + + diff --git a/jws/src/main/java/com/example/Hello.java b/jws/src/main/java/com/example/Hello.java new file mode 100644 index 0000000000..3479277ace --- /dev/null +++ b/jws/src/main/java/com/example/Hello.java @@ -0,0 +1,15 @@ +package com.example; + +import javax.swing.*; + +public class Hello { + public static void main(String[] args) { + JFrame f = new JFrame("main"); + f.setSize(200, 100); + f.setLocationRelativeTo(null); + f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + JLabel label = new JLabel("Hello, world!"); + f.add(label); + f.setVisible(true); + } +} diff --git a/jws/src/main/webapp/WEB-INF/web.xml b/jws/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..18f29ddd12 --- /dev/null +++ b/jws/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,24 @@ + + + Java Web Start + JNLP Example for Java Web Start Article + + + JnlpDownloadServlet + jnlp.sample.servlet.JnlpDownloadServlet + + + JnlpDownloadServlet + *.jar + + + JnlpDownloadServlet + *.jnlp + + + + index.html + + diff --git a/jws/src/main/webapp/hello.jnlp b/jws/src/main/webapp/hello.jnlp new file mode 100644 index 0000000000..950c0d716f --- /dev/null +++ b/jws/src/main/webapp/hello.jnlp @@ -0,0 +1,12 @@ + + + + Hello + Example + + + + + + + diff --git a/jws/src/main/webapp/index.html b/jws/src/main/webapp/index.html new file mode 100644 index 0000000000..212607b850 --- /dev/null +++ b/jws/src/main/webapp/index.html @@ -0,0 +1,10 @@ + + +Hello World JNLP + + +

+ Launch the example +

+ + diff --git a/pom.xml b/pom.xml index c12562551f..4e55d4686d 100644 --- a/pom.xml +++ b/pom.xml @@ -74,6 +74,7 @@ json jsoup junit5 + jws kotlin