Native application creating files

Hi everybody,
I need a hero
I'm working on a Air app calling a native application in C++, so it is not a .app or .cmd it's an executable file. For now it's a "dummy" application like below:
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
int main(int argc, char ** argv)
          ofstream myfile;
    myfile.open ("test.txt");
    cout << "Hello "<<  argv[1]<< " its a new world!"<<endl;
    myfile << "Writing this to a file.\n";
    myfile.close();
    return 0;
I launch this native application thanks to the NativeProcess API :
            file = file.resolvePath("./application/Marlin/mac/hello");
            var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
            nativeProcessStartupInfo.executable = file;
            var processArgs:Vector.<String> = new Vector.<String>();
            processArgs.push("rela");
            nativeProcessStartupInfo.arguments = processArgs;
            process = new NativeProcess();
            process.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA,onOutputData);
            process.addEventListener(ProgressEvent.STANDARD_ERROR_DATA,errorDataHandler);
            process.start(nativeProcessStartupInfo);
I can see intthe standart output that my native application is running. I have in the trace : hello rela its a new world!
First question, the native application doesn't pop up, I mean that the console doesn't show up and execute the C++ code. Is it normal or is there a configuration to change that?
Seconde question, my native application creates a file but when I launch with the Air app, the file is not created. Is it possible to launch a native application creating a file? Is there any security or confifuration to set up?
Thanks a lot.

Nevermind, I've found out.
Needed to add the working directory.
nativeProcessStartupInfo.workingDirectory = File.createTempDirectory();

Similar Messages

  • Linux native application to add chapter marks to an m4b file

    I found m4baker in the AUR which is a great util to create m4b files.  What I am asking is for a linux native application that will allow users to add chapter marks to an existing m4b file without chapter marks.  Googling found nothing.
    Thanks!
    Last edited by graysky (2012-05-21 19:36:22)

    I am the developer of m4baker.
    While m4baker itself is not meant to edit chapter marks, it uses mp4chaps from libmp4v2 to add chapter markers. Its really simle and way more reliable than gpac.
    If you need an example mp4file.chapters.txt run m4baker in verbose mode so the chapter file m4baker creates wont be deleted.
    libmp4v2 also has a mp4tags which is great for addings tags and cover images. Files tagged this way work correctly on ipods, vlc and akimbo (android).
    Hope this helps,
    crabman

  • How to create file on application server?

    how to create file on application server?

    Hi,
    The following program illustrates the creation of ifle in app server and reading the file from appli server:
    DATA: ITAB LIKE vbakOCCURS 0 WITH HEADER LINE.
    PARAMETERS: P_VBELN LIKE VBAP-VBELN.
    START-OF-SELECTION.
      SELECT *
        FROM VBAP
        INTO TABLE ITAB
    WHERE VBELN = P_VBELN
        PERFORM WRITE_DATA.
        PERFORM READ_DATA.
    *&      Form  WRITE_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM WRITE_DATA.
    OPEN DATASET 'VBAP_DATA' FOR OUTPUT IN TEXT MODE.
    LOOP AT ITAB.
    TRANSFER ITAB TO 'VBAP_DATA'.
    ENDLOOP.
    CLOSE DATASET 'VBAP_DATA'.
    CLEAR: ITAB, ITAB[].
    ENDFORM.                    " WRITE_DATA
    *&      Form  READ_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM READ_DATA.
    OPEN DATASET 'VBAP_DATA' FOR INPUT IN TEXT MODE.
    DO.
    READ DATASET 'VBAP_DATA' INTO ITAB.
    IF SY-SUBRC <> 0.
    EXIT.
    ENDIF.
    APPEND ITAB.
    ENDDO.
    CLOSE DATASET 'VBAP_DATA'.
    LOOP AT ITAB.
    WRITE:/ ITAB-VBELN,
            ITAB-POSNR.
    ENDLOOP.
    ENDFORM.                    " READ_DATA
    If it is helpful rewards points
    Regards
    Pratap.M

  • How to view *.eml files in Lotus Notes as native application?

    Using Desktop Integration for Lotus Notes, and using Contribution Folders via Notes:
    I can drop-and-drag an e-mail from lotus notes inbox to the contribution folder (in Notes) ok. I can view the *.eml file in Contribution Folder (Notes and Explorer), when I select "View" from the Contribution Folder it first attempted to open the file in outlook, I then changed the "view with" attribute,to Notes. Notes attempts to open the file and throws an error message: Invalid Directory Name or device not ready.
    Has anyone come across this before? If so, how did you ensure application consistency that e-mails declared as "documents" are accessed again via the native application (Lotus Notes not Outlook)?
    Many thanks,
    A.

    Not entirely. At least we came to the conclusion it doesn't make (much) sense to block the save option of PDFs if you want to allow printing them
    Anyway; there is of course another possibilty: you could always write your own java bean PDF reader; there are plenty of java PDF libraries available:
    Open Source PDF Libraries in Java
    The easiest way would be to choose one which can open a PDF from a URL and render it; I would retrieve the image via mod_plsql using WPG_DOCLOAD and simply use the PDF library to render the PDF. No tempfiles anyway, and if you don't implement it there is also no save button.
    cheers

  • Cannot create file "/Applications/ " Permission denied.

    When installing new software Iget the following error message: "Cannot create file "/Applications/ ". Permission denied. I have used disk utilities to try to repair my permissions with no sucsess. I have also tried reinstaling the software. Any advise is appreciated.
    I am using Mac OS X Yosemite 10.10.2 and Safari 8.0.4

    You may need to rebuild permissions on your user account. To do this,boot to your Recovery partition (holding down the Command and R keys while booting) and open Terminal from the Utilities menu. In Terminal, type:  ‘resetpassword’ (without the ’s), hit return, and select the admin user. You are not going to reset your password. Click on the icon for your Macs hard drive at the top. From the drop down below it select the user account which is having issues. At the bottom of the window, you'll see an area labeled Restore Home Directory Permissions and ACLs. Click the reset button there. The process takes a few minutes. When complete, restart.   
    Repair User Permissions

  • How to open file in their native application

    How to open file in their native application form web browser?
    if associated .txt file should open in editplus then from web browser if I try to open .txt file it should open in editplus rather then open in notepad(default), If on other computer if I associate .txt file should open in word, it should open in word. I am using Tomcat Web Server.

    that's nothing you could influence from a servlet or jsp.
    all you could do is specifying the content type of your response.
    Next you might hope that the client requesting your content uses a browser that relates the given content type to a special application (e.g. "text/plain" -> editplus or notepad or kedit or word or ...)

  • Opening a file in its native application from Flex.

    Is it possible to open a file on whatever native application the user runs it as?  Or even, at that, to simply open the directory it's in, in an explorer window?
    We have a search application and the frontend is in Flex, and I'm trying to find a way to do this, such that when a use double clicks on a result (in a datagrid - but that's trivial), it opens the file or at least the location of the file on the OS.
    Any system call where I can say system("explorer.exe " + filepath); or something?
    Any help would be appreciated.

    Dear BillBlalock ,
    thank you for answer!! You are very kind and helpful!! I would like to inform everybody that I have finally find another way of soilving my problem and I announce it to the forum in case somebody else encounters the same problem. Well, I soved the nproblem by using the following code:
        excelButton.addActionListener(new ActionListener()
           public void actionPerformed(ActionEvent e)
             String filePath = "\""+saveFileName.toString()+"\"";
             System.out.println(""+filePath);
             try
               String cmd="explorer "+filePath;
               Process p = Runtime.getRuntime().exec(cmd);
             }catch(IOException ec){}
         });I hope it can be useful to somebody!! By this code, I can make a button (in my case the excelButton) to open any file in its default application. Keep up the great work you are doing guys!!

  • "An error occurred creating the application.Check file system permission"

    Hi There ,
    I am facing a problem in creating a webcenter portal webapplication.
    I have followed the steps given in Help topics of Jdeveloper,but after performing all the steps i am getting this error
    "An error occurred creating the application.Check file system permission". Kindly help me to get through this error.
    Regards
    Vivek

    Hi Vivek,
    I hope this is the problem with permission.you Don't have Admin permission to access those folder.
    my Suggestion is
    1.use Administrator account(on windows) for develop applications(its give full access to the folder from your system). or
    2 open your JDeveloper as Administrator. (just right click on JDeveloper from you shortcuts or from programs run as Administrator)
    I hope this will be helpful.
    Best Regards
    Siva Sankar

  • How to create file system datagrid in flex web application

    how to create file system datagrid in flex web application

    Hi,
    Check this out:
    http://shigeru-nakagaki.com/flex_samples/FileReference/FileUploadExample2/FileUploadExampl e2.html
    Johnny
    Please rate answer.

  • Cannot install Native Application silently

    I have an existing Native Application installed that I'm trying to update silently, i.e. without being prompted if I want to replace the application. In command prompt on Windows 7 x64 I have tried the following:
    C:\NativeAppUpdate.exe -silent
    The command fails with the following message:
    failed due to bad configuration
    At this point I Googled the error and came across a post on this forum of something experiencing a similar issue. Adobe suggested using the ARH tool to get a better understanding of what the error was. So I tried the ARH tool as follows:
    arh -installAppSilent NativeAppUpdate.exe
    Unfortunately that failed too with the following message:
    Failed (consult log)
    So I looked at the log and found the following entries:
    [2012-07-02:17:04:35] Application Installer begin with version 3.1.0.4880 on Windows 7 x86
    [2012-07-02:17:04:35] Commandline is: -silent NativeApp_1_0_1.exe
    [2012-07-02:17:04:35] Installed runtime (3.1.0.4880) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2012-07-02:17:04:35] Unpackaging file:///C:/NativeApp_1_0_1.exe to C:\Users\d.reade\AppData\Local\Temp\flaC061.tmp
    [2012-07-02:17:04:35] Got an unexpected fatal error while unpackaging: [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="not an AIR file" errorID=0]
    [2012-07-02:17:04:35] Application Installer end with exit code 7
    It says it's not an AIR file, which is correct. However if I run the update file without the silent argument, it asks me if I want to replace the application and installs fine. So why does it fail when the silent argument is used and is there any other way around this?
    Any help would be greatly appreciated. Thanks in advance.

    I just tried again now but it didn't work.
    With AIR Runtime 3.1, here is what I did:
    1) Create a Flex Project (Desktop Application with Flex SDK 4.6.0)
    2) Export Native Installer package, called NativeAppTest_1.0.0.exe
    3) Edit the application xml file and change <versionNumber> value "1.0.0" to "1.0.1"
    4) Export Native Installer package, called NativeAppTest_1.0.1.exe
    5) Copy both installers to C:\
    5) Install C:\NativeAppTest_1.0.0.exe
    6) From command prompt, run "C:\NativeAppTest_1.0.1.exe -silent"
    The following is returned:
    C:\>NativeAppTest_1.0.1.exe -silent
    C:\>failed due to bad configuration
    With AIR Runtime 3.3 installed, the same thing happens. The log file says:
    [2012-07-25:15:58:40] Bootstrapper begin with version 3.1.0.4880 on Win x86
    [2012-07-25:15:58:40] Installed runtime (3.3.0.3670) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2012-07-25:15:58:40] Launching subprocess with commandline "Adobe AIR Application Installer.exe" -silent "C:\Users\D7378~1.REA\AppData\Local\Temp\AIR642F.tmp\NativeAppTest"
    [2012-07-25:15:58:40] Application Installer begin with version 3.3.0.3670 on Windows 7 x86
    [2012-07-25:15:58:40] Commandline is: -silent C:\Users\D7378~1.REA\AppData\Local\Temp\AIR642F.tmp\NativeAppTest
    [2012-07-25:15:58:40] Installed runtime (3.3.0.3670) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2012-07-25:15:58:41] Validating app in folder C:\Users\D7378~1.REA\AppData\Local\Temp\AIR642F.tmp\NativeAppTest
    [2012-07-25:15:58:41] Application signature verified
    [2012-07-25:15:58:41] Unpackaging/validation complete
    [2012-07-25:15:58:41] Installed app (NativeAppTest) located at C:\Program Files (x86)\NativeAppTest\NativeAppTest.exe
    [2012-07-25:15:58:41] Bad configuration: mode is silent install, but the app is installed
    [2012-07-25:15:58:41] Application Installer end with exit code 9
    [2012-07-25:15:58:41] Subprocess Application Installer failed (9)
    [2012-07-25:15:58:41] Bootstrapper end with exit code 9
    Using Flex SDK 4.6.0 and AIR SDK 3.3, I exported another Native Installer and tried again:
    [2012-07-25:16:09:22] Bootstrapper begin with version 3.3.0.3690 on Win x86
    [2012-07-25:16:09:22] Installed runtime (3.3.0.3670) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2012-07-25:16:09:22] Launching subprocess with commandline "Adobe AIR Application Installer.exe" -silent "C:\Users\D7378~1.REA\AppData\Local\Temp\AIR2F6A.tmp\NativeAppTest"
    [2012-07-25:16:09:22] Application Installer begin with version 3.3.0.3670 on Windows 7 x86
    [2012-07-25:16:09:22] Commandline is: -silent C:\Users\D7378~1.REA\AppData\Local\Temp\AIR2F6A.tmp\NativeAppTest
    [2012-07-25:16:09:22] Installed runtime (3.3.0.3670) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2012-07-25:16:09:22] Validating app in folder C:\Users\D7378~1.REA\AppData\Local\Temp\AIR2F6A.tmp\NativeAppTest
    [2012-07-25:16:09:22] Application signature verified
    [2012-07-25:16:09:22] Unpackaging/validation complete
    [2012-07-25:16:09:22] Installed app (NativeAppTest) located at C:\Program Files (x86)\NativeAppTest\NativeAppTest.exe
    [2012-07-25:16:09:22] Bad configuration: mode is silent install, but the app is installed
    [2012-07-25:16:09:22] Application Installer end with exit code 9
    [2012-07-25:16:09:22] Subprocess Application Installer failed (9)
    [2012-07-25:16:09:22] Bootstrapper end with exit code 9
    I noticed the logs keep saying Windows 7 x86 but I'm actually running Windows 7 x64.
    Could this be the problem? If not, what else could I try?

  • Reading contents of another (windows native) application

    Hi everyone!
    I would like to read some contents from another application, native to Windows, with my Java app.
    I have found the Jawin project (http://jawinproject.sourceforge.net/), but I have no idea how to find out the CLSID of the native application, which I need for creating a COM object handler... (through Jawin's DispatchPtr) ... if I understand this.
    Does anyone know how to do that, maybe?
    I would much appreciate it if someone could point me in the right direction or provide some code samples - either in Jawin or in some other way. Thank you for your help.
    Best regards,
    David

    Hi,
    The idea of my application is exactly the same that Kiran has mentioned in the 'Aim' of her post.
    i.e
    1 reading from a text file,
    2 parsing the contents,
    3 converting it into byte-array and
    4. adding these as records to an RMS record store.
    Ive been quiet successful in implementing these four steps. However, i face a problem now.
    Problem:
    So far the size of the text file was small i.e around 6 Kb and the app ran as expected.
    But now i need to read a much bigger file of around 50 kb.
    Bcoz the file size is huge, i have tried reading the file in chunks (i.e using delimiters in the file, reading small amounts of data via InputStream and storing in rms....)
    However, the whole file is being loaded at a strech and i get an OutOfMemoryException :(.
    Am i right when i say getResourceAsStream() loads the entire file in memory?? Is there no way for reading a huge .txt file in chunks without loading the entire file in memory?
    Kindly help.
    We gotta get thru! :)
    Smita.

  • How can I create files in unicode format without "byte order mark"?

    Hello together,
    I have to export files in UTF-8 format and have to send them to another partner system which works with linux as operating system.
    I have tried the different possibities to create files with ABAP. But nothing works 100% how I want.
    Some examples:
    1.)
    OPEN DATASET [filename] FOR OUTPUT IN TEXT MODE ENCODING UTF-8.
    If I create a file in this way and download it from application server to local system the result for file format in a unicode text edior like NotePad is "ANSI AS UTF-8". This means I have no BYTE ORDER MARK inside.
    But it is also possible that the file format is only ANSI if the file contains no "special characters", isn't it?
    In my test cases I create 3 files. 2 of them has format "ANSI AS UTF-8", and one only "ANSII".
    After transfer to Linux I get as result 2 times UTF8 and one time ASCII as file format.
    2.)
    OPEN DATASET [filename] FOR OUTPUT IN TEXT MODE ENCODING UTF-8 WITH BYTE ORDER MARK.
    With this syntax the result in local editor looks like ok. I get as format really "UTF-8".
    But I get problems with the system which receives the files.
    All files has the file format UTF-8 on Linux but the interface / script can not read the file with BYTE ORDER MARK.
    This is a very big problem for me.
    Do anybody of you know if it possible to force creation in UTF-8 without a BYTE ORDER MARK?
    This means more or less the first example but all files should have UTF-8 format!
    Thanks in advance
    Christian

    This means it is not possible to create a pure unicode file without the byte order mark?
    You wouldn't happen to know how a file with byte order mark should read on a Linux system?
    Or if this possible or not?
    Regards
    Christian

  • Why do I get "Cannot create file" message in my download manager when I attempt to install Firefox?

    I'm running Mac OS 10.4.11 on a 1.6 GHz PowerPC G5 Mac. I uninstalled Firefox 3.6 from my according to directions on the Mozilla website. And I deleted my Firefox profile folder contained in the Home> Library> Application Support folder. Every time I attempt a clean install of Firefox 3.6.13.dmg, I get the following message: "Cannot create file."

    This issue can be caused by corrupted cookies.
    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    * Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    * Tools > Options > Privacy > Cookies: "Show Cookies"
    See also:
    * http://kb.mozillazine.org/Cookies#Removing_cookies

  • LV 8.2.1 reinstallation error 1301: Cannot create file

    Hi,
    I was forced to uninstall LV 8.2.1 and reinstall it. When I'm reinstalling LV 8.2.1 I get an error message
    Error 1301. Cannot create file ". A directory with the same name already exists. Cancel the install and try installing to a different location.
    (Abort, Retry, Ignore).
    This error is somehow related to the fact that after uninstalling LV 8.2.1 LabVIEW 8.2 installation directory still remains with some stuff in the user.lib and other folders. I'm always using OpenG packages and I didn't uninstall them so that may be the reason. I also used DataAct class browser with LabVIEW.
    The problem is that I cannot uninstall my OpenG packages before I can get my LabVIEW installed again as VI Package Manager reposinsible for installing OpenG packages doesn't work without installed version of LabVIEW. And I cannot get my LabVIEW correctly installed because of this error. I can press ignore and the installation procedes but I don't know whet it didn't do because of the error.
    I guess this error is a bug in LV 8.2.1 isntaller so would some of NI application engineers help, please.
    For now I press Ignore.
    Tomi Maila
    Tomi Maila

    You will get this error if the installer is trying to install a file that has the same name as a folder at that location. For example lets say the installer has a file called "sample" that should go in LabVIEW\examples folder. Now lets say there was a folder called "LabVIEW\examples\sample". Windows wont let you copy that "sample" file in the same location that contains a "sample" folder. The failure is not an error in the installer.
    The problem with the 8.2.1 installer is that it is not telling you what file this failure occurred on. It is trying to, but the string is not formatted correctly and it just says "cannot create file ." The actual file name should be where the "." is.
    You can usually tell what file it failed on from the text above the progress bar where it says what file is being copied. The best way to see what failed was to get an installation log file.
    Naren Salem
    LabVIEW R&D

  • I have a 15" MacBook Pro 2.4 GHz Intel Core 2 Duo (Early 2008) running OSX Lion 10.7.5. I want to erase the Hard Drive, install Mountain Lion, and manually restore select applications and files. Is there a known procedure to do this? Any tips or feedback?

    I have a 15" MacBook Pro 2.4 GHz Intel Core 2 Duo (Early 2008) running OSX Lion 10.7.5.
    I want to erase the Hard Drive, install Mountain Lion, and manually restore select applications and files.
    Is there a known procedure to do this? Any tips or feedback?

    1. Make a backup, open App Store and purchase Mountain Lion. When its download finishes, close the installer and open Lion Diskmaker to create a bootable USB drive with Mountain Lion.
    2. Press Option key while your Mac is starting, select the external drive and open Disk Utility.
    3. Select Macintosh HD in the sidebar and erase the drive.
    4. Close the window and install Mountain Lion

Maybe you are looking for

  • IPod Won't Play Songs, Videos Reset it, and it's Quite Sluggish

    I have a 30GB video iPod (the old version). Everything was working fine until a few days ago, when the power on my iPod ran out because I fell asleep while listening to it. The next day when I turned it on, it said "Connect to your Computer, Use iTun

  • The Crimson Field, Episode 2 Never Made Available on-demand

    The PBS series, "The Crimson Field", episode 2, was never made available on-demand; only episodes 1 and 3 have been available.  Also, it has taken over a week for each of these episodes to be uploaded. Please make episode 2 available and make episode

  • Employment Offer Letters generated in SAP

    Good Afternoon! I'm trying to figure out the BEST way to generate Employment Offer Letters in SAP. I have been reading online and it seems that there are many ways to accomplish this. I've read: SO10 - maintain letter format SMARTFORMS PB60 - Generat

  • Lock button issue after update

    So I updated my iPhone 5 to the 7.0.2 update this past Sunday and now my lock botton is not responding when I press it. I have to hit it a few times to get it to respond now. It is NOT a hardware issue since I did not have that issue since ownership.

  • Is SP7 install supposed to install iManager 2.7?

    I installed SP7 on a SBS 6.5.1 server. When I restarted it, there was still iManager 2.0.2 running. I had expected to see iManager 2.7 running. I thought I got iManager 2.7 out of SP7 at another site. Is SP7 supposed to update iManager to 2.7? If not