How can I execute a java class with arguments from an air application built from mxml?

I have an mxml application. It has a button, and when that button select event occurs, I want my mxml air app to pass arguments to a java class I have built, which resides in a package path on my system. I need to be able to pass several arguments to my java method from my mxml call. How do I do this, and what config files are necessary? For the simple task I want to engineer, can you show me an example of a properly configured config file? My java class has been executed at the command line in the past as follows:
java -cp %CP% com.abc.prism.queue.EmitMessage XYZ "my message text" 192.12.13.14 5672
where %CP% is an env variable that tells my class the classpath it runs with, and XYZ, "my message text", the IP address, and the port are the arguments I must pass from mxml to my java class. How do I accomplish this?
How do I make known to the java class I call from mxml the %CP% class path? It tells my java class where to find various rabbitMQ jars.

Hi,
You need to use Integration technology like BlazeDS or LCDS.

Similar Messages

  • How can i run my java program with out java language

    Hai to every one ..Iam new to java language ...am using windows xp operating system , i did not installed java language in my system .. how can i run a java program with out installing java language... Which files is requied to run java program..?
    any one can help me??

    Hai to every one ..Iam new to java language ...am
    using windows xp operating system , i did not
    installed java language in my system .. how can i run
    a java program with out installing java language...
    you ... can ... not ... do ... this
    Which files is requied to run java program..?
    any one can help me??a JVM. Download it from sun's website.
    [url http://java.sun.com/javase/downloads/index.jsp]Download JavaSE here

  • How can i run a java class file from shell?

    Hi all,
    I've a .class file named "File" that contains Main method, it is in the package "File2".
    How can I run it by shell command?
    PS: "java -cp . file" doesn't work it launch->
    Exception in thread "main" java.lang.NoClassDefFoundError: File2/File (wrong name: File2/File)
    Thanks in advance.

    Just to understand: is File2 ar jar archive or not? If it is a jar archive, have you tried open File2.jar? If File2 is a directory within the current directory, have you tried java -cp . File2/File? I just tested with a set of classes and it works... Let me be precise:
    * Let us imagine you are working in a directory whole path is PathToDir/
    * in this directory you have the classes put in a directory called File2
    * in order to launch File.class then you would have to invoke :
    cd PathToDir/ (just to be sure)
    java -cp . File2/File
    *if you were to do the following then you would have the problem you describe
    cd PathToDir/File2/
    java -cp . File

  • How can I call a java class from within my program?

    I was wondering if there's a platform independent way to call a java class from my program.

    Here's my scenario. I'm working on a platform independent, feature rich, object-oriented command prompt program. The way I'm designing it is that users can drop classes they write into my bin directory and gain access to the class through my program. For example, they drop a class named Network.class in the bin directory. They would type Network network at my command prompt and gain access to all the methods available in that class. They can then type system.echo network.ipaddress() at my prompt and get the system's ip address. I have it designed that there's a server running in the background and the clients connect to my port. Once connected the end-user can enter their user name and password and gain access to the system. When they type a command they actually call another java program which connects to my server using a seperate thread. They can then communicate back and forth. I have it set that everything has a process id and it's used to keep track of who called what program. Once the program is done it disconnects and closes. Rather than getting into the nitty gritty (I didn't want to get into heavy detail, I know how everything will work) I'm really interested in finding out how I can call a java program from my program. I don't want it to be part of the app in any way.

  • How can i mention a java class in the form's action=" ...."  in jsp

    if i am not using struts frame work, how can i call?
    i am not using any of the frame work.
    for example.
    i am searching for a customer name from a database
    i have coded the form fields in jsp
    as
    <%@page session="true"%>
    <%@page errorPage="ErrorPage.jsp"%>
    <%@page import="com.krysl.model.*"%>
    <jsp:useBean id="model" scope="session" class="com.krysl.model.webmodel"/>
    <html>
    <head>
    <title>Customer Seach</title>
    <jsp:include page="SetBaseURL.jsp" flush="false"/>
    <link rel="stylesheet" href="http://forums.sureshkumar.net/style.css">
    </head>
    <body>
    <jsp:include page="Banner.jsp" flush="false"/>
    <h1>Customer Search</h1
    <form method="POST" action=".......................">
    <b>Customer Name</b>
    <input type="TEXT" name="customerSearchArgument" size="20">
    <input type="submit" value="search">
    </form>
    </body>
    </html>
    this "customerSearchArgument" will receive a class method
    package com.krysl.controller;
    import java.io.*;
    import java.sql.SQLException;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import com.krysl.model.*;
    * @author dsdc
    public class customersearchaction extends Action
    public void run() throws ServletException, IOException
    String arg = request.getParameter("customerSearchArgument");
    if(arg != null)
    arg = arg.trim();
    if(!arg.equals(""))
    try
    model.customerSearch(arg);
    catch(SQLException e)
    throw new ServletException(e.getMessage());
    final String next = "/CustomersList.jsp";
    RequestDispatcher rd = application.getRequestDispatcher(next);
    if(rd == null)
    throw new ServletException("Could not find" + next);
    rd.forward(request, response);
    All other database connections and related things i coded in
    some other classes webmodel, model, controller servlets etc....
    in the above class the model.customerseach(arg);
    will do all the searching.
    my doubt is how to call this method in that action="" of jsp
    i tried as action="com.krysl.model.customersearch"
    action="com/krysl/model/customersearch"
    its not working
    please letme kno
    urget
    thank you

    Hi.
    go to otn.oracle.com/products/forms and get infromation about PJC and JavaBeans in Forms. The keyfilter example is available as sample as well. However, the link temporarily doesn't work
    All Forms demos and code sources: http://download.oracle.com/otndocs/demos/Forms_Demos_10gr2.zip
    Frank

  • How Can I execute a java program using java code?

    {color:#000000}Hello,
    i am in great trouble someone please help me. i want to execute java program through java code i have compiled the java class using Compiler API now i want to execute this Class file through java code please help me, thanks in advance
    {color}

    Thanks Manko.
    i think my question was not clear enough.. actually i want to run this class using some java code . like any IDE would do i am making a text editor for java, as my term project i have been able to complie the code usign compiler api and it genertaes the class file but now i want to run this class file "THROUGH JAVA CODE" instead of using Java command. I want to achive it programatically. do you have any idea about it.. thanks in advance

  • How can  I access my java class file in a .jar file ...PLz Help anyone!!

    Hi Folks,
    I am new in Java programming, have a .jar file that contains .java files that I want no access and use from another .java file. These files in the .jar file basically form a library thus have no main-method. However I can not declare an instance of the library (in the .jar file) and use it within my program.
    Plz help ...I have tried all I know in vain.
    Thanks.

    temba wrote:
    Hi Folks,
    I am new in Java programming, have a .jar file that contains .java files that I want no access and use from another .java file. These files in the .jar file basically form a library thus have no main-method. However I can not declare an instance of the library (in the .jar file) and use it within my program. You are making little sense. You can't instantiate .java files.
    Plz help ...I have tried all I know in vain.
    Thanks.Could you post WHAT you have tried and also post what error messages you received?

  • How can I execute a java program from a Servlet?

    Thank You
    [email protected]

    You could call it via Runtime.exec(), just as you would from any Java program. Or better, you could redesign it as a proper Java class. Then your servlet could create an instance of the class and call its methods as necessary.

  • How can I sync my email contacts with my new ipad air 2 and my PC?

    How can I sync my PC email contacts with my with my Ipad air 2 ?

    http://www.apple.com/support/iphone/syncing/

  • How can i get all java class names from a package using reflection?

    hi,
    can i get all classes name from a package using reflection or any other way?
    If possible plz give the code with example.

    You can't, because the package doesn't have to be on the local machine. It could be ANYWHERE.
    For example, via a URLClassLoader (ie from the internet) I could load a class called:
    com.paperstack.NobodyExpectsTheSpanishInquisitionI haven't written it yet. But I might tomorrow. How are you going to determine if that class is in the package?
    This subject comes up a lot. If you want to do something a bit like what you're asking for (but not quite) there are plenty of threads on the subject. Use google and/or the forum search facility to find them.
    But the answer to your question, as you asked it, is "you can't do that".

  • Can't execute a main class with jar file loaded on command line

    Hello Guys,
    I try to use the following command to execute a main metod from msword class.
    java -cp f60all.jar:jacob.jar msword
    and i receive:
    Exception in thread "main" java.lang.NoClassDefFoundError: msword
    If i extract the 2 jar files then i can execute the main metod:
    java msword
    Can anyone explainme whet is happening ?
    Thanks,
    /Marian

    Hi!
    You need to include the directory where your class is in your classpath... you can use for this the "."
    So, you should write something like
    java -cp .;f60all.jar;jacob.jar msword
    and this supposing that "f60all.jar", "jacob.jar" and "msword.class" are all in the same directory from which you are trying to run the program... in other case write the full paths for the files...
    Bye!

  • How can we call one java class in another java class?

    Hi all,
    My problem is ,
    one java code creates a file i have to send that file through email as an attachment here i wrote a java code to send a mail with attachment
    can any one help me how i can implement this. my idea is to write a send mail function in 1st java code which creates the file
    Is this a better idea ???plz suggest me.

    Hi all,
    My problem is ,
    one java code creates a file i have to send that file
    through email as an attachment here i wrote a java
    code to send a mail with attachment
    can any one help me how i can implement this. my idea
    is to write a send mail function in 1st java code
    which creates the file
    Is this a better idea ???plz suggest me.may samaaj nahi atay

  • How can I load my java class dynamically ???

    Hi guyz !
    Please look on my problem:
    1. I write code under Windows.
    2. I have file testcls1.java with class by name 'TestCls1'. /package 'hs0'/
    3. I try to use method Class.forName.
    4. File on disk is "c:/shttpsrv0/SrvFiles/java/testcls1.java".
    5. I get exception ClassNotFound.
    Question: what is right way to write first parameter for method ???
    Thanx in advance !

    Hi guyz !
    Please look on my problem:
    1. I write code under Windows.
    2. I have file testcls1.java with class by name
    'TestCls1'. /package 'hs0'/
    3. I try to use method Class.forName.
    4. File on disk is
    "c:/shttpsrv0/SrvFiles/java/testcls1.java".
    5. I get exception ClassNotFound.
    Question: what is right way to write first parameter
    for method ???Class.forName can use *.class files only. If you have *.java file, you have to compile it first. Moreover, Class.forName uses CLASSPATH. If you want to provide the exact location of *.class file, try to use URLClassLoader.

  • How can I create a horizontal scrollbar with a centered thumb that scrolls content from both sides?

    I am having trouble figuring out how to create a horizontal scrollbar component either by itself or nested inside a data list component that will have it's thumb centered in the track when running and reveal content from either the right or left side when the thumb is moved. The furthest I have managed to get is to create a data list component with a scrollbar component inside that has a centered thumb that reveals content from the right side of the list (0 through 10 of the items) but only reveals blank area when tracking the other way. Is there a way to create say… negative items in the data list… 0 through -10? Or am I approaching this the wrong way. Please help. Thanks.

    Mykola,
    Thanks. I guess I was hoping for an answer that addressed my question from a designer's point of view rather than a developers'. As a designer with over ten years experience using Adobe products for print work it is difficult to understand why "centered" is such a complicated concept when designing art for use on the web. It is so frustrating to realize that most containers for images and text can only be resized by pushing and pulling handles located on the right and bottom; Catalyst seems like a great start but if Adobe really wanted to impress the "design" community it might consider putting all that supercharged code underneath the hood of some more familiar "design" tools. Maybe a "catalytic converter" would allow the introduction of a "centered" tool for every element.
    After all, why is it literally twenty-five times more difficult, requiring the use of three additional programs to create a component that functions exactly like a typical data list and scroll bar with the exception that the thumb is "centered" on the track and reveals images from both the right and left. For that matter why not also have as an option a thumb that snaps to the bottom of the track and reveals images from the top… and one that snaps to the right and reveals images from the left when you run the project? It just seems so logical to expand the scroll bar component to include these options.
    I am very glad to have Catalyst and will redesign my project to fit within the constraints of the tools available in the program but it seems that if Adobe is really serious about Catalyst being a window into the world of web design for designers/AD's that perhaps it might benefit by focusing on what might improve the program from the designer's point of view. I hate to say it but the Catalyst forum is already rife with answers to questions that are riddled with code… Literally. And to be honest most designers don't have the time to decipher that code. As a designer I work regularly and have a deep understanding of Photoshop, InDesign, Illustrator, Acrobat Pro, Final Cut Pro, Final Draft and modo. I do hi-res assembly, retouching, design and layout, identity, production, 3D modeling and rendering, video editing… and before I switch to using Catalyst for web mock-ups I am going to need a more "designer" friendly set of tools and definitely a "centered" control.
    I really think Adobe is fantastic. But I also think it could take a lesson from a great little company called Luxology. I tried learning 3D modeling and rendering for years with programs like Lightwave, Maya and others, always with mixed results. Then Luxology came along and actually delivered on their promise to create a 3D program for artists. What was the factor that made all the difference? Well, besides the Apple award winning interface and sets of tools it was the training available on their sight. The program itself ships with thirty-six hours of quicktime movies. And hundreds more hours available for download. I have never yet not been able to quickly and easily find an answer to a question I had about how to accomplish something in modo. You know how long I have already spent on Adobe TV searching through videos and on the Catalyst forum searching through topics trying to get an answer to what I thought was a very simple question? Way too many. If I have a question about a Luxology product that I can't find the answer to do you know what I do? I call Brad Peebler, the President of Luxology. I'm not special nor do I work for some special development house with special privileges that is simply their policy. And that policy has paid big dividends. Both ILM and Pixar has licensed their technology.
    Well… I apologize for this long response but I really think that if Catalyst is going to attract the market it wants that it will have to consider putting some designers on the development team. After all… Isn't that what the promo videos tout… Finally a web design program for designers. Well, I guess we'll see.
    Karl

  • How can i execute vb scripts in java program

    hi
    how can i execute any batch files or any other exe files (vb scripts) from java programs
    thanks

    Hi,
    You use Runtime.exec to execute commands / exe-files. See the documentation (and remember that it will only work on windows):
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html
    /Kaj

Maybe you are looking for

  • Bookmarks not syncing between 2 PCs

    Hi I just installed Firefox on a new PC and wish to use it to keep my 2 PCs synchronized. Both PCs use the new version of Sync and latest version of Firefox. However bookmarks don't sync. I had XMarks and desactivated it but it still does not work. I

  • Breaking iWeb's Link to MobileMe

    Hello, As I have mentioned in the past in Discussions, I have a website that I have created in iWeb '08.  I publish this website to a folder, then upload using Cyberduck.  When I upgraded to Lion, I had some trouble choosing domains, but I have since

  • Want JDk 1.4 for Linux(64 bit) RHEL4

    Hi all, I want to download JDK 1.4 for Linux 64 bit. I checked on sun.java.com,But I just got JDK 1.4 for 32 bit Linux machine. And there is JDK for 64 bit Linux intel itanium, which i m not abe to install on my Liux machine (with AMD architecure). D

  • T510 Blank screen occasionally when resuming from sleep

    I've been having a lot of trouble with my video driver recently on Windows 7 32-bit Right now I have the NVS 3100M driver version 8.17.12.8562 installed. When resuming, the screen will go bright pink for a moment then show the login screen, but once

  • Restore Oracle Backup into New Oracle Database

    Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production PL/SQL Release 9.2.0.7.0 - Production CORE 9.2.0.7.0 Production TNS for HPUX: Version 9.2.0.7.0 - Production NLSRTL Version 9.2.0.7.0 - Production I need the steps on how to restore a b