Why the const char* filename can not open file?

the jni pass the string, I then convert it to the
const char* filename = env->GetStringUTFChars(fname,NULL);
then I use the filename to opent the file but fails, what is the problem???
FILE *fp= fopen(filename,"w"); // there are some problem here!!!
     fprintf(fp, "%s\n","wangyue fighting!");
the error is as follows
# An unexpected error has been detected by Java Runtime Environment:
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0bfc1a55, pid=7040, tid=11384
# Java VM: Java HotSpot(TM) Client VM (10.0-b19 mixed mode windows-x86)
# Problematic frame:
# C [beattrack.dll+0x1a55]
# An error report file with more information is saved as:
# D:\programs\playAudio\hs_err_pid7040.log
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

Danielwang wrote:
the jni pass the string, I then convert it to the
const char* filename = env->GetStringUTFChars(fname,NULL);
then I use the filename to opent the file but fails, what is the problem???
Same as your previous problem.
FILE *fp= fopen(filename,"w"); // there are some problem here!!!No that is not where the problem is.

Similar Messages

  • Process.start("winword", filename) can not open file with space in the path and name

    Hi,
    I am trying to write a class which can open file with selected application. for simplicity, now I just hard code the varaibles.
    the problem: if the path or file name has space in it, even it exist, winword still can not open it.
    could someone kindly show me what I did wrong and how to do it properly.
    Thanks in advance.
    Belinda
    public static class FileOpen
    public static void info()
    string path = @"c:\a temp folder\aaa 1.txt";
    if (File.Exists(path))
        // the file I am using in the sample does exist
         MsgBox.info("yes");
    else
         MsgBox.info("no");
    // working
    //Process.Start("winword", "c:\\aaa.txt");
    // not working
    //Process.Start("winword", "c:\aaa.txt");
    // not working
    Process.Start("winword", "c:\\a temp folder\\aaa 1.txt");
    // not working
    Process.Start("winword", path);

    string AppPath;
    AppPath = ReadRegistry(Registry.CurrentUser, "Software\\FabricStudio", "TARGETDIR", value).ToString() + @"help";
    string FileName = "'"+ AppPath + "\\ImageSamples.doc" + "'";
    try
    System.Diagnostics.Process.Start("Winword.exe", FileName);
    can any body please help for this.
    where i am making mistake?

  • I can not open files created in iWork 6 or iWork 8 with pages 5.2. I removed the older versions and emptied my trash.  what to do?

    i can not open files created in iWork 6 or iWork 8 with pages 5.2. I removed the older versions and emptied my trash.  what to do?

    Reinstall iWork '08 which can export to Word .doc/x files.
    Peter

  • Hello Sorry for the inconvenience, but I have a problem in Java I can not open files, audio chat, which type of jnlp after the last update of the Java 2012-004 Please help me in solving this problem.

    Hello Sorry for the inconvenience, but I have a problem in Java I can not open files, audio chat, which type of jnlp after the last update of the Java 2012-004
    Please help me in solving this problem. 

    Make sure Java is enable in your browser's security settings.
    Open Java Preferences (in Utilities folder)
    Make sure Web-start applications are enabled.
    Drag Java 32-bit to the top of the list.
    jnlp isn't an audio file format. It's just a java web-start program (Java Network Launching Protocol).

  • After the ios7 updated I can not open the iTunes store in my iPhone 5

    After the ios7 updated I can not open the iTunes store in my iPhone 5
    How can I fix it?

    Hi adrimomo,
    Welcome to the Support Communities!
    Here are a few things you can try:
    iOS: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/HT1430
    If you have tried those two things, refer to page 146 in the iPhone User Guide to Reset All Settings:
    iPhone User Guide for iOS 7
    manuals.info.apple.com/MANUALS/1000/MA1565/en_US/iphone_user_guide.pdf
    Also, check your settings for Safari -- enable cookies and turn off private browsing - see page 57 of the iPhone User Guide above.
    Cheers,
    - Judy

  • I can not open files FH11, Is it because I have the trial version of Illustrator CC 2014?

    I can not open files FH11, Is it because I have the trial version of Illustrator CC 2014?

    FH support has been dropped in CS6.
    The FH plugin from tensai.co.uk should solve your problem.

  • After o download the browser ,i get message that says can not open file what do i need to do to download the browser i have tried 5 times get same message

    its the same shit i asked before after i download the browser i get message can not open file what do i do to dwonload the browser

    That message is usually a sign that you tried to roll back to an earlier build of iTunes, but occasionally I've seen it connected to a new upgrade. This technique should fix things.
    Empty/corrupt library after upgrade/crash
    Hopefully it's not been too long since you last upgraded iTunes, in fact if you get an empty/incomplete library immediately after upgrading then with the following steps you shouldn't lose a thing or need to do any further housekeeping. In the Previous iTunes Libraries folder should be a number of dated iTunes Library files. Take the most recent of these and copy it into the iTunes folder. Rename iTunes Library.itl as iTunes Library (Corrupt).itl and then rename the restored file as iTunes Library.itl. Start iTunes. Should all be good, bar any recent additions to or deletions from your library.
    See iTunes Folder Watch for a tool to catch up with any changes since the backup file was created.
    When you get it all working make a backup!
    tt2

  • Hi i have a iphone5 I lost my password ha possibility I make the switch for 5s can not open the icloud?? if accepted as pay the difference? thank you for it helped.

    hi i have a iphone5 I lost my password ha possibility I make the switch for 5s can not open the icloud?? if accepted as pay the difference? thank you for it helped.

    Post in your native language.  Your post is very difficult to understand.  What password are you talking about?  You device passcode?  Your Apple ID password?

  • Fatal error : can not open file 'msvcrt.lib'

    Hello dudes !
    I am using windows and jdk1.6. I want to develop one application using JNI. As steps for JNI, i have created Helloworld java class and compiled it, then created header file using jnh. After that i have created HelloWorld.c file.
    To build dll file, i am executing the below command
    "cl -Ic:\java\include -Ic:\java\include\win32 -MD -LD HelloWorld.c -FeHelloWorld.dll".
    Command giving the output as follows:
    HelloWorld.c
    Microsoft (R) Incremental Linker Version 8.00.50727.42
    Copyright (C) Microsoft Corporation. All rights reserved.
    /dll
    /implib:HelloWorld.lib
    /out:HelloWorld.dll
    HelloWorld.obj
    LINK : fatal error LNK1104: cannot open file 'MSVCRT.lib'
    Can anybody say why it is giving this problem.
    Also i tried giving the msvcrt.lib path as the value for -MD option,
    cl -Ic:\java\include -Ic:\java\include\win32 -MD"c:\Microsoft Visual Studio 8\VC\lib" -LD HelloWorld.c -FeHelloWorld.dll
    Then it is giving "can not open file LIBCMT.lib" .
    Note : ...\VC\lib and ....\VC\include are added in the path.
    Can anybody tell the solution for this ?
    Thanks in advance!!

    Hi,
    I was with the same problem. You have set the your VCC environment.
    Path, Include and Lib.
    In your directory VCC (2003 toolkit), you have a .bat file (vcvars32.bat)
    Run the bat, or copy and past this command in your command prompt.
    In my compilation, I run the code, wihtout -MD and -LF. In your, just:
    cl -Ic:\java\include -Ic:\java\include\win32 HelloWorld.c -FeHelloWorld.dll
    thanks,
    Fabio Pinheiro
    Brasil.

  • Adobe photoshop lightroom won't install on my Mac - error can not open file

    Adobe Photoshop Lightroom4 will not install on my Mac. "Error can not open file" when trying to open will installer. If I cannot get it to work I would like to return product.

    What version of Mac OS are you using?  What is the exact name of the file which you are double clicking on?  If you right click on the file and select Get Info what does it state under the Open With section?

  • After update to OS X Maverick I can not open files in Lotus Notes Smart suite. Is there any way to solve this problem?

    After I updated to OS X Maverick I can not open files in Lotus Notes Smart suite. Is there any way to solve this problem?

    Ok this worked to solve the error.
    Use cmd prompt in windows 7 or 8 and run as admin:
    sc config lanmanworkstation depend= bowser/mrxsmb10/nsi
    sc config mrxsmb20 start= disabled
    No need for all that power shell nonsense as shown elsewhere for windows 8.
    That's it. Also force smb2 disabling on the apple side for good measure.
    With the above I was able to network mavericks and windows 8.1 pro flawlessly. He issues I had before where I could not read video, ISO and audio files (but could open documents and pictures from the windows machine connected to an apple network share folder went away.

  • JSON.parse Response parse failed. I can not open files and JSON.parse Response parse failed. shows up it dosn't happen with I E browser

    JSON.parse Response parse failed.
    I can not open files. And JSON.parse Response parse failed. shows up.
    It doesn't happen when i use the I E browser, so I can't use firefox

    Hi
    I'm trying to make a movie from the JpegImagesToMovie class. But i get a null point exception :(
    java.lang.NullPointerException
         at com.sun.media.multiplexer.video.QuicktimeMux.writeVideoSampleDescription(QuicktimeMux.java:936)
         at com.sun.media.multiplexer.video.QuicktimeMux.writeSTSD(QuicktimeMux.java:925)
         at com.sun.media.multiplexer.video.QuicktimeMux.writeSTBL(QuicktimeMux.java:905)
         at com.sun.media.multiplexer.video.QuicktimeMux.writeMINF(QuicktimeMux.java:806)
         at com.sun.media.multiplexer.video.QuicktimeMux.writeMDIA(QuicktimeMux.java:727)
         at com.sun.media.multiplexer.video.QuicktimeMux.writeTRAK(QuicktimeMux.java:644)
         at com.sun.media.multiplexer.video.QuicktimeMux.writeMOOV(QuicktimeMux.java:582)
         at com.sun.media.multiplexer.video.QuicktimeMux.writeFooter(QuicktimeMux.java:519)
         at com.sun.media.multiplexer.BasicMux.close(BasicMux.java:142)
         at com.sun.media.BasicMuxModule.doClose(BasicMuxModule.java:172)
         at com.sun.media.PlaybackEngine.doClose(PlaybackEngine.java:872)
         at com.sun.media.BasicController.close(BasicController.java:261)
         at com.sun.media.BasicPlayer.doClose(BasicPlayer.java:229)
         at com.sun.media.BasicController.close(BasicController.java:261)
         at movieclear.MovieManager.JpegImagesToMovie.controllerUpdate(JpegImagesToMovie.java:179)
         at com.sun.media.BasicController.dispatchEvent(BasicController.java:1254)
         at com.sun.media.SendEventQueue.processEvent(BasicController.java:1286)
         at com.sun.media.util.ThreadedEventQueue.dispatchEvents(ThreadedEventQueue.java:65)
         at com.sun.media.util.ThreadedEventQueue.run(ThreadedEventQueue.java:92)
    Please please help me out.. I'm totally stuck in this thing. A MOV file is created, but it's a 0kb file.
    Please help me out..
    Sootie.

  • Garage band can not open files because sound can't be found

    can not open file. it says sounds are not on computer. but they certenly are! it offers me to buy it.... of i dont do.
    i meen i used that sound to create that file...
    one day it just worked again for some times. but now same problem again...

    Please repost in the InDesign forum. It sounds like a permissions issue. Please state your OS, your version of InDesign, and the location of the files that you cannot edit.
    BTW, in Lion, Apple decided that older files cannot be opened for editing. You need to open the file and do a save as to create an editable file. This is supposed to protect you from accidentally overwriting old files. I think it is a little big brotherish. But some have said they are happy with the new way of handling old files.

  • Hi, I got iMac and I can not open file "doc" when I have downloaded from distance learning internet page. I have office program, but when I try to open file it shows: u1-assesment.doc uses a file type that is  blocked from opening in this version.?

    Hi, I got iMac and I can not open file "doc" when I have downloaded from distance learning internet page. I have office program, but when I try to open file it shows: u1-assesment.doc uses a file type that is  blocked from opening in this version.?
    I have tryed to change just extension from doc to docx, but it doesn't work. I am new user, please help

    Consider the Mcrosoft Office:Mac forums as well:
    Office for Mac forums
    Here is an MS page that deals with that error message:
    http://answers.microsoft.com/en-us/mac/forum/macoffice2011-macword/bs0811doc-use s-a-file-type-that-is-blocked-from/548ce159-8157-419e-9552-1789594fafe9

  • Include jni.h !! can not open file

    include<jni.h> !! can not open file
    i wrote a program Test.class and i make Test.h and i make .def and .c, but whan i want to compile .c i have massage: can not open jni.h file

    You need to check that the include path for your compiler is set correctly. You must read the documentation for your compiler / platform / IDE to find out how to do this.

Maybe you are looking for

  • G/L account is not define in chart of account F5507 error in MIRO

    Hi,   While doing MIRO as soon as We enter the PO number system gives the error message F5507 G/L account is not define in chart of account F5507,  I have check the G/L account in FS00 it isproperly mainatin also in COCD data Chart of account , contr

  • Mass changes in PO's - Change vendor number

    Dear Expert, I would like to know your advice. I have one clinet requiremnet , they want to do some mass changes in a PO's -  they want to change the vendor code in a purchase orders. these purchase order just created and not any inventory or financi

  • How to start LibreOffice automatically with a forced VCL UI?

    Hello, I use MATE with dual monitor here and since LibreOffice was updated from 3.4.6 to 3.5.1 it doesn't work anymore in one of the screens. It does work well in the smaller screen (presumably the one the system thinks is the main screen, as most th

  • Plz bring full screen caller id!!

    When I had updated to ios 7.1, I am really shocked when my caller id pics became smaller to a bubble. Which I hate completely. I thought Apple is going mad. We treat Apple is like a brand. But from day by day updates, Apple is reducing the options an

  • Integration script for Mapping

    Is it possible to write an integration script which could connect to an excel file and get its source and target mapping values ?