Win a copy of React Cookbook: Recipes for Mastering the React Framework this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Frits Walraven
  • Himai Minh

Runtime extension instalation

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Im currently working video conferencing project.
Everything is fine with video sending/receiving.

Client need jre instaled and jmf( Java Meda Framework ) extension.

There are few ways to instal jmf, one of them is describet there :

It works fine, but client have to :
#2 confirm that they trust me( signed applet)

#1 in yes/no dialog press yes to instal extension:
-Implementation-URL ...

What I want to do is to awoid yes/no dialog for plugin instalation.
If client "trust" me, it gives me permission to search client machine for jmf.jar and instal(copy byte by byte) jmf.jar to client machine.

Problem is accessing instaled classess because ClassLoader havent load them.
I tried somthing like this :

JarFile jf;
Enumeration e;

URL[] urlList = {new File("path to jmf.jar").toURL()};
ClassLoader loader = new URLClassLoader(urlList);
JarFile jf = new JarFile("path to jmf.jar");

for (Enumeration e = jf.entries() ; e.hasMoreElements() {
String jarEntry = e.nextElement().toString();

if (jarEntry.endsWith(".class")) {

jarEntry = jarEntry.replace('/','.');
jarEntry = jarEntry.substring(0,jarEntry.length()-6);
Class inst = loader.loadClass(jarEntry);

This works fine, but when I try :
Object o = inst.newInstance();

I get :

DirectSound Capture Supported = true
Exception on commit = java.lang.SecurityException: commit: Permission denied
DirectSoundAuto: Committed ok
java.lang.InstantiationException: Export

As far as I know java.policy.applet, created by Eclipse gives maximum permissions.

Well anyway is there way to instal extensions like jmf.jar runtime in applet? ( says its not possible in applets )


There is one more way to get done with it :
Include jmf.jar in archive="" but its 2mb and even if I cut it I guess it will be at least 1mb huge.

I can make an applet which checks if user have jmf instaled withot making trused applet, and then in videoconferencing applet include archive="jmf.jar", if its not.

Second problem is : How to access archive="jmf.jar", to be copied to client lib/ext directory, so next time user will not have to instal anything !??

If I could handle 1 of those 2 problem everything would be OK!

(sorry abut poor english)
Thank u!
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic