Getting: javax.jnlp.UnavailableServiceException: uninitialized

Hi community!

I have a Problem with my WebStart Application:

When i make this part of code:

try{

PersistenceService ps;

BasicService bs;

ps = (PersistenceService)ServiceManager.lookup("javax.jnlp.PersistenceService");

bs = (BasicService)ServiceManager.lookup("javax.jnlp.BasicService");

System.out.println(bs.getCodeBase());

}catch (UnavailableServiceException e){

// TODO Auto-generated catch block

e.printStackTrace();

}

At the line ps = ....

i get the Exception javax.jnlp.UnavailableServiceException: uninitialized

Why?

Thx a lot

[891 byte] By [Deficiency1984a] at [2007-11-27 1:28:31]
# 1
When i make: ServiceManager.getServiceNames();i get null back!Must i init the Services? If yes, where?
Deficiency1984a at 2007-7-12 0:26:32 > top of Java-index,Desktop,Deploying...
# 2

I expect this is happening because the application

is being launched by java, rather than javaws.

javaws initialises the web start services for us.

Creating an ant build file that will do all the necessary

parts (compile, jar, launch, uninstall..) is quite handy

when developing web start applications.

AndrewThompson64a at 2007-7-12 0:26:32 > top of Java-index,Desktop,Deploying...
# 3
I realy launch it in Java WebStart.I start the Tomcat server and in then load the JNLP File via Browser, then the JWS start and load my app!I have an ANT-Build script to sign the jars and build it.Thx for your replyFlorian
Deficiency1984a at 2007-7-12 0:26:32 > top of Java-index,Desktop,Deploying...
# 4
I am at a loss to explain that behaviour.Do my examples work for you off your server?(You might need to change the codebase, butthat is about it.)
AndrewThompson64a at 2007-7-12 0:26:32 > top of Java-index,Desktop,Deploying...