Compiling JNI library with resource files (i.e. images)

hi-
i'm compiling a jni library on mac osx leopard using a command like:
cc -g -dynamiclib -o libJNI.jnilib file1.o file2.o main.o -framework JavaVM -framework Foundation -framework AppKit -framework Cocoai'd like to include resource files like images in the build of the jni library. how can i compile those into the jni library?
thanks,
augusto.

Creating shared libraries themselves are compiler/linker/OS problems.
Not Java/JNI.
So finding a forum that answers questions about the compiler/linker in use is the place to ask them.

Similar Messages

  • I can't restore 'library' with support files from Time Machine

    backup - I can't restore 'library' with support files from Time Machine - Ask Different
    Due to an accident, my entire applications folder with all the support files, including plists and caches got deleted.
    I tried restoring by files from the most recent Time Machine backups but I cannot retrieve my applications with the support files.
    I even tried it with migration assistant on a new image.
    Is this impossible?
    Must I start from scratch?
    Details of the ‘accident’
    I was using this app called ‘AppCleaner’ that also automatically deletes related support files which are normally left behind if one simply trashes an Application.
    In the search view, I typed the app name and I selected all the apps in the results using Command + A. Unfortunately, this selected every single Application in the Applications Folder in the background and I trashed and deleted all files.
    Anyway.
    I tried to restore the applications and library from my Time Machine Back-ups but failed to do so because I didn’t have enough space to restore. (I have a 11inch Macbook Air 2012 64GB SSD
    When I tried to restart in recovery mode, I had the same problem, I was disallowed the option to restore using my time capsule backups because my SSD didn’t have enough space for the backup.
    I then tried to restore it to a totally different but new image on a 64GB USB3.0 Sandisk USB Stick, but the process stopped after hours of being stuck around 30.4 percent and the computer was unable to boot, leaving me with a persistent verbose message suggesting it couldn’t identify the os, kernel or anything.
    I finally tried restoring the state using migration assistant on the very same SSD that had my files missing. This happened successfully and I have all my applications in the applications folder.
    But now I have 13GB free (I had 2GB before) and all my application support files, saved states, preferences, caches and customizations are gone.
    Basically, it feels like I just got a new macbook with my documents and itunes folder loaded on to it.
    How can I get my apps back to the pre-deletion state or is this impossible? Do I have to start from scratch? I thought my Time Machine Backups would restore it to exactly the same state, am I wrong?
    Screenshots:
    Message was edited by: Arsenenger

    Can you simply navigate to your Time Machine backup with the Finder? Treat it like an external hardrive and just look for your old Applications folder. /Applications/
    Also, quite a few apps put config and support files in ~/Library/Application\ Support/
    So you may be able to get the files from there as well.

  • ITunes has stopped automatically syncing new books placed in Library with open file. I have to drag the file to the device to get iTunes to sync the book. Why

    iTunes has stopped automatically syncing new books placed in Library with open file. I have to drag the file to the device to get iTunes to sync the book. Why?
    Ever since version. 7 iTunes has stopped syncing checked books without dragging them to my iPad. all settings are correct.  I have set up 3 new devices and had to direct the new people to drag the books to their iPad. previous to ver. 7 this happened automaticlly just by syncling the device.  This issue isn't just on my computer but at least three others. books purchased from apple sync just fine. If is drag the book from the library ad drop it on the device it syncs fine.  What a pain if you have added several files now you either have to do the drag drop process for each one as you add it or try and remember which files you added the find them and do the process. 
    Thanks

    Hello BBWEST11,
    This may be due to iTunes 11 being set to manually manage content on devices by default.
    By default, iTunes 11 and later is set to manually manage your content on your device. Manually managing your device allows you to choose the content you want to have with you.
    Managing content manually on iPhone, iPad, and iPod
    http://support.apple.com/kb/HT1535
    Cheers,
    Allen

  • JDev 9.0.3 - problem with compiler options to copy resource file types

    Hello,
    Following a quite strange scenario, I found something bizarre related to the project compile options in 9.0.3 production (I assume the same problem was present way before...)
    Let me first present the facts:
    Assume I have in my project one file named noext (with no extension!) and another one file.verylongext. I know it's not best practice, but let's say they are third party files and I would prefer not to touch them.
    I am able to add them to the project sources, in the specified packages, then I update the Project Settings/Compiler/Resource File Types to Copy to Output Directory.
    But, when I compile, I realize that not all my files were copied to classes/. In fact, if I specify ...;noext;file.verylongext, I get only noext copied, while if I specify ...;file.verylongext;noext, I only get file.verylongext.
    I also tried to use only .verylongext, but the result was exactly the same...
    Of course I can copy the files manually, outside JDev, but this is not best practice neither... :)
    As long as JDev 9.0.3 seems to provide support for filtering the files that will be added to a project (see thread Re: update column for details), I don't really see the purpose of filtering again the files that will be transferred to classes/ (apart from the little bug).
    I think it would be far more useful to have the reverse filter, i.e. "Resource File Types not to Copy to Output Directory". JDev team, would it be possible to have this in 9.0.4?
    Thanks,
    Adrian

    >I tried to reproduce the problem and couldn't.
    Nevermind, I will be back on this when I'll have a simple example.
    >One question, is noext and file.verylongext part of your project?
    Well, you know, since I said I have them in my project, it means that I added them there and I checked that they really were added. No offense...
    >One more question, did you enable Scan Source Path to ... in the input paths panel of the pproject properties?
    No, I did not enable this option, since I see all my files in the project and the only source path is project's src.
    But my real point is related to the enhancement request I made. Given the circumstances,
    could you provide the reverse filter, i.e. "Resource File Types not to Copy to Output Directory", in a future version, maybe 9.0.4?
    Thanks,
    Adrian

  • Site multilingue with resources files in sandbox mode

    Hello,
    I have developed a sandbox sharepoint application, and i need to set my site in multilingue option with the resources files but i dont have the solution.
    I need to get the name and fields of sharepoint lists from the resources files.
    Thx

    One of the Sandbox solution is restriction ofdeploying Resource files, you can try these links
    How to: Localize Feature Attributes in Sandboxed Solutions
    http://msdn.microsoft.com/en-us/library/office/gg615457(v=office.14).aspx , Though this method discuss on Feature attributes I think it is still not possible for SP lis tfields and you have to go code route of using Satellite assemblies to get
    this done - http://msdn.microsoft.com/en-us/library/70s77c20.aspx
    How to: Deploy Localized Sandboxed Solutions by Using Satellite Assemblies
    http://msdn.microsoft.com/en-us/library/office/gg615453(v=office.14).aspx
    Restrictions on Sandboxed Solutions in SharePoint 2010
    http://msdn.microsoft.com/en-us/library/office/gg615454(v=office.14).aspx
    Localization in general -http://blogs.msdn.com/b/johnwpowell/archive/2009/11/29/sharepoint-2010-localization-with-visual-studio-2010.aspx
    Hope this helps!
    Ram - SharePoint Architect
    Blog - SharePointDeveloper.in
    Please vote or mark your question answered, if my reply helps you

  • How to connect SharePoint Document Library with Local file system?

    Hi
    I have a SharePoint Document library and in my local system i have 3TB files. It is very difficult to upload 3TB files in SharePoint.
    I want a file details in SharePoint Document Library but physical file would be in local.
    While click the file in Document library. The document should open from local.
    Anyone help me on it.
    Thanks & Regards
    Poomani Sankaran

    Hi,
    your requirement doesn't work out-of-the-box as all data uploaded to SharePoint needs to be stored in SQL database. Thus in your case 3 TB of fileshare would need to move to SQL.
    In case you don't want to go this way, there are 3rd party vendors who offer Software like AvePoint Connector. Products like these use SQL RBS (Storage Externalization API) so that files remain in your file system but metadata is kept in SharePoint. If you
    need more information on that, please let me know.
    Regards,
    Dennis

  • Debugging mingw cross-compiled JNI code with drmingw

    Hi there... I've been googling up a storm but so far no luck so I thought I'd throw the question out and hope for some answers. I have a chunk of native code in linux and now cross-compiled to win32 using mingw. When there is an exception in the native code, the VM exits. I'm getting java dumping its stack traces (eg. hs_err_pidXXXXX.log files), but those only have hex addresses for the native DLL because the mingw symbols aren't understood.
    Example:
    C [lhext.dll+0x47dcc]
    C [lhext.dll+0x37408]
    j some.jni.method.call.i.cant.easily.cut.and.paste
    I tried to load the drmingw exchndl.dll in my native code, which I thought should dump stack traces to a file when the exception occurs, but it seems like java is controlling the exception handling and bypassing the exchndl.dll library, so the net result is no useful stack trace output.
    Does anyone have a good method to do this (aside from attaching gdb in windows, which is inconvenient if this happens in the field)? Or a method to extract a call stack using the hex dll addresses from a mingw cross-compiled dll?

    Hi there... I've been googling up a storm but so far no luck so I thought I'd throw the question out and hope for some answers. I have a chunk of native code in linux and now cross-compiled to win32 using mingw. When there is an exception in the native code, the VM exits. I'm getting java dumping its stack traces (eg. hs_err_pidXXXXX.log files), but those only have hex addresses for the native DLL because the mingw symbols aren't understood.
    Example:
    C [lhext.dll+0x47dcc]
    C [lhext.dll+0x37408]
    j some.jni.method.call.i.cant.easily.cut.and.paste
    I tried to load the drmingw exchndl.dll in my native code, which I thought should dump stack traces to a file when the exception occurs, but it seems like java is controlling the exception handling and bypassing the exchndl.dll library, so the net result is no useful stack trace output.
    Does anyone have a good method to do this (aside from attaching gdb in windows, which is inconvenient if this happens in the field)? Or a method to extract a call stack using the hex dll addresses from a mingw cross-compiled dll?

  • Please help with resource files!!!

    As I was trying to modify the menubar I took out the SArtFile.Bin and Extras2.rsrc from their respective folders. I did this without replacing them first, which prior to this time work perfectly. Now when I try to replace them with the prefer file or even the correct file it says the folder can't be modified. It then asks me to authenticate or cancel. When I press authenticate I get "The operation can’t be completed because an unexpected error occurred (error code -60008)." as the message. Does anyone know a fix? I also think I should add that the only applications that work are the ones that were open at the time I was trying change the menubar.
    Message was edited by: TreyMac

    Reinstall the OS and then run Software Update. Then, be careful mucking with the OS's innards.

  • Retreiving Old Itunes Library with .itl file

    How can I retreive a previous iTunes library from a .itl file?
    I just recently updated to a the newest version of iTunes, 7.6.1 After the installation was finished I was prompted to select which library to use and was directed to my "previous itunes libraries" folder. By mistake I choose a library that was from a month ago so when I opened iTunes several days worth of music hadn't been rated and I was missing a lot of playcounts. It just so happens I've spent the last month doing a lot of editing to my library and I really don't want to just erase that. Not to mention a few dozen podcasts I've subscribed to.
    The proper itl file is still sitting in my itunes folder, but I can't figure out for the life of me how to switch back to it. I've tried everything from replacing files, uninstalling and reinstalling itunes...installing an older version of itunes and then updating in hopes i will be prompted again to select the proper itl file.
    I've also tried simply replacing the files and renaming them, which also produced no results.
    When I go to file and then "import..." and select the desired itl file I get absolutely no results.
    Is there any possible way for me to retreive my old library data?? I'm getting desperate!
    Thank you,
    Mica

    Hold down the Shift key in Windows when launching iTunes. In the resulting dialogue you will get the option to create a new library or navigate to an existing one. The default location for your iTunes library is in \Documents and Settings\Username\My Documents\My Music\iTunes\. Look in there and see if you have more than one library file (they have the extension .itl) If you have more than one try opening them in turn: How to open an alternate iTunes Library file

  • Having issues with docx files that contain images. I can only see the first page of a multipage docx (the docx only contain images)

    I'm trying to open a file for school on my ipad.  The file is a 14 page document that is text in the form of an image (i.e. someone scanned the document and pasted into micrsoft word).  When I open the file (docx format) in safari I only see one page.  If I save the file on my computer as a .doc I have the same problem.  If I save it as a pdf, I have no problem viewing it.  I was wondering if anyone else is having the same issue and if so, what they've done to solve it.  I use my ipad heavily for school, and do not always have access to a computer, so a solution that stays within the ipad would be best, although at this point i think my best option is to save it as a pdf on a computer to view on my ipad. 

    Hey all,
    I solved this problem. It was not a code-problem but a printer problem. This code do not work on a BrotherHL1660e-printer. On all other printer I tried it works fine.
    Greetings - netti

  • Slideshow with video files and still images ?

    Hi everybody,
    As from the title I would like to know if in Captivate 7 (or 8) there is a widget for playing several videos within a sort of slideshow.
    Any advise about to sort the problem will be highly consdired.
    Best regards

    Hi Rick,
    tx a lot for your kind advise.
    Following your advise I have just created a Slideshow project and inserted still images in it. One per slide.
    But I did not get what to do now... Would you please help me  going on trying your solution?
    (I think it is helpful to specify  that I would like to have a slideshow for videos, as an object within one slide, not along several slides)
    tx.

  • Deploying swf with resources into a single sis on Nokia

    Hi finally i have my first question on the mobile forum . I am trying to package a sis file which will contain the main swf and a settings text file.
    The problem is the i have to compile them to deliver both together on Nokia device for flash lite 2.1. There is not a single decent packager out there as o see that solves my issue.
    Generally i use Nokia carbide. Here is a glimpse of my PKG file:
    ; Add any installation notes if applicable
    ;"MobiStore.txt"          -"!:\private\E4B653CF\MobiStore.txt"
    ;required for application to be covered by backup/restore facility
    "..\sis\backup_registration.xml"          -"!:\private\E4B653CF\backup_registration.xml"
    ;Add all the files needed by your flash app here. don't forget to set correct folder names!
    "..\data\MobiStore.swf" - "!:\private\E4B653CF\MobiStore.swf"
    "..\data\settings.txt" - "!:\private\E4B653CF\settings.txt"
    Now what happens is that after the application installs on a actual Nokia device It gives error "private\E4B653CF\settings.txt" Not found !!
    I confirm that the file is there manually but the swf cannot find it. In the swf i load the file "settings.txt" using loadvars.load method and providing just the file name "settings.txt",  no sub-folders or anything. So basicaly the file "MobiStore.swf" and "settings.txt" are in same folder but when i run the application it says:
    "private\E4B653CF\settings.txt" Not found !!
    I will really appreciate if some one can help me out with this. How to package a swf with resource files into sis and deploy on a real device.

    Hey,
    i have the same problem. Flash Lite 3.1., N97 The application is published with network only. I have even tried local only with same results.
    When i try to load an image with loadMovie(image.jpg), image is not show. But this only occurs when the application is installed on E:/private/UID/. If i install the application on C:, everything is working ok.
    Also same problem with loading images from http://127.0.0.1:8888/GetImage/image.png. If installed on E:, images are not shown, but if installed on C:, all images are visible. Is this problem with security? My servlet http://127.0.0.1:8888/crossdomain.xml is never called.
    Simon

  • Problem building swc that contains s:SolidColor with manifest file

    Hi all,
    I have a problem compiling a library with the command line compiler. The problem is that when I don't use a Manifest file, everything compiles as expected. When I specify a Manifest file for building my swc, I get an error "Could not resolve <s:SolidColor> to a component implementation".
    My library consists of one class, which is: Test.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark">
      <s:Rect x="50" y="50" width="100" height="100">
        <s:fill>
          <s:SolidColor />
        </s:fill>
      </s:Rect>
    </s:Group>
    This is my Manifest.xml
    <?xml version="1.0"?>
    <componentPackage>
              <component id="Test" class="Test"/>
    </componentPackage>
    This commands gives no error and results in a swc successfully
    compc -output TestLibrary.swf -include-classes Test -source-path .
    This commands leads to the error "Could not resolve <s:SolidColor> to a component implementation"
    compc -output TestLibrary.swf -include-classes Test -source-path . -compiler.namespaces.namespace http://test Manifest.xml -include-namespaces http://test
    I think this is the correct way of creating an swc using a Manifest file. Is this correct (so this is a bug?) or am I doing something wrong?

    There's nothing about that VI I can imagine causing an error on build. You might try doing a force compile of your app to track it down. Try opening up your top level VI, hold CTRL+Shift and hit the run arrow at the same time. If it gives you a broken arrow, you can bring up the error list to try to find it. Maybe this will help locate the problem. If you haven't already, might not hurt to do a mass compile of the SPC VI's also.

  • Merging ALAC Library with Lossy Library

    Hi,
    I'm currently mid-way through ripping all of my physical CDs to Apple Lossless in their own iTunes Library. I have a second iTunes Library (my original iTunes Library) that has a good deal of music that I no longer have physical copies of. Is there a way to add the music from the old (lossy) library into the new ALAC library without having to go through and manually remove the lossy versions of songs that occur in both libraries (the vast majority).
    I understand that this will "contaminate" my lossless library with lossy files, but that's okay. I just want everything that I can in losslesss. That said, I don't want to just ignore or get rid of that other music.
    Any ideas?
    Thanks!

    check out PowerTunes.

  • How to raplace resource files in jar file by other files?

    Can I replace resource files (ex: some jpeg file which is in the jar file) when midlet execute on the phone. Is it possible?
    Usualy, we use getResourceAsStream(filename) to get resource data as stream.
    Is there some API function like 'setResource(filenmae,stream)' ??
    Assume that I have a javaME application which displays some image in the jar file.
    It is different from general image viewr program because it can display only
    image file in the jar file (it means image file is resource file of java applcation).
    In other words, when application executes, It shows always same image at first.
    but I want that user can change image displayed if user wnat to do. I want to embed
    authoring function into application. So user can replace resource file by other image files on the phone.
    How to do that?

    I already told you, you CAN'T replace resources in a jar file.
    [http://forums.sun.com/thread.jspa?threadID=5334325]
    Look into using rms to save content on a mobile device.
    Now do you have anything else you want to ask?
    db
    edit And it's also rude to repost the question here without posting a response on the other topic you started.
    Edited by: Darryl.Burke

Maybe you are looking for