Java – accessor method visible under windows and Linux, but not OS X
Try 1.5 2 jar file (for example, in java.net http://java3d.java.net/binary-builds.html To build javax vecmath.
Try calling, such as point3d;
public class Foo { public static void main(String[] args) { Point3d t = new Point3d(1.0,1.0,1.0); System.out.println(t.getX()); } }
In 64 - bit windows and Linux (I've only tried Ubuntu 10.04, 64 - bit), this compiles and runs
In OS X (10.6.7), it does not compile:
...: cannot find symbol symbol : method getX() location: class javax.vecmath.Point3d System.out.println (t.getX());
This is using exactly the same physical vecpath jar
If I use the source code directly, it will compile on OS X, but it will not run
Exception in thread "main" java.lang.NoSuchMethodError: javax.vecmath.Point3d.getX()D
If I compile the source code into a jar file on OS X and then use the jar in the above example, I cannot compile
Now, the field being accessed is in javax vecmath. In tuple3d, this is an abstract class with X, y, and Z common fields So on OS X, this will work (in fact, it seems everywhere)
public class Foo { public static void main(String[] args) { Point3d t = new Point3d(1.0,1.0); System.out.println(t.x); } }
The problem is, I'm developing one that relies on vecpath Jar code base, where the maintainer is on windows and wants to continue using the accessor method, but I am on OS X
I look forward to two:
(1) Understand what happened (2) according to vecpath Jar file to figure out how to make these sources portable
Solution
"Exception in thread" main "Java. Lang. nosuchmethoderror: javax. Vecpath. Point3d. Getx()" indicates that it is not 1.5 2, but access vecpath Apple version 1.3.0 of jar * getter "and" setter "methods are introduced in 1.5
Check whether Apple's outdated Java 3D version 1.3 is installed in Apple's system / library / Java / extensions / Delete all Java 3D 1.3 related files, including vecpath Jar (jar, jnilib), they are useless
August, interactive mesh