Can one Java app return String[] to other Java app ?

I writed 2 applications.
One can trigger another to run ( System.exec(...) )
After finish, the second app needs return String[].
How I return the value ?
Any suggestion is welcome.

What are you trying to do?
Streaming data output as piping? OR
Two running apps communication? OR
One app calling another? OR .....

Similar Messages

  • I just bought an iMac, trying to transfer from my ibook pre intel 10.5.8 - how can i access my excel, word and other old apps?

    I bought a new IMac and a new TIme Capsule. The old compter - pre Intel Ibook running 10.5.8 is in the process of backing up. I transfered my apps and find I cannot acces any of my MS Office data, or my Quicken. Lots of stuff I really need there. Gotta be a way to use my old apps, all this data can't just be gone. HELP!

    all this data can't just be gone
    The data should be fine. But you will need to upgrade the Apps to open the files. For example, MS Office 2004 does not run in the newer OS. You will need to upgrade to MS Office 2008, or later version. The new version will open the older files.
    This is true for many Apps. This site has a compatibility table:
    http://roaringapps.com/apps?index=a

  • Can one button type play nicely with others?

    So, I'm creating this nice little movie that has 5 or so
    buttons on it (think: click on image to see painting, like a
    gallery) and I've got four of the buttons working nicely with a
    little help from my friend Actionscript 3.0 (eventListener and his
    friend gotoAndStop and some others). These buttons go to a new
    keyframe in the movie that contain the images for each button.
    Relatively easy.
    My question concerns the last button. This button wants
    information (text) to pop-up or go away when clicked irrespective
    of what frame the movie is on. I can't for the life of me figure
    out how to get this done. And in a related question, is it possible
    for this button to stay in it's down state until clicked again
    (like a pause/play button on a music player)?
    Sorry in advance for this lame question and thanks for any
    input.

    Either create a movieclip with text and control its
    visibility with the button, or have a textfield and assign/remove
    text.
    You cannot make a button hold a state when mouse events
    change for it. You can either create a movieclip version of it and
    control where it is in its own timeline, or have two buttons, one
    drawn for the normal state and one drawn for the down state, and
    control their visibility between each each on clicking them....
    click one, it makes the other visible and itself invisible,
    etc.

  • How can one stop switching Desktops to a newly opened app?

    If I am working on something, Chrome, Word, whatever, in one Desktop, and I start another app not to use immediately but to use in 5 minutes, it switches to that app's Desktop automatically, even if the app is not ready to use right away. I need to switch back. Earlier, I started Chrome, and it switched, so I switched back, then it switched again, so I switched back, then again. 3 times! How annoying is this. I am working in a different app, I dont need the new one in focus right away.
    So wondered if anyone knows a way to stop this?
    Thanks

    Note: I just found this which does stop it http://mactips.dwhoard.com/mactips/other-applications/spaces-auto-switching
    defaults write com.apple.dock workspaces-auto-swoosh -boolean NO
    BUT this also stops the Cmd + Tab application switcher which I use all the time!

  • Blackberry curve 8520 can't download apps always gives me other devices apps

    When trying to download apps for my BB curve 8520 always get other devices info I have internet access and. Used to be able to conect to a wifi called linksys now it seem I'm been blocked from all conections and info to my phone info called tmobile my sevice provider all iget from them is aditude. They say I shoudnt get apss for iphone nokias laptop ipads. My kids phones are temporarily off for none payment but can use it as amodem to a tmobile laptop. Is it posible they're useing my acount and made restrictions for my phone

    Hello Chrissie24, 
    Welcome to the forums. 
    Try not having your device plugged in while you are searching for the application and then when it asks for you to connect your device then connect it via USB. 
    -SR
    Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)!

  • I downloaded the newest version of 7.0.6.to my ipad air and now I can not connect to safari or any other online app. I get a trust this computer message? and I say yes(its mine) and then it says the software update in unavailable.

    Since I downloaded 7.0.6. update I can not connect to the internet. I want to remove it but the ipad air is not showing up in itunes. I get a message do you trust
    this computer, yes, and then I get software update in not available. What is wrong?
    Please help me.
    Thank You

    Since I downloaded 7.0.6. update I can not connect to the internet. I want to remove it but the ipad air is not showing up in itunes. I get a message do you trust
    this computer, yes, and then I get software update in not available. What is wrong?
    Please help me.
    Thank You

  • HT204088 An app I bought double charged me; the email receipt lists one as "in-app purchase" and the other as "app" Who would be best to go to for this?

    to be honest all I want is my $2.99 in store credit back.

    Contact with iTunes support to get a refund > http://www.apple.com/support/itunes/contact

  • Is it possible to write a Java file that creates/compiles other Java files?

    My goal is to write a program that writes files containing Java code depending on the user's input. That's the easy part. The tough part, I think, is to get the Java file to use the Java compiler to compile, and run, those newly created files.
    I know this sounds crazy, but I really want to get this to work.
    Can someone please tell me how to do this?

    You could use the eclipse compiler
    http://help.eclipse.org/help31/index.jsp?topic=/org.ec
    lipse.jdt.doc.isv/guide/jdt_api_compile.htm
    Or the one from the JDK (com.sun.javac.Main located
    in the JDKs /lib/tools.jar). But that won't work with
    an JRE unless you ship the tools.jar too. And it
    isn't what i would call an official API. So i would
    rather use the eclipse compiler. I did this once and
    it worked fine.it isn't what sun call an official API, either, which is somewhat more important! the license even used to restrict re-distribution of tools.jar (I think that's changed now)

  • IOS 7 Apple camera app - image size vs other camera app's image size

    Is there a way to change the image size on the IOS 7 Apple camera app.  On the iPhone 5s the image is 2448x3264, correct, and the image size was 1.96Mb.  The Camera+ is 3.63Mb and CameraAwesome was 1.57Mb.  I can adjust the image size with Camera+ and did so.  If the Apple Camera app is not adjustable then it looks like there is significant reduction in the resolution of images, at least compared to C+. 

    You probably want to post this in the Developer Forums. This is the general user forum.
    Best of luck.

  • Hello! My App store and some other preinstalled apps wont open. Please help!

    I've recently started to use my Macbook Pro, and some apps won't open. I've tried to update the software many times, but it still won't open. I really wan't to buy Lion from App store, but (once again) it won't open.
    I've also tried to use the Application Disc that comes with every Mac, put that doesn't work either, and when im trying the Software Update option it says no updates are availible.
    When I last used my Macbook Pro, I started to delete some programs that took space on my harddrive, and some of these programs were App Store, iPhoto and iMovie etc. When I use the Application Disc, only iMovie and iPhoto(etc. other programs) are updated.
    This shows up when I try to open App Store.
    Thanks in advance for helping
    Cheers, Carl

    And when I try to reopen, the same thing happens over and over again...

  • External java function that should return String array

    Hi everyone,
    I have a split function in plsql that takes 10 times longer a java tokenizer function that i was written. So, i want to use java external function to split my plsql strings into pieces.
    I can write a java external procedure that returns types like int, float and String types. I have no problem about it.
    My problem is returning an array of strings. I found a book that has an example about how can we get directory list in plsql with java external procedure.
    (code)
    import java.io.File;
    import java.sql.*;
    import oracle.sql.*;
    import oracle.jdbc.*;
    public class JFile {
    public static oracle.sql.ARRAY dirlist (String dir)
    throws java.sql.SQLException
    Connection conn = new OracleDriver().defaultConnection( );
    ArrayDescriptor arraydesc =
    ArrayDescriptor.createDescriptor ("DIRLIST_T", conn);
    File myDir = new File (dir);
    String[] filesList = myDir.list( );
    ARRAY dirArray = new ARRAY(arraydesc, conn, filesList);
    return dirArray;
    CREATE OR REPLACE FUNCTION dirlist (dir IN VARCHAR2)
    RETURN dirlist_t
    AS
    LANGUAGE JAVA
    NAME 'myFile.dirlist(java.lang.String) return oracle.sql.ARRARY';
    (code)
    I could compile this source file in localhost but not remotehost. There are jar files ( import oracle.sql.*; import oracle.jdbc.*; ) that should be added to remote classpath. ( others have already added java classpath ). But, which classpath i should add? Oracle has own JVM and Classpath, probably i should upload these jar files to oracle classpath. Am i wrong? How can i do? Can you explain in detail? How can i return string array from java external function in Oracle ?
    I am using Oracle 11.1.0.7 on Solaris Sparc Machine.

    Hi,
    What do you mean "compile in remote host"
    Aren't you using the loadjava tool? - that should be enough, the RDBMS already "has" the jars needed.
    [A must read|http://download.oracle.com/docs/cd/B28359_01/java.111/b31225/chone.htm#BABCFIIF]
    Regards
    Peter

  • How to get an XML string from a Java Bean without wrting to a file first ?

    I know we can save a Java Bean to an XML file with XMLEncoder and then read it back with XMLDecoder.
    But how can I get an XML string of a Java Bean without writing to a file first ?
    For instance :
    My_Class A_Class = new My_Class("a",1,2,"Z", ...);
    String XML_String_Of_The_Class = an XML representation of A_Class ?
    Of course I can save it to a file with XMLEncoder, and read it in using XMLDecoder, then delete the file, I wonder if it is possible to skip all that and get the XML string directly ?
    Frank

    I think so too, but I am trying to send the object to a servlet as shown below, since I don't know how to send an object to a servlet, I can only turn it into a string and reconstruct it back to an object on the server side after receiving it :
    import java.io.*;
    import java.net.*;
    import java.util.*;
    class Servlet_Message        // Send a message to an HTTP servlet. The protocol is a GET or POST request with a URLEncoded string holding the arguments sent as name=value pairs.
      public static int GET=0;
      public static int POST=1;
      private URL servlet;
      // the URL of the servlet to send messages to
      public Servlet_Message(URL servlet) { this.servlet=servlet; }
      public String sendMessage(Properties args) throws IOException { return sendMessage(args,POST); }
      // Send the request. Return the input stream with the response if the request succeeds.
      // @param args the arguments to send to the servlet
      // @param method GET or POST
      // @exception IOException if error sending request
      // @return the response from the servlet to this message
      public String sendMessage(Properties args,int method) throws IOException
        String Input_Line;
        StringBuffer Result_Buf=new StringBuffer();
        // Set this up any way you want -- POST can be used for all calls, but request headers
        // cannot be set in JDK 1.0.2 so the query string still must be used to pass arguments.
        if (method==GET)
          URL url=new URL(servlet.toExternalForm()+"?"+toEncodedString(args));
          BufferedReader in=new BufferedReader(new InputStreamReader(url.openStream()));
          while ((Input_Line=in.readLine()) != null) Result_Buf.append(Input_Line+"\n");
        else     
          URLConnection conn=servlet.openConnection();
          conn.setDoInput(true);
          conn.setDoOutput(true);           
          conn.setUseCaches(false);
          // Work around a Netscape bug
          conn.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
          // POST the request data (html form encoded)
          DataOutputStream out=new DataOutputStream(conn.getOutputStream());
          if (args!=null && args.size()>0)
            out.writeBytes(toEncodedString(args));
    //        System.out.println("ServletMessage args: "+args);
    //        System.out.println("ServletMessage toEncString args: "+toEncodedString(args));     
          BufferedReader in=new BufferedReader(new InputStreamReader(conn.getInputStream()));
          while ((Input_Line=in.readLine()) != null) Result_Buf.append(Input_Line+"\n");
          out.flush();
          out.close(); // ESSENTIAL for this to work!          
        return Result_Buf.toString();               // Read the POST response data   
      // Encode the arguments in the property set as a URL-encoded string. Multiple name=value pairs are separated by ampersands.
      // @return the URLEncoded string with name=value pairs
      public String toEncodedString(Properties args)
        StringBuffer sb=new StringBuffer();
        if (args!=null)
          String sep="";
          Enumeration names=args.propertyNames();
          while (names.hasMoreElements())
            String name=(String)names.nextElement();
            try { sb.append(sep+URLEncoder.encode(name,"UTF-8")+"="+URLEncoder.encode(args.getProperty(name),"UTF-8")); }
    //        try { sb.append(sep+URLEncoder.encode(name,"UTF-16")+"="+URLEncoder.encode(args.getProperty(name),"UTF-16")); }
            catch (UnsupportedEncodingException e) { System.out.println(e); }
            sep="&";
        return sb.toString();
    }As shown above the servlet need to encode a string.
    Now my question becomes :
    <1> Is it possible to send an object to a servlet, if so how ? And at the receiving end how to get it back to an object ?
    <2> If it can't be done, how can I be sure to encode the string in the right format to send it over to the servlet ?
    Frank

  • How to add videos in keynote (or other iwork apps)?

    Hi, How can I add videos in keynote(or other iwork apps)?
        I found that keynote can only add photos, but if I want to show the video in my slide , how can I make it? (my video is not take by my ipad, it is import from my computer, and my computer is Win7 ). Also how can I add the audio files as well?
       Does here some methods can save the ipad memory?
       Thanks alot.

    Hi,
    I have a similar problem. I transfered the videos I took with my ipod touch 4g 64gb and now I wanted to add them back into my ipod on photos Camera Roll. I went to the photos tab and checked "Include Videos" but everytime it starts to sync, Itunes stops working and a popout appears and says that Itunes encountered a problem and needs to shut. What can I do?

  • Starting Java application from other Java application..

    Hi all,
    I was wondering if it is possible to start a Java program from an other Java program.
    In Java program 1, I have this code to execute the other application:
    try {
        Process p = Runtime.getRuntime().exec("cmd /c java -cp JavaApp2.jar com.test.TestFrame");
    } catch (IOException e) {
    }I tried this code, but unfortunately I couldn't opened the other (JavaApp2.jar) Java Application. Is there a way to open the other application anyways?
    I really hope someone can help me. Help would be greatly appreciated! Thanks in advance.
    Tongue78.

    What if there is no JAR file?Then you can make it out of the .class files. And to anticipate your next question, if there are no .class files there is no application at all, so you can't exec() it or call the main() method directly. Your point?
    And JAR isn't part of the Java language.It is a major part of the Java platform.
    This means you can only get access to a JAR file via the OS. Wrong again. CLASSPATH. URLClassLoader.
    In short you cannot just shout main() in a Java program and hope some other Java program will hear you and start.Absolute rubbish. If the required classes are on the CLASSPATH you just call com.company2.app2.main(args) and off you go. Or you can load the main class and invoke its main() reflectively.
    No source code required, or 'source code merge' either.

  • I updated my ipad from IOS 5 to IOS 8. All games and apps that I downloaded was deleted. What can I do to return them back, even after downloading one of the games He deleded all the steps I went through and I need to start all over  again

    I updated my ipad 2from IOS 5 to IOS 8. All games and apps that I downloaded was deleted. What can I do to return them back, even after downloading one of the games He deleded all the steps I went through and I need to start all over  again

    iCloud: Restore or set up your iOS device from iCloud
    Or from iTunes  http://www.iphonefaq.org/archives/971992

Maybe you are looking for

  • How to attach more than one word document to an email?

    Hi there.  I've recently acquired an Ipad which I want to use while I'm out and about.  I generally respond to emails with attachments.  How do i go about doing this on the Ipad?  I've got a gmail address and making use of the gmail app to send and r

  • Error installing SOA in Solaris 10 x86 VM

    I am trying to install SOA 11.1.1.2.0 on Solaris 10 x86 VM machine. When the runInstaller is invoked from Disk1, i get the following error and the installer quits. Any clues? -bash-3.00$ ./runInstaller ./runInstaller: /export/home/oracle/ofm_soa_gene

  • Do multiple EJB servers coordinate?

    At the moment, we are using Apache with Jakarta on the web server, which invokes EJBs on Oracle on a different box. Only the Oracle box thus has an EJB server and container, and at the moment all our EJBs are for database access only. Now, if we want

  • My new clio will not pair with my iphone5s,

    renault are nice enough but cant help, hubby updated media nav , it made no difference,  it says its paired but isnt, and now and again handsfree not connected shows under the `medianav connected, ?

  • How do we create a java applet that creates a screencast/

    Does anyone know about any open source code that can create a screencast? I necessarily want it to be a java appplet as I want to embed the applet to be captured at the client side. My clients dont have any security restrictions imposed on their mach