Re: Error using JMF within a Java Application

I found the solution. I needed to add the DLLs included by JMF in the Windows\System32 folder to my application's classpath.
For those who might not know, the DLLs are:
windows\system32\jmacm.dll
windows\system32\jmam.dll
windows\system32\jmcvid.dll
windows\system32\jmdaud.dll
windows\system32\jmdaudc.dll
windows\system32\jmddraw.dll
windows\system32\jmfjawt.dll
windows\system32\jmg723.dll
windows\system32\jmgdi.dll
windows\system32\jmgsm.dll
windows\system32\jmh261.dll
windows\system32\jmh263enc.dll
windows\system32\jmjpeg.dll
windows\system32\jmmci.dll
windows\system32\jmmpa.dll
windows\system32\jmmpegv.dll
windows\system32\jmutil.dll
windows\system32\jmvcm.dll
windows\system32\jmvfw.dll
windows\system32\jmvh263.dll
windows\system32\jsound.dll
Edited by: alvarocavalcanti on Jul 9, 2008 12:07 PM

There's a way, take a look at the javax.swing API documentation.

Similar Messages

  • Trying to call a program within a Java application

    Hi,
    I am trying to call a program from within a Java application.
    Here's my code:
    // the program siftwin32 takes it's input via < and outputs using >
    String command = "C:/Demo/siftDemoV4/siftDemoV4/siftWin32.exe < c:/demo/query.pgm >c:/demo/query.key";
    Process p = Runtime.getRuntime().exec(command);
    int val = p.waitFor();
    The program "siftwin32" never executes. That is, the .key file is never generated. The value returned from the waitFor() is 1 which I know is bad.
    I'm not sure what the problem is. Running siftwin32 from the command line works fine.
    Any help would be greatly appreciated!
    Thanks,
    Neal
    Edited by: nealchecka on Nov 28, 2007 10:01 PM

    It's probably being executed; you're just passing it bad arguments and confusing it.
    The < and > operators are something that the shell uses. They're not arguments to programs typically. When you run it from the command line, it's going through a shell (the command line is the shell, that is to say a program for running other programs).
    When you run Runtime.exec, it doesn't go through the shell. The program is executed directly. If you use the version of exec() that takes a single string argument, the string is tokenized on whitespace and the tokens are used as the executable and its arguments.
    You have a few options.
    One is to write a shell script (or I guess a batch file on windows) that does the i/o redirection, and invoke that script.
    Another can be to send all these arguments to the shell by passing them on the command line to the shell, or to "start" or something (I'm not sure about what Windows does specifically). You can find examples online.
    Or you can do the redirection yourself, in the Java program. After you exec, use the resulting Process object to get the standard input, standard output, and standard error streams, and write/read/read those streams. If you like you can read from or write to files with those streams. Personally I generally prefer this option, since it has less dependency on the OS, and it's more flexible, and it's more tightly integrated into the Java class.

  • Error while performing SSO with java application

    hi ALL ,
    I got rhe following error when i call a java application in portal  using ticket logon sso
    Exception report
    message Internal Server Error
    description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
    exception
    com.sap.test.TicketVerifierException: Request does not contain cookies
         at com.sap.test.TicketVerifierServlet.getSSOCookie(TicketVerifierServlet.java:149)
         at com.sap.test.TicketVerifierServlet.getUserFromRequest(TicketVerifierServlet.java:94)
         at com.sap.test.TicketVerifierServlet.doPost(TicketVerifierServlet.java:80)
         at com.sap.test.TicketVerifierServlet.doGet(TicketVerifierServlet.java:68)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
         at java.lang.Thread.run(Thread.java:484)

    Hi Sarang,
    It seems you are following the two basic pre-req.
    It may be now possible that your browser might be not allowing cookies. Which browser are u using? Version etc?
    Right now u can try two things:
    1) When you have logged into portal, type the following command in the adress bar "javascript:alert(document.cookie)". This will give u a popup displaying the cookies formed when logged into portal
    2) Use some software like HTTPWatch or ieHeaders and find out the details. It will give you all the cookie details etc.
    You should be able to see the JSESSIONID, MYSAPSSO2 cookies...Let me know the result of above..
    Regards
    Gaurav

  • Can I use Streaming Video in Java Application?

    Will i be able to use Streaming Video in Java Application, if yes can anyhow out there pls teach me how to do it... thanks...

    read up on the Java Medai Framework http://java.sun.com/products/java-media/jmf/index.html

  • Using JDBC in multithreaded Java application?

    Hello everyone
    Is it supported to use JDBC in multiple concurrent threads of a single Java application?
    I intend to use Java 7 (or even Java 8?) from standard Java multi-threaded library to access the following: Oracle 11g/12c and Microsoft SQL Server 2012-2014 and also PostgreSQL 9.4+.
    The Java dababase client application will run on Linux and on Windows (64-bit).
    If its supported to use JDBC in multi-threaded way - will it scale up well or am I better off using mutiple single-threaded Java applications instead?
    Are there any rules to follow when using JDBC from multiple-concurrent threads (such as: do not share any JDBC objects among threads, etc).
    Thank you
    Yuri Budilov

    Is it supported to use JDBC in multiple concurrent threads of a single Java application?
    Of course.
    I intend to use Java 7 (or even Java 8?) from standard Java multi-threaded library to access the following: Oracle 11g/12c and Microsoft SQL Server 2012-2014 and also PostgreSQL 9.4+.
    You should use a separate connection pool for each database.
    See the JDBC Dev Guide and use the latest Oracle driver and the latest connection methods shown in that doc
    http://docs.oracle.com/cd/E11882_01/java.112/e16548/toc.htm

  • How to use " toFront() " method in java application and in which package or

    How to use " toFront() " method in java application and in which package or class having this toFront() method.if anybody know pl. send example.

    The API documentation has a link at the top of every page that says "Index". If you follow that and look for toFront(), you will find it exists in java.awt.Window and javax.swing.JInternalFrame.
    To use it in a Java application, create an object x of either of those two classes and write "x.toFront();".

  • Using Unix commands from Java Application

    Hi,
    I need to write an Java application such that could run Unix commands in a Unix box.
    For example, my Java app needs to log in the Unix box, change directory (cd), create new folder (mkdir), list the current files in folder (ls), mount a new device (mount), etc.
    Thank you very much.
    Hung

    you can use java.lang.Runtime.exec to invoke OS commands, but if you're going to be completing a sequence that complicated and need to manage error handleing well, it might be best to just invoke a native method or write a shell script that does all of that stuff and then invoke that script via Runtime.exec . The Runtime class has limitations when you start invoking processes that require user input (like 'su'). Search the forums for more extensive examples on how to use Runtime.

  • Error sending IDOC from external Java application to Sap ERP system

    Hi Experts!
    When I try to send Idoc from Java application to XI an error occurs : no service for system CLNTJAVA, client in Integration Server.
    My question is: What value the setSenderPort() is excepting?The Java third party business system's logical name or the ERP business system's logical name where the JCO can be found?I tried both of them, but still have the problem.
    Please help. I read all threads about this error, but non of those can help me.
    My relevant java sourcecode:
                doc.setSenderPort("CLNTJAVA");
    The XI documentation says that:In the case of non-SAP senders, the entry in the SNDPOR field is interpreted as a logical system name, and the corresponding business system is searched for in the runtime cache.
    Both case(third party business sytem and erp business system) I have configured the ID    i think correctly. I  made a business systems,I configured the adapter specific identifies,I  made the IDX1 port,I made the RFC destination,I polled the IDOC type with IDX2 transaction, I have made full cache refresh,I configured the INTEGRATION_DIRECTORY_HMI rfc destination,but I do not made any communication channels, receiver determinations, receiver agreement.
    My configurations if it can help for you.
    Hostname:sapsp5
    System name: NE2
    Clients:
    000 ERP
    001 Integration Server
    <b>SLD configurations:</b>
    Third Party Technical system name: Java_sytem
    Business System:CLNTJAVA
    Logical system name: CLNTJAVA
    <b>ID configurations:</b>
    Business System:CLNTJAVA
    adapter-specific identifiers:logical system:CLNTJAVA, <u>the rest is initial</u>,because I cant change it.
    IDX1 port name: CLNTJAVA the client is 001. the rfc destination is client_001.
    I think the IDX1 port and the adapter specific identifiers are wrong. is it?
    my java source if the sender is the JCO
    doc.setSenderPort("INTSERV");
    My configurations if the sender is the JCO.
    <b>SLD configurations:</b>
    Technical system name: NE2
    Business System:INTEGRATION_SERVER_NE2
    Logical system name: INTSERV
    <b>ID configurations:</b>
    Business System:INTEGRATION_SERVER_NE2
    adapter-specific identifiers:logical system:INTSERV,system NE2,client 001.
    IDX1 port name: INTSERV the client is 001. the rfc destination is client_001.
    Could this error be an autorization error?I tired to connect to the xi from the Java, with the user PIISUSER extended with PISUPER roles.
    Thank very much.

    Hi!
    My SNDPOR already set to my source business system's logical name if you check my configurations(JAVACLNT), so there is another problem unfortunately. I set SNDPRN to JAVA, but it still does not work.
    Check this configuration please(posted here:
    No service for system ... in Integration Directory)
    doc.setMessageType("ACC_DOCUMENT");
    doc.setRecipientPort("SAPSE1"); // get stuck in XI mapping if not set
    doc.setRecipientPartnerType("LS");
    doc.setRecipientPartnerNumber("SE1CLNT500");
    <b>doc.setSenderPort("SAP3MA");</b>
    doc.setSenderPartnerType("LS");
    <b>doc.setSenderPartnerNumber("TREMACLNT");</b>
    doc.setClient("100");
    Inside XI configuration integration builder
    <b>Business Service: Service: TREMACLNT</b>
    Under the menu Service - Adapter specific identifiers
    Idoc Adapter Logical system: TAPPMAN (This thing is important when sending idoc XI -> SAP and should match the logical sys in the receiving SAP system)
    IDoc Adapter and RFC adapter R/3 Sysytem ID: 3MA
    Client: 100
    In IDX1 trans
    <b>Port: SAP3MA</b> (Note that the 3MA here is matched against the IDoc Adapter and RFC adapter R/3 Sysytem ID: 3MA)
    (a not so well documented feature)
    Client: 100
    RFC Destination: SE1 (A SAP test system from where IDOC def can be imported, rfc dests are setup in SM59)
    I guess that your idx1 port name is the same as the SNDPOR value. I think it should be, because the XI is whatching the IDOC traffic in the idoc adapter port, so you should send the IDOC from external system to the adapter port. Is it right?
    My idx1 port is the same as my SNDPOR value in Java,but still came the error.

  • HOW TO use OCX controls with Java application

    hi
    Is it possible to use microsoft Ocx controls in java applications.

    Anything is possible. You might want to ask if it's a good idea, but look at some of the people who have asked before. It looks like there are products out there to help.
    http://search.java.sun.com/search/java/index.jsp?qp=&nh=10&qt=%2Btitle%3Aocx&col=javaforums&x=19&y=13

  • How to use a proxy with java applications?

    I have a nokia 6300 type s40v3
    hello,
    I would like to know if it is possible to use a proxy of any and how ? kind with java applications.
    thank you

    Well, it works well when, into my applet, i do somethig like this:
    URL url = new URL(host);
    URLConnection connexion = url.openConnection();My applet uses proxy setting from IE6 but only if i use Java 1.4.2_08.
    With IE6 and Java 1.5.04, it doesn't work (my applet doesn't use proxy settings)
    With Firefox and Java 1.5.04, it's ok
    Have you already seen a problem like this with Java 1.5.04 ?

  • Using Flex components in Java application

    Hello,
    I was learning Flex previously, and I thought I remembered reading somewhere that I can use Flex UI components in a Java application. For instance, I could use Flex for the UI, and Java for the backend. I can't find though the documentation for this. I read this last summer. I don't mean using Flex as a UI in a browser and Java on the server, but a Java application that runs on the client with a Flex UI. I thought what I needed was the flex compiler api, but I looked at the flex compiler api documentation and it isn't what I want.
    Does anyone know what this "part" of Flex is that I am talking about, but can't remember?
    Thanks,
    Vance

    No, thanks, but that wasn't what I was thinking of.
    What I remember looking at was some library that allowed wrapping Flex UI componnts in Java Swing components. Then the Swing components could be used in the Java app. One main objective of my wrapping Flex in Java is to use flash.media.Video class to play flash video.

  • How can I execute an IE browser window from within my java application?

    I am programming a java application that requires me to execute a browser application and point to a specific web site. How can I do this? I cannot seem to find any examples on the web.

    Hi Heals,
    This forum is for discussing Measurement Studio for Visual Basic and is not really a good place to ask general purpose Java questions. I suggest searching one of the comp.lang.java.* newsgroups at http://groups.google.com/.
    Off the top of my head, though, I would say take a look at the Runtime.exec method.
    - Elton

  • Using xml file in java application

    How can i get the attribute name & value into my java application from a xml flie?

    read the file
    parse the contents
    store attribute name & value pairs.
    %

  • Error when running "Run as" Java application from NWDS

    Dear All,
    I am trying to run the following .java proggie...
    Thanks for that. By the way, I am now trying to compile the following .java program.....
    Created on 01-Oct-2007
    To change the template for this generated file go to
    Window>Preferences>Java>Code Generation>Code and Comments
    @author chris.jackson
    To change the template for this generated type comment go to
    Window>Preferences>Java>Code Generation>Code and Comments
    import com.sap.lcr.api.cimclient.CIMClient;
    import com.sap.lcr.api.cimclient.CIMClientHandle;
    import com.sap.lcr.api.cimclient.CIMOMClient;
    import com.sap.lcr.api.cimclient.ClientFactory;
    import com.sap.lcr.api.sapmodel.SAP_AppServJCODestination;
    import com.sap.lcr.api.sapmodel.SAP_JCODestination;
    import com.sap.lcr.api.sapmodel.SAP_JCODestinationAccessor;
    import com.sap.lcr.api.sapmodel.SAP_MsgServJCODestination;
    import com.sap.mw.jco.JCO;
    import com.tssap.dtr.client.lib.protocol.URL;
    public class sldpoke {
    public void main() {
    ClientFactory factory = ClientFactory.newInstance();
    try {
    final URL url = new URL("http://ex1d002a.eu.unilever.com:58300/sld/cimom");
    String sldUsername = "cjacks01";
    String sldPassword = "password";
    CIMOMClient cimomClient = factory.createClient (url, sldUsername, sldPassword);
    CIMClient cc = new CIMClient(cimomClient);
    CIMClientHandle cch = (CIMClientHandle) cc;
    SAP_JCODestinationAccessor jcoAccessor = new SAP_JCODestinationAccessor(cc);
    SAP_JCODestination[] jcoDestinations = jcoAccessor.enumerateSAP_JCODestinationInstances();
    JCO.Client jcoClient = null;
    String user = null;
    String pwd = null;
    // iterate over all destinations
    for (int i = 0; i < jcoDestinations.length; i++)
    SAP_JCODestination jcoDestination = jcoDestinations;
    user = jcoDestination.getLogonUser();
    pwd = jcoDestination.getLogonPwd();
    if (jcoDestination instanceof SAP_AppServJCODestination)
    SAP_AppServJCODestination jcoDest = (SAP_AppServJCODestination) jcoDestination;
    jcoClient = JCO.createClient(jcoDest.getLogonBCClient(),
    user,
    pwd,
    jcoDest.getLogonLanguage(),
    jcoDest.getAppServHost(),
    jcoDest.getAppServNumber());
    else if (jcoDestination instanceof SAP_MsgServJCODestination)
    SAP_MsgServJCODestination jcoDest = (SAP_MsgServJCODestination) jcoDestination;
    jcoClient = JCO.createClient(jcoDest.getLogonBCClient(),
    user,
    pwd,
    jcoDest.getLogonLanguage(),
    jcoDest.getMsgServHost(),
    jcoDest.getSAPSystemName(),
    jcoDest.getLogonGroup());
    } catch (Exception e) {
    and I am getting the message "The selection does not contain a main type". The class contains a 'main' function so I am at a loss as to what the problem is. Any ideas how I progress?
    Kind Regards
    Chris Jackson.

    Hi! Jakson,
       to run a Stand-alone Java application, we must have one main() method like...
    public static void main(String args[]){ }
    i can't see this main() method on your appliation.
    regards,
    Mithileshwar

  • How to use OLE Components in Java Application?

    Hi,
    I try to make program that is able to include OLE components( Excel sheet, MS Word document, and so on ), and that can control these components.
    I want to know that Java Application or Applet can control and show OLE components like JavaBeans components. If that, How to ?

    Try this to generate a Word file.....
    import com.jacob.activeX.*;
    import com.jacob.com.*;
    public class ExportDOC {
    public ExportDOC () {
    //Application type
    ActiveXComponent doc = new ActiveXComponent("Word.Application");
    //Application visible
    doc.setProperty("Visible", new Variant(true));
    Object documents = doc.getProperty("Documents").toDispatch();
    //Open a file already exits
    //Object document = Dispatch.call(documents, "Open", "c:/nameFile.doc").toDispatch();
    //Open a new file empty
    Object document = Dispatch.call(documents, "Add", "").toDispatch();
    Object selection = Dispatch.get(doc,"Selection").toDispatch();
    //Text Format
    Object font = Dispatch.get(selection, "Font").toDispatch();
    Object alignment = Dispatch.get(selection, "ParagraphFormat").toDispatch();
    Object image = Dispatch.get(selection, "InLineShapes").toDispatch();
    //I put the selection at the end of the file for if I want to add text
    //Dispatch.call(selection, "EndKey", "6");
    //Text format (bold & italic)
    Dispatch.put(font, "Bold", "1");
    Dispatch.put(font, "Italic", "1");
    //To jump line
    Dispatch.call(selection, "TypeParagraph");
    //Align center (0= left, 1=center, 2=right, 3=justify)
    Dispatch.put(alignment, "Alignment", "1");
    //Insert image
    Dispatch.call(image, "AddPicture", "c:/graf.jpg");
    Dispatch.call(selection, "TypeParagraph");
    Dispatch.put(alignment, "Alignment", "3");
    //Insert Text
    Dispatch.call(selection, "TypeText", "Text ....... ");
    //Original values
    Dispatch.call(selection, "TypeParagraph");
    Dispatch.put(alignment, "Alignment", "0");
    Dispatch.put(font, "Bold", "0");
    Dispatch.put(font, "Italic", "0");
    //To jump page
    //Dispatch.call(select, "InsertBreak");
    //Save the document
    //Dispatch.call(document, "SaveAs", "c:/test.doc");
    //Quit the application
    //dc.invoke("Quit", new Variant[] {});
    public static void main(String[] args) {
    ExportDOC e = new ExportDOC();
    but you must download 'jacob.jar' in....
    http://users.rcn.com/danadler/jacob/
    is a FREEWARE!!!
    regards!!

Maybe you are looking for

  • Supplier Statement - Print Layout Issue

    Dear Guys, Im trying to display a supplier ref no. on the suppliers liability ageing statement through the "BP Ref No" field. I am trying to grab the ref no entered through the AP Invoice field "Supplier Ref No" This field is sent through to Journal

  • Subscribe to this entry is not working, no notification email send to subscriber

    When we subscribe any entry by click the "Subscribe to This Entry". Normally, it should automatic send a notification email to the subscriber when this entry had any changed such as reply or modify. But we tried use this function on different users a

  • Flash Builder 4.5 for PHP - show variable from PHP in app

    I have searched for hours and I can't figure this out- Is there a way to somehow "echo" my PHP code in my MXML file ? I know you can't echo something from PHP to MXML, so here's what I have done : I get my informations from my database, I need to sho

  • Suddenly no internet audio os 10.6.8 firefox 24

    Hi...i suddenly have no internet audio, but itunes has audio. A Youtube video was playing music and suddenly the audio was gone. I have tried to listen to an UpWorthy video off of a FaceBook link and no audio for that either. Can anyone help? Thanks

  • How do i download the ios 4.3.

    how do i down load the ios to the i pod gen 1