Download a license.bea file in webstart cache

Hi All,

In my application i have a requirement where i need to set Bea.Home to the license.bea path in the system properties. I have managed to download this license file to the webstart download directory by placing it within a .jar file.The application is unable to read it from the jar.

Please let me know :

1. How can i extract the license file to the download directory automatically.

2. Or is there any way by which i can download the license file directly throug webstart( insted of downloading it as a jar )

Thanks & regards,

Ravi

[586 byte] By [Raj-ka] at [2007-11-27 6:51:30]
# 1
hi!if can keep that in your web-site, and then call it from your web-application. why do you need to download?regardsAniruddha
Aniruddha-Herea at 2007-7-12 18:25:56 > top of Java-index,Desktop,Deploying...
# 2

HI Aniruddha,

We are using a web application with t3s: protocol . While loading the application checks for the Bea.Home properties and picks the license.bea file from the mentioned path. If it does not find it it fails to load :

Missing license file for: WebLogic Platform 8.1

The path is dependent on the client machine where it will be launched. So it has to be down loaded to a specific path and the path has to be set for bea.home.

Raj-ka at 2007-7-12 18:25:56 > top of Java-index,Desktop,Deploying...
# 3
hi!i am just guessing, have you tried this ?<resources><j2se version="1.x+" /><jar href="your.jar" /><jar href="license.bea" /> </resources>
Aniruddha-Herea at 2007-7-12 18:25:56 > top of Java-index,Desktop,Deploying...
# 4

https://java.sun.com/products/javawebstart/1.0.1/javadoc/javax/jnlp/ExtensionInstallerService.html

It seems like the functionality for this is supplied

by the ExtensionInstallerService.

Normally it is used to install natives and such,

but is well suited to what you need to do.

An installer is run once before the application

is invoked, and again when it is uninstalled

(with different arguments).

The process might be..

1) get an URL to the license file

2) Ask the user where they would like to put

the license file.

3) Download the bytes of the license file, and

write them to the local file system.

4) Set the property as appropriate.

5) Inform the JNLP client that

installSucceeded()

[ 6) The application should appear on-screen

after 5), with the property set to the place where

the license file is located. ]

Notes:

- Parts 1 thru 4 are all J2SE core. You will need

to code that part yourself.

- Part 2 (ask user) is optional, you might simply

put the license file in a sub-directory of user.home.

The best sub-directory for it, would be based on

(for example) your package names - the final

path being something like

{$user.home}/com/ourcompany/thecode/

This helps avoid overwiting other files of

the same name (or having your file similarly

overwritten).

- Trying to find things in the web start cache is

a lost cause. The location may change at the

next Java release, or at the user's whim. (My

system's cache location has changed twice today -

simply because I chose to change it.)

AndrewThompson64a at 2007-7-12 18:25:56 > top of Java-index,Desktop,Deploying...