-
September 14th, 2009, 11:52 PM
#1
WebStart Resources on Filesystem
We're currently using Sun's J2SE 1.5 package. Could someone give suggestions on how to determine the full pathname on the client system that a webstart applications resources (specifically JAR files) reside?. In Java 1.4 this was possible with Class.getResource(String).getPath() (which would return a URL of the type "file:") but this no longer seems to be the case in 1.5.
All ideas and suggestions would be appreciated
-
September 15th, 2009, 04:23 AM
#2
Re: WebStart Resources on Filesystem
We've migrated a Java 1.4 Web Start application to 1.5 without any problems, but I don't recall needing to know where the jars are put by Web Start... the class loader finds resources in the jars, and we put data for local storage into the user home or working directories.
What do you get back from the Class.getResource(String).getPath() call?
Today, most software exists, not to solve a problem, but to interface with other software...
I. O. Angell
Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.
-
September 15th, 2009, 07:54 AM
#3
Re: WebStart Resources on Filesystem
Originally Posted by dlorde
What do you get back from the Class.getResource(String).getPath() call?
It used to return a "file:" type URL that would be pointer to the class/method on the local filesystem, but since the move to 1.5, it now shows an "http:" type URL reference that points back to the origin server. I'm hoping this is just a config change. Something that needs to be added.
-
September 15th, 2009, 08:01 AM
#4
Re: WebStart Resources on Filesystem
Pointer to the JAR / class, I meant.
-
September 15th, 2009, 09:44 AM
#5
Re: WebStart Resources on Filesystem
OK... so what is it you are trying to achieve (why do you need to know the absolute path) ?
If you're not failing every now and again, it's a sign you're not doing anything very innovative...
W. Allen
Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.
-
September 15th, 2009, 10:06 AM
#6
Re: WebStart Resources on Filesystem
Have to spawn a new JVM that needs those webstart classes in its classpath
-
September 15th, 2009, 10:53 AM
#7
Re: WebStart Resources on Filesystem
OIC... on my system, the jars in the web start cache are all renamed by the JWS cache manager, so you'd have to know the JWS jar naming convention...
I don't have an answer to your requirement - as I understand it, you can only access local files via the ServiceManager (see JWS Runtime Client Services), so maybe you can find something there you can use.
Any programming problem can be solved by adding a level of indirection...
Anon.
Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|