Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

simple compilation error?



Hi Guys, im struggling to compile a couple of classes in a JNI example I'm following ( http://www.pacifier.com/~mmead/jni/cs510ajp/index.html#Example )

The first class HelloWorld.java compiles without any problems, however, when i try and compile TheMane.java i get the following errors

********************************************************************
sam-aspins-mac-mini:~/Jan06/com/manual samaspin$ javac HelloWorld.java
sam-aspins-mac-mini:~/Jan06/com/manual samaspin$ javac TheMane.java
TheMane.java:8: cannot resolve symbol
symbol  : class HelloWorld
location: class com.manual.TheMane
   HelloWorld hello = new HelloWorld();
   ^
TheMane.java:8: cannot resolve symbol
symbol  : class HelloWorld
location: class com.manual.TheMane
   HelloWorld hello = new HelloWorld();
                          ^
2 errors
************************************************************************

the files are as follows


******HelloWorld.java******* package com.manual;

public class HelloWorld {

public native void displayMessage();
 static
 {
   System.loadLibrary("HelloWorldImp");
 }
}
****************************


********TheMane.java*********** package com.manual;


public class TheMane {

public static void main(String[] args)
 {
   HelloWorld hello = new HelloWorld();
   hello.displayMessage();
 }

}
********************************

They compiled fine without the package declarations but I experienced some linking problems later on and feel not including the files in packages may be to blame

thanks in advance

Sam Aspin


_______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.