Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Operating System
JNI with Xcode 3.0 - Adding Java Package
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="niroshpg" data-source="post: 779087" data-attributes="member: 80044"><p>Hi all,</p><p>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 ). </p><p></p><p>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>".</p><p></p><p>I have done the following.</p><p></p><p>1. Create new JNI project (TestJNI) using File-> New Project -> Java -> Java JNI Application" </p><p></p><p>2. Build and run the project.</p><p></p><p>3. In TestJNI.java add following line.</p><p> </p><p> package TestPackage;</p><p></p><p>4. Closed the Xcode IDE. Open src folder of the TestJNI project and create sub directory call "TestPackage" and move TestJNI.java file there.</p><p></p><p>5. Open the project back and perform a clean installation.</p><p></p><p>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 ).</p><p>Line Location build.xml:67: Warning: Could not find file /Users/Nirosh/Projects/JNI/TestJNI/build/Release/libTestJNI.jnilib to copy.</p><p>Line Location TestJNIjnilib.c:10: error: TestJNI.h: No such file or directory</p><p>Line Location TestJNIjnilib.c:10: error: TestJNI.h: No such file or directory</p><p>................</p><p>Line Location Tool:0: error: cannot access TestJNI</p><p></p><p></p><p>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.</p><p></p><p></p><p>Thanks and Best Regards,</p><p>Nirosh</p><p></p><p>[ATTACH=full]9913[/ATTACH]</p></blockquote><p></p>
[QUOTE="niroshpg, post: 779087, member: 80044"] 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 [ATTACH=full]9913[/ATTACH] [/QUOTE]
Verification
Post reply
Forums
Apple Computing Products:
macOS - Operating System
JNI with Xcode 3.0 - Adding Java Package
Top