I am building an applicaton in Java that will have some updates over time. This means that the client will have to download a new .jar and use it when available.
I read about jws (java web start) and it works fine. But the problem is that my application uses a protocol I created, and it will just be able to connect to my server. It may not have connectin to internet and I should not be able install a web server on that server.
So is there a way I can use JNLP inside my own proto? Or I will have to do it all by myself?? Making it download a new jar and deleting the old one?
I am building an applicaton in Java that will have some updates over time.
Share
If your application is based on Web Start, it will automatically perform the updates. However, this only works for known protocols, such as HTTP (and maybe FTP, but never tried that). I don’t think you will get Web Start working with your own protocol, but you could try to do it with a custom URLConnectionFactory and roll your own connection handler for your protocol. See
java.net.URL.setURLStreamHandlerFactory(URLStreamHandlerFactory)Anyway, I’d go with a custom update implementation in this case, as you requirements seem to be very specific. Since your app doesn’t seem to be based on an existing framework with update mechanisms (e.g. Eclipse RCP with P2 manager or NetBeans or Java Plugin Framework or Maven …).