The Source for Java Technology Collaboration

Home » java.net Forums » Mobile & Embedded » Blu-ray Disc Java

Thread: Multiple JARs, problem with classpath updating

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 3 - Last Post: Nov 19, 2008 11:36 PM by: ljubisap Threads: [ Previous | Next ]
ljubisap

Posts: 4
Multiple JARs, problem with classpath updating
Posted: Nov 19, 2008 5:08 AM
  Click to reply to this thread Reply

Hello,

I'm trying to download additional JAR from the Internet and then to update classpath (somehow) of the Xlet and JAR which are on the disc, so they can use additional classes from downloaded JAR.

Downloaded JAR doesn't have any Xlets. It contains only some additional classes I want to use.

My problem is how can I update classpath and use additional classes from downloaded JAR in JAR on the disc. Is this possible to do ?

I can use two separate JARs when they are both placed on the disc. This isn't a problem, but I need to download second JAR and then to use it. So location of the downloaded JAR will be in for example, in the root of the VFS.

I tried to load JAR from this location directly but I get some security exceptions. Both of JARs are signed on the same way so the problem shouldn't be related to wrong certificate etc. Maybe this is possible and I didn't do it correctly.

Any feedback is welcome.

Regards,
Ljubisa

jeffkinzer

Posts: 16
Re: Multiple JARs, problem with classpath updating
Posted: Nov 19, 2008 9:12 AM   in response to: ljubisap
  Click to reply to this thread Reply

Hi,

I am just making some educated guesses here, but I think that you have some potential options, that might work:

1. Download a second BDJO that includes the downloaded JAR in the classpath, stored on the BUDA with the JAR. Use a BUMF to overlay the original BDJO and issue a rebind.
2. Use a URLClassLoader to access the classes from the JAR.

I probably need someone else to validate either of these as options.

chihiro_saito

Posts: 161
Re: Multiple JARs, problem with classpath updating
Posted: Nov 19, 2008 9:17 AM   in response to: ljubisap
  Click to reply to this thread Reply

Hi Ljubisa,

What you're describing seems like one of the compelling use cases of BD-Live, and it should definitely be possible, as far as I know. I've also succeeded in replacing the xlet jar itself in the past.

I believe the new jar needs to be in the application cache in bdjo and a clean title restart is required as well. Perhaps you can check that the jar can be used if it's burned on a disc first, and then try to reproduce the same setting with the VFS update?

Best,
Chihiro

ljubisap

Posts: 4
Re: Multiple JARs, problem with classpath updating
Posted: Nov 19, 2008 11:36 PM   in response to: chihiro_saito
  Click to reply to this thread Reply

Hello,

Thank you very much (both of you). Chihiro I'm able to do that on the disc, I'm trying to do that now with VFS update. When I have those two JARs on the disc it is possible to do that.

Thanks.

When I succeed I'll post the solution.

Regards,
Ljubisa




 XML java.net RSS