Classpath problems with JMF

Hi all,
I'm trying to develop a simple application using JMF; I've problems importing classes from javax.media package. Problem with my application is that when I explicitly specify classpath as a command line argument to javac my application compiles; but if I use CLASSPATH environment variable it doesn't. Here's the output:
situ@situ-desktop:~/myjava/media$ cat First.java
import javax.media.*;
public class First{
situ@situ-desktop:~/myjava/media$ echo $CLASSPATH
/home/situ/jmf/JMF-2.1.1e/lib/jmf.jar:/home/situ/jmf/JMF-2.1.1e/lib/sound.jar:.:
situ@situ-desktop:~/myjava/media$ javac First.java
First.java:1: package javax.media does not exist
import javax.media.*;
^
1 error
situ@situ-desktop:~/myjava/media$ javac -classpath /home/situ/jmf/JMF-2.1.1e/lib/jmf.jar First.java
situ@situ-desktop:~/myjava/media$
Thanks.

According to the documentation, it wants you to set two environmental variables, JMFHOME and CLASSPATH. And it wants the CLASSPATH to be relative to that JMFHOME variable.
Try this.
setenv JMFHOME /home/someuser/JMF2.1.1
setenv CLASSPATH $JMFHOME/lib/jmf.jar:.:${CLASSPATH}

Similar Messages

  • CLASSPATH problem with Application Server 8.2

    Hello everyone.
    i am new to using the App server 8.2 for deploying a web application. we decided to use it because we were having too many problems with Web Server.
    We successfully deployed the application and it runs. however, when accessing a page with database connectivity, we get the following error:
    =================================================
    com.sun.rave.web.ui.appbase.ApplicationException: javax.servlet.ServletException: java.lang.RuntimeException: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.sun.sql.datasource.DriverAdapter
         com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.destroy(ViewHandlerImpl.java:601)
         com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:316)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         sun.reflect.GeneratedMethodAccessor261.invoke(Unknown Source)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
         java.security.AccessController.doPrivileged(Native Method)
         com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)
    =================================================
    I don't really know what that means but it looks like i need to set some sort of classpath properties. under web server 6.1, the classpath settings were those of the server's JAR file path.
    i used Studio creator's remote deployment tool to deploy to AppSvr8.2.
    i followed the tutorial step by step.
    can someone please help me

    i did what you suggested and now i get a different error: Connection could not be allocated because: com.sun.sql.jdbc.oracle.OracleDriver
    see page below:
    ================================================
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    com.sun.rave.web.ui.appbase.ApplicationException: javax.servlet.ServletException: java.lang.RuntimeException: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: com.sun.sql.jdbc.oracle.OracleDriver
         com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.destroy(ViewHandlerImpl.java:601)
         com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:316)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
         java.security.AccessController.doPrivileged(Native Method)
         com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)
    ================================================
    thank you so much for all your help thus far!!

  • Problem with JMF

    j'ai install� la JMF2.1.1e sous LINUX.
    Quand je lance l'initialisation de la JMF:
    [pnv@dell-linux113 bin]$ jmfinit
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    JavaSound Capture Supported = true
    Exception on commit = java.io.FileNotFoundException: /home/pnv/A_V_V/JMF-2.1.1e/lib/jmf.properties (Permission denied)
    JavaSoundAuto: Committed ok
    java.lang.Error: Can't open video card 0
    java.lang.Error: Can't open video card 1
    java.lang.Error: Can't open video card 2
    java.lang.Error: Can't open video card 3
    java.lang.Error: Can't open video card 4
    java.lang.Error: Can't open video card 5
    java.lang.Error: Can't open video card 6
    java.lang.Error: Can't open video card 7
    java.lang.Error: Can't open video card 8
    java.lang.Error: Can't open video card 9
    Lorsque je veux visualiser avec JMStudio une video encod� en H263:
    J'ai une fenetre qui apparait: JMStudio Error
    Controller Error:
    Internal module com.sun.media.BasicFilterModule@262c31 failed!
    [pnv@dell-linux113 bin]$ jmstudio
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    java.lang.ArrayIndexOutOfBoundsException
    at com.ibm.media.codec.video.h263.ReadStream.fillBuffer(ReadStream.java:101)
    at com.ibm.media.codec.video.h263.ReadStream.nextBits(ReadStream.java:56)
    at com.ibm.media.codec.video.h263.H263Decoder.GetNextStartCode(H263Decoder.java:1579)
    at com.ibm.media.codec.video.h263.H263Decoder.DecodeGobs(H263Decoder.java:542)
    at com.ibm.media.codec.video.h263.H263Decoder.DecodePicture(H263Decoder.java:510)
    at com.ibm.media.codec.video.h263.JavaDecoder.decodeData(JavaDecoder.java:286)
    at com.ibm.media.codec.video.h263.JavaDecoder.process(JavaDecoder.java:242)
    at com.sun.media.BasicFilterModule.process(BasicFilterModule.java:322)
    at com.sun.media.BasicModule.connectorPushed(BasicModule.java:69)
    at com.sun.media.BasicOutputConnector.writeReport(BasicOutputConnector.java:120)
    at com.sun.media.SourceThread.process(BasicSourceModule.java:729)
    at com.sun.media.util.LoopThread.run(LoopThread.java:135)
    Internal module com.sun.media.BasicFilterModule@262c31 failed!
    Avez vous une idee??
    merci de m'aiguiller.......
    En fait je fait un projet qui transmet du flux RTP video et audio; pour l'audio pas de probleme, pour la video:
    Failed to realize: com.sun.media.ProcessEngine@186c730
    Cannot build a flow graph with the customized options:
    Unable to transcode format: H263, 176x144, FrameRate=25.0, Length=0 0 extra bytes
    to: H263/RTP
    outputting to: RAW/RTP
    Error: Unable to realize com.sun.media.ProcessEngine@186c730
    java.lang.UnsatisfiedLinkError: JMFSecurityManager: java.lang.UnsatisfiedLinkError: no jmutil in java.library.path
    initOK_audio ===== null
    initOK_video ===== null
    =====================================
    javax.media.NotRealizedError: Cannot set media time on a unrealized controller
         at com.sun.media.BasicPlayer.setMediaTime(BasicPlayer.java:427)
         at transmitrtpserveur.AVTransmit3.startTransmissionV(AVTransmit3.java:381)
         at transmitrtpserveur.ThreadStartTransmissionV.run(ThreadStartTransmissionV.java:56)
    javax.media.NotRealizedError: Cannot set media time on a unrealized controller
         at com.sun.media.BasicPlayer.setMediaTime(BasicPlayer.java:427)
         at transmitrtpserveur.AVTransmit3.startTransmissionV(AVTransmit3.java:381)
         at transmitrtpserveur.ThreadStartTransmissionV.run(ThreadStartTransmissionV.java:56)
    Merci de votre aide, c'est super urgent !!!!!

    I think you installed JMF as root.
    you need to su root, and change chown and chgrp on the install directory of JMF in pnv

  • Package/Classpath problem with 1.4

    I've two classes. one class has a package structure and other does not. when i try to compile the class (having package structure) which has a reference to other class (which doesn't have package structure), I get error "cannot resolve symbol"
    eg.
    package com.hamilsci;
    public class A {
    public A() {
    B obj = new B();
    class A is in dir /usr/local/java/examples
    public class B {
    public B() { }
    class B is in dir /usr/local/java/helperclasses and doesnot have package structure
    When I tried to compile A without the package statement, everything works fine. But when I add package structure to Class A, I cannot compile . The error Message is :cannot resolve symbol
    symbol : class B
    location: class com.hamilsci.A
    B obj = new B();
    ^
    I'm using JDK1.4 and I've tried setting the CLASSPATH.
    Any help would be highly appreciated.
    -Thanks
    -Mike

    Here's a tutorial on packages.
    http://java.sun.com/docs/books/tutorial/java/interpack/packages.html
    If you have a class with "package com.hamilsci" it must be in a directory named hamilsci, hamilsci must be in a directory named com, and com must be in a directory that is in your classpath.

  • Classpath problem with properties file in jar

    Hi,
    I am seeing a classpath error for my setup, as follows...
    A defaultFieldIDs.properties exists with numerous entries:
    projectID=10630
    issueTypeID=80
    closedStatusID=6My Spring applicationContext.xml file contains the following:
    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
              <property name="locations">
                   <list>
                         <value>classpath:sqlScripts.properties</value>
                         <value>classpath:defaultFieldIDs.properties</value>
                    </list>
              </property>
              <property name="ignoreUnresolvablePlaceholders" value="false"/>
         </bean>     
    <util:map id="defaultQueryParameters">
              <entry key="projectID" value="${projectID}"/>
              <entry key="issueTypeID" value="${issueTypeID}"/>
              <entry key="closedStatusID" value="${closedStatusID}"/>
              <entry key="statusFieldName" value="${statusFieldName}"/>
              <entry key="numberOfExpenseLinesFieldID" value="${numberOfExpenseLinesFieldID}"/>
         </util:map>My compiled jar contains the above properties directory in its root directory, and is placed in the lib directory of the application
    However, when I start my application I get the following error:
    Invalid bean definition with name 'defaultQueryParameters' defined in null: Could not resolve placeholder 'projectID'
    What is going wrong here?

    Then presumably that jar file isn't in the classpath for your application. Perhaps just dropping it into the lib directory isn't sufficient.
    You didn't say anything about what kind of application it is. For web applications, all jars in the WEB-INF/lib directory are in the classpath. But you didn't say this was a web application and you didn't say you put it in the WEB-INF/lib directory. So if you don't care to put sufficient information into your posts, I recommend you read up on the rules for whatever type of application you have, in particular the rules for how to set its classpath.

  • Classpath problem with 1.3.1_05

    We are using a CM tool that uses a link based work area. When the links contain the pound sign, the JVM suddenly fails to find classes.
    myjar.jar -> /usr/local/ccmdb/Prod/st_root/cache/source/#07/13407
    CLASSPATH=myjar.jar
    java aclass
    -> this will result in a Class not found exception
    If I change the link to a path where no pound sign occurs in the path, it works.
    Is this a Bug in Java 1.3? Or is there a good reason why this does not work?
    Thanks

    I alos tested with Java 1.4.1_04 and 1.3.1_11
    It worked fine with 1.4 but not with any of the 1.3 releases. so it looks to me like a bug in 1.3....

  • Problems with JMF and audio files.

    Sofware:
    Java Version 1.5.0_03
    JMF Version 2.1.1e
    Windows XP SP2
    I have a application that consists of 2 parts. The first is an editor for creating exercises, like multiple-choice, matching and so on. The second part is a &#8220;client&#8221;, used to solve the exercises. The client uses Java Webstart.
    When I include audio clips in the exercises they play just fine using the client, but in the editor program I just get a clicking sound, and then the application stops responding.
    The strange part is that the editor and client use the exact same code to playback audio clips.
    The old version of the editor (developed for Java 1.3.x) works just fine under Java 1.3.x, but when the same byte-code is launched under Java 1.5 I get the same problem (clicking sound and then the application stops responding).
    Any suggestions?

    When installing JMF, two new packages are stored in the jre\lib\ext folder : jmf.jar and sound.jar.
    Sound.jar contains the same api that are in the packages sound.midi and sound sampled contained in jre.
    Maybe these new api are an improved version but i noticed some trouble playing sound and i delete sound.jar file, now it works fine.
    Try this, maybe you had the same problem.

  • Possible classpath problems with JSP

    I'm trying to run a simple jsp under ocj4 and I'm running into problems. Other jsp's run fine so I'm pretty sure everything's installed right. However, when I try and use the ConnCacheBean I get a "bean type ConnCacheBean not found error". Now the class is there under (on my system) d:\oracle\jsp\lib in osjputil.jsp. I tryed adding this manually to the -cp option of java when I run orion.jar but to no help.
    Where can I set this classpath variable (if this what's going wrong, if not what is) as I can't find anything addressing this in the documentation.
    thanks
    Jonny Wray
    null

    I've had success putting my non-JSP stuff into a simple jar file and placing it in
    j2ee/home/default-web-app/WEB-INF/lib. It seems that the engine picks up anything in that directory.
    Possibly, you will have to create this lib directory yourself.
    See if this helps.
    Cheers,
    Malte Christensen
    null

  • [b]Capture device problem with JMF[/b]

    Hi,
    I am doing audio and video transmission using the AVTransmit2 program. This program is at the server side. When 1client requests a transmission, it works fine. I am able to receive the audio and video. But when i have more than 1client i get the error: "Capture device in use", "Cannot create data source". I have created 2 players to render the audio and video on the screen.
    Note: I am using an Object Request Broker(Visibroker) to route the client requests to the server and sending the replies back to the clients.
    Please help, it's urgent.
    For any reply e-mail me at: [email protected]
    Thanking you in advance.

    No, sorry. Haven't got an solutions yet........
    However messing around with the permissions and settings in etc/security/console.perms and /etc/udev/50-udev.rules is causing it to not work in root either.....so i think it has something to do with it. However not figured it out yet.
    But these files and setting do not apply to windows.....
    Does anybody hav a solutions for the problem?
    Greeting,
    Olly

  • JMF Problem with Logitech camera

    Hi
    I have a problem with JMF Registry Editor. I've tryed Detect Capture Devices and during detecting my computer crashes (blue screan) and restart the system. How can I solve this problem? I've set JMFHome.
    Thank you in advance.
    Falken

    Blue screen means something in the Windows code is crashing your computer. There's probably not anything you can do to fix it except unplug any devices you have plugged in...

  • Problem with Class and Classpath

    Hello ME Windows Users, now before you place a wry smile on your face, I have a problem with path and classpath. Stop it, I can see you smiling!
    By visiting the the last 10 pages of the forum and reading Sun installation notes, some tooldocs and by given some answers by some nice people, I have become an expert in turning off my computer, about 10 times/hr. I still am trying to make my first cup of java.
    With the ME computer,
    I'm unable to right click on the desktop and go to properties, advanced,
    I'm unable to go go start, run, sysedit,
    I'm unable to change the ms-dos window of autoexec.bat, it just shuts down.
    Now before you tell me, I should of bought a different computer, the only place I can find to modify the path and classpath is in the environment which is in system configuration under tools. Here I have placed numerous configurations, like
    C:\java>set path=%path%;c:\j2sdk1.4.2\bin
    C:\java>set classpath=%classpath%;.;
    ;java_dir\bin where ;java_bin is c:\j2sdk1.4.2
    .; java_dir\bin; %path% where ;java_bin is c:\j2sdk1.4.2 and the list goes on.
    But, I know you are still smiling, the % signs comes up in a dialog box, saying too many, and will not convert the text to the environment to be saved when I close down for the tenth time in the last hour.
    Can someone help me before I make a real cup of coffee and accidentally drop it on the ME box.
    Have a laugh on me Mik.

    C:\java>set path=%path%;c:\j2sdk1.4.2\binGood
    But it is no good because it has to many % and a dialog box appears, saying you have too many parameters.
    Are you saying I have to shutdown again to answer your ?
    From the HELP menu-
    To confirm startup commands line by line
    Click Start, and then click Shut down.
    Click Restart, click OK, and then press and hold the CTRL key until the Windows Startup Menu appears.
    Enter the number for Step-by-step confirmation, and then press ENTER.
    For each command you want to run, press Y.
    If the command runs successfully, you are prompted with the next command.
    If the command does not run successfully, you receive an error message.
    To skip a command, press N.
    Mik

  • Problem with classpath for XP

    i've made a java applet with three classes, two of which are classes to construct variables needed for the main interface to work. but the interface class cannot recognise that the other two classes exist. it gives out the cannot resolve system error. i know that there is no problem with the program syntax (or which directory they are in) because it compiles on other computers and i can compile the individual classes on my sustem. i have made numerous one class programs before so the compiler definitely works in some situations. i'm thinking then that the problem must be with my jdk in some way. i've tried re-installing my jdk and installing a different jdk but stil no joy. someone mentioned to me it could be something to do with how the classpath is set up but this is something i'm a bit unsure about, i know though that XP is slightly different to the other windows o/s. any advice would be much appreciated.

    My Windows is not English so I'm not sure whether it's exactly the same:
    Start>Configuration>System>Environment variables
    If there is a variable with the name "CLASSPATH" (system variables) look if . is in your classpath. If not, add to the classpath ";." . And if there is no CLASSPATH variable, add it (and add the value . to it).
    I hope it helps.

  • Problem with file descriptors not released by JMF

    Hi,
    I have a problem with file descriptors not released by JMF. My application opens a video file, creates a DataSource and a DataProcessor and the video frames generated are transmitted using the RTP protocol. Once video transmission ends up, if we stop and close the DataProcessor associated to the DataSource, the file descriptor identifying the video file is not released (checkable through /proc/pid/fd). If we repeat this processing once and again, the process reaches the maximum number of file descriptors allowed by the operating system.
    The same problem has been reproduced with JMF-2.1.1e-Linux in several environments:
    - Red Hat 7.3, Fedora Core 4
    - jdk1.5.0_04, j2re1.4.2, j2sdk1.4.2, Blackdown Java
    This is part of the source code:
    // video.avi with tracks audio(PCMU) and video(H263)
    String url="video.avi";
    if ((ml = new MediaLocator(url)) == null) {
    Logger.log(ambito,refTrazas+"Cannot build media locator from: " + url);
    try {
    // Create a DataSource given the media locator.
    Logger.log(ambito,refTrazas+"Creating JMF data source");
    try
    ds = Manager.createDataSource(ml);
    catch (Exception e) {
    Logger.log(ambito,refTrazas+"Cannot create DataSource from: " + ml);
    return 1;
    p = Manager.createProcessor(ds);
    } catch (Exception e) {
    Logger.log(ambito,refTrazas+"Failed to create a processor from the given url: " + e);
    return 1;
    } // end try-catch
    p.addControllerListener(this);
    Logger.log(ambito,refTrazas+"Configure Processor.");
    // Put the Processor into configured state.
    p.configure();
    if (!waitForState(p.Configured))
    Logger.log(ambito,refTrazas+"Failed to configure the processor.");
    p.close();
    p=null;
    return 1;
    Logger.log(ambito,refTrazas+"Configured Processor OK.");
    // So I can use it as a player.
    p.setContentDescriptor(new FileTypeDescriptor(FileTypeDescriptor.RAW_RTP));
    // videoTrack: track control for the video track
    DrawFrame draw= new DrawFrame(this);
    // Instantiate and set the frame access codec to the data flow path.
    try {
    Codec codec[] = {
    draw,
    new com.sun.media.codec.video.colorspace.JavaRGBToYUV(),
    new com.ibm.media.codec.video.h263.NativeEncoder()};
    videoTrack.setCodecChain(codec);
    } catch (UnsupportedPlugInException e) {
    Logger.log(ambito,refTrazas+"The processor does not support effects.");
    } // end try-catch CodecChain creation
    p.realize();
    if (!waitForState(p.Realized))
    Logger.log(ambito,refTrazas+"Failed to realize the processor.");
    return 1;
    Logger.log(ambito,refTrazas+"realized processor OK.");
    /* After realize processor: THESE LINES OF SOURCE CODE DOES NOT RELEASE ITS FILE DESCRIPTOR !!!!!
    p.stop();
    p.deallocate();
    p.close();
    return 0;
    // It continues up to the end of the transmission, properly drawing each video frame and transmit them
    Logger.log(ambito,refTrazas+" Create Transmit.");
    try {
    int result = createTransmitter();
    } catch (Exception e) {
    Logger.log(ambito,refTrazas+"Error Create Transmitter.");
    return 1;
    } // end try-catch transmitter
    Logger.log(ambito,refTrazas+"Start Procesor.");
    // Start the processor.
    p.start();
    return 0;
    } // end of main code
    * stop when event "EndOfMediaEvent"
    public int stop () {
    try {   
    /* THIS PIECE OF CODE AND VARIATIONS HAVE BEEN TESTED
    AND THE FILE DESCRIPTOR IS NEVER RELEASED */
    p.stop();
    p.deallocate();
    p.close();
    p= null;
    for (int i = 0; i < rtpMgrs.length; i++)
    if (rtpMgrs==null) continue;
    Logger.log(ambito, refTrazas + "removeTargets;");
    rtpMgrs[i].removeTargets( "Session ended.");
    rtpMgrs[i].dispose();
    rtpMgrs[i]=null;
    } catch (Exception e) {
    Logger.log(ambito,refTrazas+"Error Stoping:"+e);
    return 1;
    return 0;
    } // end of stop()
    * Controller Listener.
    public void controllerUpdate(ControllerEvent evt) {
    Logger.log(ambito,refTrazas+"\nControllerEvent."+evt.toString());
    if (evt instanceof ConfigureCompleteEvent ||
    evt instanceof RealizeCompleteEvent ||
    evt instanceof PrefetchCompleteEvent) {
    synchronized (waitSync) {
    stateTransitionOK = true;
    waitSync.notifyAll();
    } else if (evt instanceof ResourceUnavailableEvent) {
    synchronized (waitSync) {
    stateTransitionOK = false;
    waitSync.notifyAll();
    } else if (evt instanceof EndOfMediaEvent) {
    Logger.log(ambito,refTrazas+"\nEvento EndOfMediaEvent.");
    this.stop();
    else if (evt instanceof ControllerClosedEvent)
    Logger.log(ambito,refTrazas+"\nEvent ControllerClosedEvent");
    close = true;
    waitSync.notifyAll();
    else if (evt instanceof StopByRequestEvent)
    Logger.log(ambito,refTrazas+"\nEvent StopByRequestEvent");
    stop =true;
    waitSync.notifyAll();
    Many thanks.

    Its a bug on H263, if you test it without h263 track or with other video codec, the release will be ok.
    You can try to use a not-Sun h263 codec like the one from fobs or jffmpeg projects.

  • FSM with JMF 2.1.1(a) and one more problem. !! URGENT

    Good AfterNoon All...
    I am working on JMF 2.1.1 and I want to show a .avi file in fullScreenMode.
    How can i do so with jdk 1.4.
    I have gotten viewComponent and control comp.
    My application is running sucessfully. NO PROBLEM.
    But i want to show the movie in FSM . In order to do so, what i am doing is , I remove view
    Comp from my JFrame (in which whole of the process is going on.) .
    Add that viewComp in fullScreenWindow (which is initilized Window with parent frame.).
    But here some problem is there. According to me, it is painting problem.
    viewComp is removed successfully from frame but not added in window.
    Layout of window is border and i am adding viewComp in center of window.
    Running movie is not visible in Window. WHY ? what could be the possible reason.
    Is it possible or It can't happen. ?
    One thing more.... HUH...
    I have a menubar in frame with file and tool menus.
    when player initilized and movie starts running . You know what happens.
    Clicking on menu(s) doesnot cause menuitem(s) to visible or pull down. ?? Oh ! GOD.
    viewComp is at center and controlComp is at South.
    When i click on say fileMenu. file Menu pressed as always happens with swing's color but menuitems donot visible.
    WHY ?
    It seems that menuitems are visible ....hamam.ma...mmm I mean they are hided by viewComp.
    how to get ride of this problem. ?
    Any idea is highly appreciated.
    And it is nice working with JMF.

    Nobody .... ??
    I have found the answer of my 2nd question but still first is creating problem.
    Does anyone know it.. how to do it..
    Full Screen Mode in JFM.
    Thanks
    Sanjeev Dhiman

  • Problems with classpath and comiling an easy program

    Hello everyone:
    I have downloaded jsdk1.3.1_03, (Windows xp)? what do i type in the class path?
    Once I am done with setting the classpath. I typed the helloworld program, and it give me an error specified path not found).
    Please help, through this.
    Sincerely
    Johanna

    it is problems with compiling and running!!! ,
    everytime I try to comile the helloworld program, it
    state an error like :specific path not found. I set
    the path and classpath to C:\jsdk1.3.1\bin
    is that correct? If you installed the developer's kit into c:\jsdk1.3.1 then that is correct. You need to include the directory where you installed java. Typically, that is c:\jdk1.3.1 for example (and add \bin). You can try to "cd c:\jsdk1.3.1\bin" and try javac again. You must have NO spaces in your Path setting.

Maybe you are looking for

  • Use Time Machine HD as regular external HD?

    Is it possible to convert the backups.backupdb folder on an external HD I've been using for Time Machine into a regular folder? Or to otherwise move around and delete files within the backups.backupdb folder on the Time Machine HD? My old Macbook Pro

  • How to get notify when new Email comes in...

    hi, any idea on how to get notify from phone when there is new email comes in to mailbox with specific key words in the subject, says like "urgent" ..... what are the components that i need to integrate with?? messaging version 6.2

  • How can i upload old ipod music to imatch

    I have an old ipod with all my old cd music and want to consolidate in icloud so its available on iphone and ipad but every time I try to sync itunes trys to erase ipod content.... any ideas how to push all that ipod content up to icloud ???

  • Setting a global workbook

    Hello ,   I have created one workbook template, and did the setting for global template so that it can be used for all the workbooks. But the problem is-- its opening in 2003 but giving problem with 2007. I am not able to open it in 2007.

  • TS2446 I forgot my resuce email and my answers for the security questions. I need help please!!

    PLEASE HELP ME!!! THANK YOU!!