2 Replies Latest reply on Nov 9, 2010 1:21 AM by proyb

    Nativeprocess and command line bug?


      I having an issue with NativeProcess which I believe is a bug? I could execute my java code using "-jar \java\Chat.jar" in Flex however when using Java classpath (-cp) it won't work no matter I try many combination even tried File.applicationDirectory.nativePath to the xSocket.jar


      private function ChatRoom():void {
      var arg:Vector.<String> = new Vector.<String>;
      arg.push("\"C:\\Users\\Wildfire\\Adobe Flash Builder 4\\TransmissionDemo\\bin-debug\\java\\xSocket.jar\";.\\java\\Chat.jar Chat -n room1");
      npInfoDump = new NativeProcessStartupInfo();
      npInfoDump.executable = new File("C:\\Program Files\\Java\\jdk1.6.0_22\\bin\\java.exe");


      npInfoDump.arguments = arg;


      npDump = new NativeProcess();


      The trace shown:

      -cp "C:\Users\Wildfire\Adobe Flash Builder 4\TransmissionDemo\bin-debug\java\xSocket.jar";.\java\Chat.jar Chat -n room1


      Which is I am able to run on commandline but not in AIR 2.0, more than 20 of us are stretching our head why it doesn't work. I need urgent help on this to complete my major project by next week.

        • 1. Re: Nativeprocess and command line bug?
          sanika Kulshreshtha Adobe Employee

          There is an exact one to one mapping between the arguments you pass and the arguments that are provided to the native process. Could you trying pushing all the process arguments to arg separately?



          • 2. Re: Nativeprocess and command line bug?
            proyb Level 1

            Yes, it is separately. For another experimenting, I'm running multi-chatroom

            on xSocket in Java, I tried to get NP launch the chat (client) also created

            in Java, not passing any message/info back to NP but to xSocket server. I

            was surprise the client would stop sending/working suddenly, no error

            message on both sides. If I don't use NP, it work flawlessly and able to

            handle large volume of data without lost or significant delay. I am

            disappoint that NP is incapable for production use.


            I tried adding "flush" before and after the text is display in Java code but

            it doesn't solve. Someone may solve it but how many programs are available

            in sourcecode?