+ All Categories
Home > Documents > How to Make Java Web Start Application Using Netbeans.

How to Make Java Web Start Application Using Netbeans.

Date post: 23-Jan-2017
Category:
Upload: vominh
View: 227 times
Download: 2 times
Share this document with a friend
6
How to Make Java Web Start Application Using Netbeans. Once you make a graphical Java application, you’ll want to show it off to the world! Luckily for us, Netbeans does most of the hard work for us. Be thankful. Step 1: Make your project ready for Web Application Deployment. Click Project Properties under the File menu. Go to Application>Web Start and click the “Enable Web Start” check box and select “Web Application Deployment” from the drop down menu.
Transcript
Page 1: How to Make Java Web Start Application Using Netbeans.

How to Make Java Web Start Application Using Netbeans.

Once you make a graphical Java application, you’ll want to show it off to the world! Luckily for us, Netbeans does most of the hard work for us. Be thankful. Step 1: Make your project ready for Web Application Deployment. • Click Project Properties under the File menu.

• Go to Application>Web Start and click the “Enable Web Start” check box and select

“Web Application Deployment” from the drop down menu.

Page 2: How to Make Java Web Start Application Using Netbeans.

Step 2: Make your .jar file • Click Run> Build Main Project and create a jar file.

Step 3: Edit your distribution files Go to your project/dist

Page 3: How to Make Java Web Start Application Using Netbeans.

Edit your launch.jnlp to look similar to this:

<?xml version="1.0" encoding="UTF-8"?> <jnlp codebase="http://webpages.uncc.edu/~acenglis" href="launch.jnlp" spec="1.0+"> <information> <title>MyGUI</title> <vendor>Adam English</vendor> <homepage href="www.google.com"/> <description>MyGUIapp</description> <description kind="short">Test to show students</description> </information> <resources> <j2se version="1.5+"/> <jar eager="true" href="MyGUIapp.jar" main="true"/> </resources> <application-desc main-class="Main">

</application-desc> </jnlp>

You want to edit everything that’s highlighted in yellow to your web path, your

information, your .jar and your Main. Edit your launch.html to look similar to this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Test page for launching the application via JNLP</title> </head>

Page 4: How to Make Java Web Start Application Using Netbeans.

<body> <h3>Test page for launching the application via JNLP</h3> <a href="launch.jnlp">Launch the application</a> <!-- Or use the following script element to launch with the Deployment Toolkit --> <!-- Open the deployJava.js script to view its documentation --> <!-- <script src="http://java.com/js/deployJava.js"></script> <script> var url="http://[fill in your URL]/launch.jnlp" deployJava.createWebStartLaunchButton(url, "1.6") </script> --> </body> </html>

You probably don’t have to mess with this. If you feel adventurous, you can play with the

html of your web page. Step 4: Setting up your web page. For those of you who do not have a web page, the University offers everyone a web page

FOR FREE! Here is some information on your H: drive and your web page http://www.labs.uncc.edu/basics/novell.html#netstorage You will want to use https://webf.uncc.edu to access your H drive remotely if you’re not

on campus. Now add everything in your dist file into public_html on your H: drive

Page 5: How to Make Java Web Start Application Using Netbeans.

Once you add your files you can go to your launch.html page and run your Java Web

Start Application! Note: you may have to save the launch.jnlp to your hard drive to run it if your browser

takes you directly to the launch.jnlp xml.

Page 6: How to Make Java Web Start Application Using Netbeans.

Recommended