Results 1 to 3 of 3
  1. #1
    JNI with Xcode 3.0 - Adding Java Package

    Member Since
    Dec 31, 2008
    Posts
    2
    JNI with Xcode 3.0 - Adding Java Package
    Hi all,
    I need to create JNI library which can be invoked from a application that implements user defined java packages [ instead of default package ] using XCode 3.0 ( running on OS X 10.5.1 ).

    The existing template for JNI application project in Xcode does not use packages. When introduced used define package build fails with error message indicating "cannot access <target name>".

    I have done the following.

    1. Create new JNI project (TestJNI) using File-> New Project -> Java -> Java JNI Application"

    2. Build and run the project.

    3. In TestJNI.java add following line.

    package TestPackage;

    4. Closed the Xcode IDE. Open src folder of the TestJNI project and create sub directory call "TestPackage" and move TestJNI.java file there.

    5. Open the project back and perform a clean installation.

    This result in a serious of errors and TestJNI.h was never created and it reported following error list ( see attached doc for complete list ).
    Line Location build.xml:67: Warning: Could not find file /Users/Nirosh/Projects/JNI/TestJNI/build/Release/libTestJNI.jnilib to copy.
    Line Location TestJNIjnilib.c:10: error: TestJNI.h: No such file or directory
    Line Location TestJNIjnilib.c:10: error: TestJNI.h: No such file or directory
    ................
    Line Location Tool:0: error: cannot access TestJNI


    I hope that I have missed some small point here but could not figure out it yet. Any help on this regard is highly appreciated.


    Thanks and Best Regards,
    Nirosh
    Attached Files Attached Files

  2. #2
    JNI with Xcode 3.0 - Adding Java Package

    Member Since
    Dec 31, 2008
    Posts
    2
    Hi,
    It seems that

    Building a JNI Universal Application with Xcode 3.0 -- BONNOH FRACTION 13

    approach can be used to implement Java Packages with JNI in Xcode 3.0.

    Still working on confirming this solution ....

    Thanks and best Regards,
    Nirosh

  3. #3
    JNI with Xcode 3.0 - Adding Java Package

    Member Since
    May 28, 2009
    Posts
    1
    did it work?
    I have the same issue after moving the native and java class (and renaiming the native functions accordingly) to a package it no longer compiles (doesn't pull in the javah header), and I have tweaked as much as I can see to tweak.

    did you maange to change the BAse JNI project? or did you build it again from scratch using that link?

    Regards
    Wauyne

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Adding Video to Xcode 4.2
    By ray0004 in forum OS X - Apps and Games
    Replies: 0
    Last Post: 11-20-2011, 05:13 PM
  2. xcode installer plugin to package dmg inside the .mpkg
    By macuser_r in forum OS X - Development and Darwin
    Replies: 0
    Last Post: 10-14-2011, 04:47 AM
  3. A simple example for calling an existing java code from c using jni?
    By missshirin in forum OS X - Development and Darwin
    Replies: 0
    Last Post: 10-14-2010, 04:00 PM
  4. Newbie programmer needs JAVA help in XCODE
    By zeroelink in forum OS X - Development and Darwin
    Replies: 1
    Last Post: 02-02-2006, 11:42 AM
  5. Java and xcode
    By FishStickBoy in forum OS X - Development and Darwin
    Replies: 1
    Last Post: 09-28-2004, 10:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •