Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JNLP Problems: FileOpenService uninitialized

173 views
Skip to first unread message

Novice

unread,
Jan 27, 2012, 2:48:12 PM1/27/12
to

I'm getting an UnavailableServiceException with the message"uninitialized"
when I try to invoke the JNLP FileOpenService.

At the suggestion of the Java Tutorial section on File Choosers, I'm trying
to play with the JNLP file choosers for an application that will run in
Java Web Start. I'm using Eclipse 3.7 and have the jnlp.jar as an external
jar accessible to the project. The code compiles fine but the exception
occurs when I execute this code:

try {
fos = (FileOpenService)ServiceManager.lookup
("javax.jnlp.FileOpenService");
} catch (UnavailableServiceException exc) {
System.err.println("FileOpenService failed. Message: " +
exc.getMessage());
exc.printStackTrace();
}

As far as I can tell from the JNLP guides I've found, there's nothing wrong
with the code itself. I've googled and found other people who have asked
about the same problem but there are no solutions posted for any of them.

I've never worked with JNLP so I'm guessing that I haven't got something
set up correctly but I'm darned if I can figure out what I've done wrong.

Does anyone with JNLP/JWS experience have any suggestions on what I can do
to resolve this problem?


--
Novice

Jeff Higgins

unread,
Jan 27, 2012, 4:35:44 PM1/27/12
to
On 01/27/2012 02:48 PM, Novice wrote:
> I'm getting an UnavailableServiceException with the message"uninitialized"
> when I try to invoke the JNLP FileOpenService.
>
> At the suggestion of the Java Tutorial section on File Choosers, I'm trying
> to play with the JNLP file choosers for an application that will run in
> Java Web Start. I'm using Eclipse 3.7 and have the jnlp.jar as an external
> jar accessible to the project. The code compiles fine but the exception
> occurs when I execute this code:

<http://rubenlaguna.com/wp/2008/08/07/java-webstart-unavailableserviceexception/index.html>

Jeff Higgins

unread,
Jan 27, 2012, 5:22:02 PM1/27/12
to
On 01/27/2012 04:35 PM, Jeff Higgins wrote:
> On 01/27/2012 02:48 PM, Novice wrote:
>> I'm getting an UnavailableServiceException with the
>> message"uninitialized"
>> when I try to invoke the JNLP FileOpenService.
>>
>> At the suggestion of the Java Tutorial section on File Choosers, I'm
>> trying
>> to play with the JNLP file choosers for an application that will run in
>> Java Web Start. I'm using Eclipse 3.7 and have the jnlp.jar as an
>> external
>> jar accessible to the project. The code compiles fine but the exception
>> occurs when I execute this code:
>
> <http://rubenlaguna.com/wp/2008/08/07/java-webstart-unavailableserviceexception/index.html>
<http://netbeans.org/kb/docs/java/javase-jws.html>
<http://webstart.sourceforge.net/>

Novice

unread,
Jan 28, 2012, 10:03:53 AM1/28/12
to
Jeff Higgins <je...@invalid.invalid> wrote in
news:jfv7g7$bbv$1...@dont-email.me:
I really appreciate your help with this Jeff. You must be better at
googling than I am ;-)

Maybe I'm having a stupid day but I can't figure out for the life of me
how to actually install this plug-in in Eclipse. I've spent the last hour
searching Eclipse help screens and googling for some insight into how to
install WS4E but I keep coming up with fragmentary information that makes
a lot of unwarranted assumptions about what I already know.

I downloaded WS4E from Sourceforge easily enough and unzipped it into a
directory. But that's where I'm stuck. According to a website I found,
http://www.venukb.com/2006/08/20/install-eclipse-plugins-the-easy-
way/,the normal thing to do is to copy the plugins and features
directories from the downloaded directory to their counterparts in
Eclipse. The downloaded directory only has a plugins directory but I
copied that in my Eclipse plugins directory and restarted Eclipse but I
can't see one iota of difference in my Eclipse. I don't see any "Start
JWS" option anywhere (although I may simply have failed to look in the
right place because they don't tell you where to expect things to change)
and my program still crashes on the "uninitialized" error.

I tried using the Update Manager approach but I don't see WS4E anywhere.
Again, though, they don't specify what update site to search to find it.
I've tried http://sourceforge.net and http://webstart.sourceforge.net but
I just get a "could not find" error for both.

I tried using the "easy" method advocated at the link I cited but I still
see nothing that looks like a Java Web Start option anywhere.

Any suggestions you or anyone could offer here would be greatly
appreciated. I fully expect that installing this plugin would solve my
problem with the FileOpenService initialization error; I just can't
figure out HOW to install it.

--
Novice

Jeff Higgins

unread,
Jan 28, 2012, 11:56:54 AM1/28/12
to
On 01/28/2012 10:03 AM, Novice wrote:

> I really appreciate your help with this Jeff. You must be better at
> googling than I am ;-)

That a web search is cheap and easy is the whole point of most of my
posts.:)
...
> I downloaded WS4E from Sourceforge easily enough and unzipped it into a
> directory. But that's where I'm stuck.

I extracted the zip such that my
{eclipse-home}/plugins/net.sourceforge.webstart_1.2.1

{eclipse-home}/dropins/net.sourceforge.webstart_1.2.1 would probably
work just as well - and is now recommended.

Restart Eclipse.
Now when I go to File>Export>Other I see Webstart.

Novice

unread,
Feb 1, 2012, 1:19:38 PM2/1/12
to
Jeff Higgins <je...@invalid.invalid> wrote in news:jg18qc$ht7$1@dont-
email.me:
Sorry for the delay in getting back to you; I've been fighting other fires.
;-)

Your last line was the key: I hadn't seen anything in the documentation
about how to actually FIND Webstart when it is actually installed. It turns
out that whatever I did worked just fine; I simply went to
File/Export/Other and Webstart was right there.

The only documentation I could find said how you'd find it in NetBeans,
which I'm not using.

With a bit of luck, the Webstart documentation will tell me the rest of
what I need to know to work with this tool.

Ironically, I posted to Oracle's JNLP forum several days ago about my
"uninitialized" problem and finally got a reply yesterday. The responder
basically said you can't test your Java Web Start stuff in Eclipse!
Apparently, he didn't know about the Webstart plugin....

--
Novice

Jeff Higgins

unread,
Feb 1, 2012, 5:17:56 PM2/1/12
to
Did you read the tutorial?
<http://webstart.sourceforge.net/>

>
> Ironically, I posted to Oracle's JNLP forum several days ago about my
> "uninitialized" problem and finally got a reply yesterday. The responder
> basically said you can't test your Java Web Start stuff in Eclipse!
> Apparently, he didn't know about the Webstart plugin....
>
I don't know that you can. I've not tried the tool.


Jeff Higgins

unread,
Feb 1, 2012, 8:03:01 PM2/1/12
to
On 02/01/2012 05:17 PM, Jeff Higgins wrote:
>> Ironically, I posted to Oracle's JNLP forum several days ago about my
>> "uninitialized" problem and finally got a reply yesterday. The responder
>> basically said you can't test your Java Web Start stuff in Eclipse!
>> Apparently, he didn't know about the Webstart plugin....
>>
> I don't know that you can. I've not tried the tool.
>
I've only made a couple half-hearted jabs at JWS and haven't attempted
to use any of the services. I have read a good bit of documentation.

Concerning another thread where class loaders were discussed, the source
file for com.sun.javaws.Main.java makes interesting reading.



Jeff Higgins

unread,
Feb 3, 2012, 3:31:03 PM2/3/12
to
On 02/01/2012 01:19 PM, Novice wrote:
snip
snip
>
> Ironically, I posted to Oracle's JNLP forum several days ago about my
> "uninitialized" problem and finally got a reply yesterday. The responder
> basically said you can't test your Java Web Start stuff in Eclipse!
> Apparently, he didn't know about the Webstart plugin....
>
A later post provides additional insight and a wonderful link.
The Oracle forum post is here:
<https://forums.oracle.com/forums/message.jspa?messageID=10121675#10121675>
0 new messages