I have three files, all in the same directory: DistContainer6.x10: import x10.compiler.Native; public class DistContainer6 { public static def main(args:Array[String](1)) { Console.OUT.println("DistContainer6 test: Starting"); val test = new HelloWrapper(); Console.OUT.println("DistContainer6 test: Complete"); } }
HelloWrapper.x10: import x10.compiler.NativeClass; @NativeClass("java", "", "JavaHello") public class HelloWrapper { public native def this(); } JavaHello.java: public class JavaHello { public JavaHello() { // this space intentionally left blank } public void sayHello() { System.out.print("hello from JavaHello"); } } Attempting to compile DistContainer6.x10 results in: x10c: ---------- 1. ERROR in /nfs/17/tbitter/GAStuff/mcsweeny/examples/DistContainer6/HelloWrapper.java (at line 17) public JavaHello ^^^^^^^^^ JavaHello cannot be resolved to a type ---------- 2. ERROR in /nfs/17/tbitter/GAStuff/mcsweeny/examples/DistContainer6/HelloWrapper.java (at line 23) public static HelloWrapper $make(final JavaHello id0){return new HelloWrapper(id0);} ^^^^^^^^^ JavaHello cannot be resolved to a type ---------- 3. ERROR in /nfs/17/tbitter/GAStuff/mcsweeny/examples/DistContainer6/HelloWrapper.java (at line 24) public HelloWrapper(final JavaHello id0) {super(); ^^^^^^^^^ JavaHello cannot be resolved to a type ---------- 4. ERROR in /nfs/17/tbitter/GAStuff/mcsweeny/examples/DistContainer6/HelloWrapper.java (at line 28) this.__NATIVE_FIELD__ = id0; ^^^^^^^^^^^^^^^^^^^^^ JavaHello cannot be resolved to a type ---------- 5. ERROR in /nfs/17/tbitter/GAStuff/mcsweeny/examples/DistContainer6/HelloWrapper.java (at line 39) this.__NATIVE_FIELD__ = new JavaHello((java.lang.System[])null).$init(); ^^^^^^^^^^^^^^^^^^^^^ JavaHello cannot be resolved to a type ---------- 6. ERROR in /nfs/17/tbitter/GAStuff/mcsweeny/examples/DistContainer6/HelloWrapper.java (at line 39) this.__NATIVE_FIELD__ = new JavaHello((java.lang.System[])null).$init(); ^^^^^^^^^ JavaHello cannot be resolved to a type ---------- 6 problems (6 errors) x10c: Non-zero return code: 255 2 errors. And also, JavaHello.java is blanked out. That is, the file is now empty. Things I have tried: - changing the @NativeClass line to: @NativeClass("java", "java.util.concurrent.locks", "ReentrantLock") fixes all errors. - creating a JavaHello object and calling sayHello from a @Native annotation in DistContainer6 works Any ideas? Thanks, Thomas Bitterman Ohio Supercomputer Center tbit...@osc.edu<mailto:tbit...@osc.edu> ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ X10-users mailing list X10-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/x10-users