4

Forgive me, but I'm very new to this. I have a JNLP file on my work computer, and have access to work at home. I set up my VPN, and copy/pasted the JNLP file to my home computer. However, when I launch it (I upgraded to Java 7 using Windows 7 Home Premium), I get the Unable to Launch Application issue.

It shows Unable to Load Resources and then

com.sun.deploy.net.FailedDownloadException: Unable to load resource: http: //pbs-sj1/pbs/jnlp/tnp/msgr/alt.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)

This is under the wrapped section

java.net.UnknownHostException: pbs-sj1
    at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.<init>(Unknown Source)
    at sun.net.www.http.HttpClient.New(Unknown Source)
    at sun.net.www.http.HttpClient.New(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.connect(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.doRequest(Unknown Source)
    at com.sun.deploy.net.BasicHttpRequest.doGetRequest(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)

I've researched online quite a bit but to be honest, most of it seems to be on a developer level. I'm just trying to get the JNLP file to launch.

Any ideas?

Andrew Thompson
  • 163,965
  • 36
  • 203
  • 405
user3241469
  • 41
  • 1
  • 1
  • 4

1 Answers1

2

The error message is telling you that it can't figure out what host you are trying to reach:

java.net.UnknownHostException: pbs-sj1

Probably the easiest thing to do is to edit your hosts file on the box you have this .jnlp file and add:

127.0.0.1 pbs-sj1

Then make sure your actual .jnlp file location lines up with the rest of the path you specified (/pbs/jnlp/tnp/msgr/alt.jnlp). Here's a howto on editing your hosts file on Win7.

-OR-

Rather than mess with the Hosts file, just make use of a file URL to specify where to find the .JNLP file on Windows--e.g.,

file:///C:/Documents%20and%20Settings/your_login/alt.jnlp

(I'm assuming you know to paste/type either of these addresses into your Java-enabled browser's address bar)

unigeek
  • 2,045
  • 21
  • 22
  • Thank you very much! I'll dig into that. Appreciate the guidance; I'll see if I don't screw things up :-) – user3241469 Jan 29 '14 at 17:54
  • Oooh..Just had another thought. Maybe use a file URI instead of messing with the hosts. I'll see about editing my answer to give this option. – unigeek Jan 30 '14 at 02:29
  • Ok,that gives me a better idea. again, thank you for the advice, but forgive me for my naivety. Are JNLP files dependent on any other internal files or applications or is it a web shortcut to an external web based app? – user3241469 Jan 31 '14 at 16:04
  • My friend uses the JNLP file at work, and wants to use it at home as well. They copied and pasted the JNLP file to the home computer, but receive the errors. I went on their work computer and found the jNLP file via – user3241469 Jan 31 '14 at 16:29
  • file:///C:/Documents%20and%20Settings/cacosta/Recent/ along with what looks like Chrome links associated with the program (dtiwait.lnk and dsgnup.lnk). When moving the JNLP file to the home computer, is it necessary to move other components to get it to work? – user3241469 Jan 31 '14 at 16:29
  • Is the cause of the error I posted because the JNLP file is looking for resources on the work computer? If so, is it possible to copy those resources to the Home computer? I also searched .jar and copied those hits just in case. – user3241469 Jan 31 '14 at 16:31
  • It's been quite a while for me and JNLP. This technology is also known as "Java Web Start". As best I can recall, everything you need is bundled up in the .jnlp file itself, so no further download of other components would be required. I don't remember JNLP giving me a lot of trouble--would think the file URL should put you in business. – unigeek Jan 31 '14 at 17:15
  • I guess it's always possible that the app that you are starting with JNLP is trying to reach some node by the name of pbs-sj1, in which case you will need to configure some machine (localhost, maybe) to respond to that (hosts file easiest) and then line up whatever resources that machine is going to be serving up to make your JNLP app usable. Hope it helps! – unigeek Jan 31 '14 at 17:19
  • As a kind of sanity test, you might see if you are able to run the SwingSet demo at http://download.java.net/javadesktop/swingset3/SwingSet3.jnlp – unigeek Jan 31 '14 at 17:31
  • Sorry about the long delay; was sick and had other things come up. Well I ran the SwingSet and that worked fine. But this is through their work computer. I'll try at their home. I just can't figure it out. If the jnlp should run by itself, then I thought a simple copy paste would allow it to run on their home computer. – user3241469 Feb 08 '14 at 15:19
  • when you mention configuring the local machine to respond and then line up the resources, how is that achieved? Hate to bother, just frustrating that i can't get this simple jnlp to run other than their work computer.... :-/ – user3241469 Feb 08 '14 at 15:20
  • Not sure if this helps regarding the resources MediaPlus Circulation Digitial Technology International DTI Circulation Management DTI CM – user3241469 Feb 08 '14 at 15:31
  • So, if you are able to run the SwingSet demo, that's a good sign b/c at least we know the client has Java installed. From the look of your jnlp.xml, looks like there's an expectation for Java5 and also it's going to refer to another jar at /pbs/pbs/SaturnV.jar. Life with JNLP would be much easier w/o such external dependencies--i.e., no need to get all the components lined up exactly right on the machines. If you can't repackage the app to make it self contained, you will need to figure out just where to put everything and the host file idea may be useful for that. – unigeek Feb 08 '14 at 16:26
  • Well, kind of hard to look at that xml in the comments. Maybe the app is already self contained in the SaturnV.jar. I'm not fully clear here, but that path to the SaturnV.jar looks pretty important--"/pbs/pbs/SaturnV.jar" of course that looks like a unix path to me, so I'm not sure how to line that up on a Win7 box, unless you want to set up a linux VM in VirtualBox, or something.. Might be easier to tweak the href value the jnlp.xml to point to the location of the SaturnV.jar on your windows box. Good luck! – unigeek Feb 08 '14 at 16:39
  • Yeah after looking deeper I saw the Saturn v connection, something I didn't bring over to the other computer. Obviously that may important. Lol! I think I have a much better idea of what I need to do. I cannot thank you enough for all of your help and patience. Truly, you've helped me a lot. Have a great week – user3241469 Feb 10 '14 at 14:40