user4500950
user4500950

Reputation:

Problems running java webstart jnlp file

Sorry for the long post but I am trying to be thorough in order to solve this issue. Others have asked this question but I believe I followed all of the instructions found here, and read all of the other questions already asked. Below are the jnlp file contents, and html file (without real address), followed by the exceptions and wrapper exceptions (I did get the latest version of java and verified it works). I am relatively new working JNLP and webstart so I'm not exactly sure how everything fits together yet.

JNLP contents:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<jnlp codebase = "http://example.com/index.html" href="launch.jnlp" spec="1.0+">
    <information>
        <title>Online Time Clock</title>
        <vendor>Kevin</vendor>
        <homepage href="www.google.com"/>
        <description>Online Time Clock</description>
        <description kind="short">Online Time Clock</description>
    </information>
    <update check="always"/>
    <resources>
        <j2se version="1.8+"/>
        <jar eager="true" href="Online_Time_Clock.jar" main="true"/>
    </resources>
    <application-desc main-class="online.time.clock.forms.form">
    </application-desc>
</jnlp>

HTML contents:

 head>
<meta charset="utf-8">
<title>Homepage</title>
<style type="text/css">
@import url("indexcss.css");
#Container2 {
    font-family: Baskerville, "Palatino Linotype", Palatino, "Century Schoolbook L", "Times New Roman", serif;
    background-color: #40B169;
    background-image: url(images.jpg);
    background-repeat: repeat;
    letter-spacing: normal;
    text-align: center;
    vertical-align: super;
    word-spacing: normal;
    height: auto;
    width: auto;
    list-style-position: inside;
    list-style-image: none;
    list-style-type: circle;
}
body {
    background-color: #E41114;
    background-image: url(images.jpg);
    background-repeat: repeat;
}
</style>
</head>
<script src="http://java.com/js/deployJava.js"></script>
        <script>
            deployJava.createWebStartLaunchButton("launch.jnlp")
        </script>
<nav>
    <ul>
      <li><a href="#">Home</a></li>
      <li><a href="#">About</a></li>
      <li><a href="#">Work</a></li>
      <li><a href="#">Places</a>
            <ul>
                <li><a href="#">Someplace</a></li>
                <li><a <a href="launch.jnlp">Launch the application</a></li>
            </ul>
        </li>
      <li><a href="#">Contact</a></li>
    </ul>
</nav>

Exceptions:

com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://50.255.134.177/index.html/launch.jnlp
    at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
    at com.sun.deploy.net.DownloadEngine.downloadResource(Unknown Source)
    at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
    at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
    at com.sun.javaws.Launcher.updateFinalLaunchDesc(Unknown Source)
    at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    at com.sun.javaws.Launcher.launch(Unknown Source)
    at com.sun.javaws.Main.launchApp(Unknown Source)
    at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
    at com.sun.javaws.Main.access$000(Unknown Source)
    at com.sun.javaws.Main$1.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Wrapped exception:

java.io.FileNotFoundException: http://50.255.134.177/index.html/launch.jnlp
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.access$200(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection$9.run(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection$9.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessController.doPrivileged(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at com.sun.deploy.net.HttpUtils.followRedirects(Unknown Source)
    at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
    at com.sun.deploy.net.BasicHttpRequest.doGetRequestEX(Unknown Source)
    at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
    at com.sun.deploy.net.DownloadEngine.downloadResource(Unknown Source)
    at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
    at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
    at com.sun.javaws.Launcher.updateFinalLaunchDesc(Unknown Source)
    at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    at com.sun.javaws.Launcher.launch(Unknown Source)
    at com.sun.javaws.Main.launchApp(Unknown Source)
    at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
    at com.sun.javaws.Main.access$000(Unknown Source)
    at com.sun.javaws.Main$1.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Upvotes: 0

Views: 1193

Answers (1)

Saeid Nourian
Saeid Nourian

Reputation: 1778

In your jnlp file, the codebase is "http://example.com/index.html" but codebase must be a directory, not a file. Instead you should have something like this:

<jnlp codebase = "http://example.com/" href="launch.jnlp" spec="1.0+">

The above assumes that your jnlp is here: http://example.com/launch.jnlp

Upvotes: 1

Related Questions