Including JMF libraries in an applet

I am trying to include JMF libraries in my applet, so anybody who opens a URL in his navigator can see me through my webcam.
To do this, I included customizer.jar, jmf.jar, mediaplayer.jar, multiplayer.jar and sound.jar in my jar distribution to make a test.
The clients run properly, however the just see the movie if they have JMF installed. If they have not JMF installed, no exception is throwed, but still they do not see anything.
Am I missing something? Does JMF uses native libraries?
Any help is welcome. Thanks!!!

I did that already
i.e. what is written in
Q: Can I capture audio or video from within an Applet with JMF 2.1.1?
By default (for security reasons), JMF 2.1.1 does not allow capture from an applet. The user can turn this on by using JMFRegistry.
Run "java JMFRegistry", select the UserSettings tab and check "Allow Capture From Applets". If the browser's security permits loading native libraries, then you will now be able to capture audio/video from an applet.
but the program lines
try
player = Manager.createRealizedPlayer(ml);
FormatControl formatControl = (FormatControl)player.getControl("javax.media.control.FormatControl");
Component co = formatControl.getControlComponent();
Thread.sleep(2000);
player.start();
give always the same error
java.lang.RuntimeException: No permission to capture from applets
java.lang.RuntimeException: No permission to capture from applets
why?
I am working inside the netbeans 6.9.1 editor

Similar Messages

  • Video Resize and JMF libraries import

    well I actually have 2 questions the first is how may I resize this video? (Someone helped me with with this code in the forum before but couldnt ask the same person on how to resize)
    ventanm.add(new Graphs(), BorderLayout.CENTER);
    public Graphs(){
             super(new BorderLayout());
             File f = new File(videofile);
             if (player != null)
             player.close ();
             player = new MediaPlayer();
             try {
               MediaLocator locator = new MediaLocator( f.toURI().toURL() );
               player.setMediaLocator(locator);
               player.setPlaybackLoop(true);
               //player.addControllerListener (this);
               player.prefetch ();
               this.add(player, BorderLayout.CENTER);
               player.start ();
             } catch(Exception e) {
               e.printStackTrace();
               add(new JLabel("Error"));
           }And the second question would be on how can I import the JMF libraries? Because the computer im woring on has JMF but the computer in which I will be doing my presentation dosen't? so anyone who could help?

    i tried using this
    player.setSize(150,100);
    dosent seem to do anything.. :/

  • JMF with Native Libraries as Signed Applet

    Hello
    After spending a few days hunting through forums, digging into JMF source code and hacking in the dark I'm about to give up, but thought I'd start yet another thread on this. It's a long, sad story...
    Problem: Deploying a JMF based program that relies on native libraries (in this case the FOBS4JMF bindings) as an applet: how to get jmf.properties and the native libraries loaded properly.
    Partial Solution: the native libraries packaged in a signed jar file, added to the applet's archive property, extracted using getResourceAsStream(), and loaded using System.load(). This is how FOBS4JMF loads it's native library anyway (via the com.moesol.NativeLibraryFinder):
    Class classInApplet; // name of a class loaded by the applet
    File outputFile; // location for extracted library
    InputStream is = classInApplet.getResourceAsStream(resource);
    copyStream(is, outputFile);
    System.load(outputFile.getAbsolutePath());Why this doesn't really work:
    (a) JMF (com.media.util.Registry) only searches for jmf.properties (which contains the instructions to use the FOBS4JMF plugin) in real folders (i.e. not jars) on the classpath of the local machine. I could extract the jmf.properties to a folder on the local machine, but have no way of making sure that folder would be on the classpath. Calls to "System.getProperty("java.class.path") give varying results - including an empty string on FF/OSX. Even if i could get the classpath somehow, chances are that it wouldn't contain any folders writable under Vista's UAC, which would leave me out of luck.
    JMF also looks for a file called ".jmfdir" in various platform specific locations, and appends the contents of this file to the classpath, so if i could write to that file i'd be golden. This seems like it would work on non windows platforms, because JMF looks for that in "user.home"). However, from what i can tell, on windows, JMF uses a native call to a function called nGetUserHome() to determine where to find .jmfdir - which leads to the second problem...
    (b) the JMF native libraries are loaded through calls to System.loadLibrary(), not System.load(), which means that they have to be on the "java.library.path" in order to be found - and again, I have no way of extracting the libraries to a directory on that path (at least not one writable under Vista UAC). This wouldn't be a problem, as I could pre-load the libraries myself with System.load(), except that JMF throws an exception if it can't find one, and stops trying to do whatever it thinks it needs the library for. Again, not a problem if I use only the FOBS4JMF native code (though i would like to use the DirectAudio renderer on windows) - except that the nGetUserHome() function described above is in a native library (jmutil.dll). So, when com.media.util.Registry.getJMFDir() tries to find ".jmfdir" it first tries to load "jmutil.dll" using System.loadLibrary(). This throws an exception inf "jmutil.dll" is not on the "java.library.path", and com.media.util.Registry.getJMFDir() returns null. Here's the relevant code from com.media.util.Registry.getJMFDir() - with my annotations
    All of these problems are fixable by relatively minor tweaks to the JMF source - but I don't think that's allowed under the SCSL. So if anyone has any, i mean ANY other suggestions, please BRING 'EM ON.
    thanks
    -chris
    EDIT: just for kicks, i checked to see where JMF expects to find .jmfdir on windows - ie the result of nGetUserHome(). At least on XP this seems to be c:\WINDOWS. if it's the same on Vista, then fixing the loadLibrary problem won't help bc I still won't be able to write to this file.
    Edited by: wodenx on May 7, 2010 9:46 AM

    Hi-
    Thanks for responding so quickly.
    As far as the natives go, you might try using the new JNLP embedded applet ability in the plugin2 architecture.I was going to look into that, but decided it wasn't necessary since I can get the FOBS native code to link properly. It's really the registry that's the problem, since without solving that I can't get JMF to USE the FOBS code.
    Can you get it all to work if the JMF installer is invoked? If so, perhaps if you add an installer-desc that calls the normal JMF setup.exe (though that final warning to reboot is both unnecessary and odious).I don't think it would work even with the JMF installer, bc I need to point JMF at the FOBS specific jmf.properties. I might be get it to work by invoking my own installer though, to place my jmf.properties somewhere in the native class path, so that's worth looking at. Thank you. Problem there is that on Vista users would have to elevate to run the applet, which is not ideal.necessary and odious).
    Why do you particularly want to embed media in a web page?The customer may want it. I might be able to convince them to go with JNLP/WebStart, but I think I might have the same problem there. Please correct me if I'm wrong...
    I've also read that there are problems with JMF and JNLP owing to the fact that JMF doesn't recognize the security manager invoked by JNLP, and so gives your program no permissions. Haven't tried it myself yet.
    Thanks again!
    Edited by: wodenx on May 7, 2010 12:07 PM

  • Re: Including JMF classes in Applet archive

    Two solutions:
    In the easy and loadheavy you include into your applet loading html:
    START HTML
    <applet "com.company.myapplets.TheApplet" archive="jarcontainingTheApplet.jar, jmf.jar" width=320 height=240>
    the jmf.jar is the one distrubuted w. JMF.
    In a specialized version for faster loads your could build the jmf classes needed into your own jar.
    regards

    Have tried this... Ona any machine without jmf, java console reports exceptions such as...
    com.ms.security.SecurityExceptionEx[com/sun/media/util/Registry.<clinit>]: Unable to access system property: java.class.path
    com.ms.security.SecurityExceptionEx[com/sun/media/IESecurity.loadLibrary]
    com.ms.security.SecurityExceptionEx[com/sun/media/util/MediaThread.getRootThreadGroup]: Illegal ThreadGroup access.
    I've also tried with a customized jmf.jar and with jmf.jar. It still won't run.
    html is..............
    <applet code="TVApplet.class" archive="tvapplet.jar, jmfcustom.jar" width=587 height=510>
    <param name=file value="Bear3.mpg">
    </applet>
    ...please help

  • MXMLC ANT task not including AIR libraries

    Hi Guys,
    This is the MXMLC ant task which I am using the compile my test app. If i set the static-link-runtime-shared-libraries="true" , the AIR libraries gets merged into my output swf. But when this attribute is set to false, I dont see the AIR libraries added to my SWF file. As a result when I run the AIR version fo my project, I dont see the application launch right. I have so many RSL in my project and I wanted to have static-link-runtime-shared-libraries="false". Is there a way to have AIR libraries include in my output file and still have this static-link-runtime-shared-libraries="false".
    <mxmlc
        file="${project.name}/src/Test.mxml"
        output="${build.mxmlc.dir}/Test.swf"
        static-link-runtime-shared-libraries="true"
        >
         <load-config filename="${air.config}"/>
         <source-path path-element="${project.name}/src" />
         <source-path path-element="${flex.frameworks.dir}/libs/air"/>
        <runtime-shared-library-path path-element="${flex.frameworks.dir}/libs/framework.swc">
                    <url rsl-url="${rsl.dir}/framework_3.2.0.3958.swz"/>
                    <url rsl-url="${rsl.dir}/framework_3.2.0.3958.swf"/>
        </runtime-shared-library-path>
        <runtime-shared-library-path path-element="${flex.frameworks.dir}/libs/datavisualization.swc">
                    <url rsl-url="${rsl.dir}/datavisualization_3.2.0.3958.swf"/>
        </runtime-shared-library-path>
       </mxmlc>
    My RSL are compiled using COMPC task and the AIR libraries are included into them using the below attributes of compc task.
    <source-path path-element="${basedir}/src" />
    <source-path path-element="${flex.frameworks.dir}/projects/airframework/src" />
    <source-path path-element="${flex.frameworks.dir}/projects/air/ServiceMonitor/src" />
    I am really stuck with this problem and not able to get my release build launch right. Again, any light on this problem will be of great help.!

        <mxmlc
             file="${project.name}/src/Test.mxml"
             output="${build.mxmlc.dir}/Test.swf"
             static-link-runtime-shared-libraries="true"
        >
              <load-config filename="${air.config}"/>
              <source-path path-element="${project.name}/src" />
             <runtime-shared-library-path path-element="${flex.frameworks.dir}/libs/framework.swc">
                    <url rsl-url="${rsl.dir}/framework_3.2.0.3958.swz"/>
                    <url rsl-url="${rsl.dir}/framework_3.2.0.3958.swf"/>
             </runtime-shared-library-path>
             <runtime-shared-library-path path-element="${flex.frameworks.dir}/libs/datavisualization.swc">
                    <url rsl-url="${rsl.dir}/datavisualization_3.2.0.3958.swf"/>
             </runtime-shared-library-path>
        </mxmlc>
    This also seems to work. AIR libraries are included in my output SWF. It all happens right when I have static-link-runtime-shared-libraries="true" . Why? Why does that not work when i have static-link-runtime-shared-libraries="false"  ??

  • How to force Jdeveloper to include additional libraries with generated war?

    Hi
    thank you for reading my post
    how i can force the Jdeveloper to include some libraies that i add to application
    in the generated war file ?
    I create a library named mysql and mysql jar file in inside it , i add the library to application but in the generated war file it is not inside the web-in/lib folder
    thanks

    Check in Tools | Project Properties | Libraries
    Assume you have added your Library here. Highlight your library and click Edit to review this entry. Make sure the 'Deployed by Default' checkbox is checked?
    Also, check your deployment profile settings:
    File Groups | WEB-INF/lib | Contributors -
    make sure your library is selected for deployment (should be if you do the step above.)
    Message was edited by:
    javaX

  • Netbeans: creating a jar including jar libraries

    Hi everyone,
    I am trying to create a jar of my netbeans project which includes some other jars as libraries.
    The problem is that it compiles ok and creates the jar but unfortunately it does not include in the project .jar the libraries needed for the execution.
    Therefore when I run the program it complains with a java.lang.NoClassDefFoundError.
    Anyone can advise on how I can solve this?
    Cheers

    Read the README.TXT file that NetBeans creates in your dist folder. And please be informed that this is a forum for problems related to the Java lanuage and standard API, not for an IDE.
    There are IDE forums on nabble.com and java-forums.org
    db

  • OI includes and libraries

    Hi All,
    I am using OI libraries for one of my GUI application. I have lost the header files and libraries due to hard disk crash. Can anyone provide/suggest as to where I can get these header files and libraries.
    Below I have put a breif description about OI
    ObjectBuilder includes the Object Interface (OI) class library which is a C++ object-oriented implementation of both Motif and Openlook interfaces.
    The OI version I am using is 5.1.3

    Did you check the example and client (/companion) CD's? (regarding 11g)

  • Including multiple jar files to applet

    In one of my application I am using severla third party apis (JavaHelp, JFreeReport, NanoXml ...) which comes as a seperate jar file each.
    Is there is a way that I can include these multiple jar files to be downloaded automaticaly when the applet is starting.
    currently I am extracting all the jar files and then re compressing them in to one file and place it in the archive property in the applet tab.
    Is there a way I can avoid extraction and recompression and directly use the jar files

    <param nama="archive" value="myjar.jar, myOtherjar.jar" />
    You could try to create an installer that wil put the 3rd party jars in the users lib/ext directory.

  • Best practices to include client libraries used at component level

    How to include component level resources, while following the best practices.
    Ex:
    I am looking at the geometrixx media site in CQ 5.6. In the some of components, ex: 2-col-article-summary we have a client library defined under the component.
    /apps/geometrixx-media/components/2-col-article-summary
    -2-col-article-summary.jsp
    -clientlibs
      -css
      -css.txt
    if i look at the categories of the clientlib, it is defined as follows
    categories String[] apps.geometrixx-media, apps.geometrixx-media.2-col-article-summary
    The only place this client library is included is in the head.jsp of main page level component.
        <cq:includeClientLib categories="apps.geometrixx-media.all"/> - this in turn embeds the apps.geometrixx-media
    my questions are as follows
    1) Why do we have two categories for the clientlib, if ithe second category name( apps.geometrixx-media.2-col-article-summary) is not being used. Is there is some other usage for this i am missing.
    2) Also these set of css is always included no matter whether a specific component is added to the page or not.
    3)  I could use the following to include the client at the component level, but this will cause unnecessary <script> and <link> elements at the component level mark up.
       <cq:includeClientLib categories="apps.geometrixx-media.2-col-article-summary"/>
    Essentially  i am trying to understand, how to include a specific component level resources while following the best practices

    Hi,
    I dont have CQ5.6 setup so could not see referring example but by looking at description i can say
    Ans 1. The client library can be invoked directly through tag lib as <cq:includeClientLib categories="category name"/> but it can also be invoked when you add "dependencies" property to client library folder and in that case it resolve all the dependencies first. So to answer your quesiton by looking at client library folder configuration you can not say that specific category has not been used any where or not invoked.
    Ans 2. Invoking client library folder completely depends on your code where you are placing call for client library using <cq:includeClientLib> tag and dependencies configuration. So you have to dig it more to trace out all the calls (also default css/js loads)
    Ans 3. Correct. So accomplish that best way to manage client library at component level and give it a unique name which can not be invoked any where neither through <cq:includeClientLib> call nor through dependenies configuration. This way you can avoide overridding of same library files. (Better to manage proper hierarchy of library)
    Hope it gives you some idea .
    Thanks,
    Pawan

  • Ejbs - Included AQ libraries

    I'm trying to deploy an ejb using JDeveloper 3.1.1.2 into Oracle 8.16 which uses the following packages:
    oracle.aurora.jndi.sess_iiop.*;
    oracle.jms.*;
    oracle.AQ.*;
    I get ClassNotResolved exceptions at the "Generating EJBHome and EJBObject on the server..." stage.
    I assume that when the JVM on the oracle side tries to recompile my classes, it cant find the oracle packages.
    However, when I try to include the aqapi.jar as part of my advanced deployment options; I can see the AQ classes in the 'preview' (cant see the aurora ones though); but I still get the same resolver issues.
    When I query the generated jar, I cant see that AQ classes have been added.
    Would appreciate someone's help on this

    Hello,  what exactly is it you want to do with ADF?  Are you trying to convert an existing forms application to ADF?  If so, you're best bet is to download the JHeadstart Developer's Guide and read through the chapter on the Forms2ADF Generator.
    That guide, in general, might provide you with the best answer to your question.  The chapter on Using JHeadstart gives a good summary of what the tool looks like and how it works.
    In short, rather than using the standard drag-and-drop, declarative functionality that JDeveloper provides for building your application interface, JHeadstart allows you to set a wide variety of properties for your forms and tables, and for the fields on them, then uses Velocity templates to generate the forms and tables (and associated task-flows and page definition bindings) for you.  You can also customize those Velocity templates to build interface elements that aren't supported in JHeadstart by default.
    Hope that helps.

  • JMF Video Capture within Applets

    I would like to develop web conference..please helm me

    venujakku wrote:
    I would like to develop web conference..please helm meI just succesfully created a Java simple prototype application using JMF that can capture the webcam images in real time.
    Just use the JMF and your set.
    Edited by: deAppel on Oct 15, 2007 3:30 PM

  • How does one include a counter in an applet?

    By counter, I mean you have a number in a label or text box and up/down arrows immediately to the right of it, when you press the down arrow the number goes down and vice versa for the up arrow.

    I added a window listener so the default close operation for the
    window manager can be used. The previous was not able to respond
    to window manager events.
    import java.awt.*;
    import java.awt.event.*;
    public class Counter extends Frame implements ActionListener {
    private Label label;
    private Button up, down;
    private static int number = 0;
    public Counter() {
         super("Test");
         setLayout(new FlowLayout());
         label = new Label(Integer.toString(number));
         up = new Button("Up");
         down = new Button("Down");
         add(label);
         add(up);
         add(down);
         up.addActionListener(Counter.this);
         down.addActionListener(Counter.this);
         addWindowListener(new WindowAdapter() {
         public void windowClosing(WindowEvent e) { dispose();}
         pack();
         setVisible(true);
    public void actionPerformed(ActionEvent ae) {
         if (ae.getSource() == up) {
         label.setText(Integer.toString(++number));
         if (ae.getSource() == down) {
         label.setText(Integer.toString(--number));
    public static void main(String args[]) {
         new Counter();
    This below should do it. It does not listen for a
    default close so
    you might have to stop it by doing a Control-C.
    This was compiled with and works with SDK 1.4.1_02.
    import java.awt.*;
    import java.awt.event.*;
    public class Counter extends Frame implements
    ActionListener {
    private Label label;
    private Button up, down;
    private static int number = 0;
    public Counter() {
    super("Test");
    setLayout(new FlowLayout());
    label = new
    label = new Label(Integer.toString(number));
    up = new Button("Up");
    down = new Button("Down");
    add(label);
    add(up);
    add(down);
    up.addActionListener(Counter.this);
    down.addActionListener(Counter.this);
    pack();
    setVisible(true);
    public void actionPerformed(ActionEvent ae) {
    if (ae.getSource() == up) {
    label.setText(Integer.toString(++number));
    if (ae.getSource() == down) {
    label.setText(Integer.toString(--number));
    public static void main(String args[]) {
    new Counter();

  • Including global libraries in application shell?

    I'd like to bake Parsley into the shell application so messages don't always have to hit the server.  How do I get in there to do that?

    The following is just my 2 cents, for what that's worth.  I don't pretend to speak for all of Adobe in this respect.
    My approach to building composite applications is to think about each micro app (tile) as a separate entity rather than to think of the application (shell application) as a whole.
    For example, If I have an application that consists of a list of customers, their profiles and their current open cases; I would build it as three separate apps.  Yes those apps need to communicate. But, if you do the communication through the Mosaic framework, then they can be independent of each other and thus they are more apt to be reusable (for example the list of customers may be used for reporting in another application).
    With regard to using Parsley to create tiles -  My opinion is that it is a bit redundant, especially in light of the upcoming release of Mosaic-next - the Composite Application Framework (CAF).   When I look at what Parsley gives me, I think of messaging, injection and object abstraction.  I can use the CAF context binding, Gravity and service objects to get the same thing.

  • Re: Applet JMF in a client  without jmf installed

    As a possible hack/workaround, are you including jmf.jar in the applet codebase ? It contains all the codecs necessary to decode the video stream. You might need to look at applet security too.
    If this doesn't work, you need each client to install JMF.
    You could try adding this codebase line to your applet/object tag in the applet's HTML.
    codebase="http://myserver:80/the_jmf_install_program.exe"
    regards,
    Owen

    As a possible hack/workaround, are you including jmf.jar in the applet codebase ? It contains all the codecs necessary to decode the video stream. You might need to look at applet security too.
    If this doesn't work, you need each client to install JMF.
    You could try adding this codebase line to your applet/object tag in the applet's HTML.
    codebase="http://myserver:80/the_jmf_install_program.exe"
    regards,
    Owen

Maybe you are looking for

  • How do I import csv file into a SharePoint list?

    I am trying to use a PowerShell script to load data into a SharePoint list from a csv file. When I run my code, it seems to go through the process of loading the data into the list. However when I go to my list, all I see is "System.Object[]" display

  • Critical Errors SCCM 2012 (Distribution Point and Reporting services point)

    Hello, We are getting errors under the Site Status for the Distribution Point and Reporting services point. Was running fine and have not really made any changes but all of a sudden we have these critical errors. The report server service is not runn

  • Can't get rid of items from the Side bar

    I placed some movies in the side bar and now I can't get rid of them. I was able to remove one movie that I placed in the side bar today from the side bar, but some other movies I can't remove. I don't remember putting these movies in the side bar. W

  • Symbol in browser: delete and change

    Hello, could you help me please ? I want to change or delete the symbol to my folder but when I do a right clic, I can't delete the symbol or change it by an other symbol (that I want). Do you know how change or delete the symbol please ? Thanks in a

  • How to find locked files and unlocked them???

    Having trouble for snxing itunes i need to find locked files but i dont know how and unlocked them so that i can sync again..