The access method is available under Windows, Linux, but not OS X

An attempt to build against javax.vecmath using the 1.5.2 jar file (found on Java.net http://java3d.java.net/binary-builds.html , for example).

Try making a call, say, 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()); } } 

On 64-bit Windows and Linux (I just tried Ubuntu 10.04, 64 bit) this compiles and starts.

On OS X (10.6.7), it will not compile:

 ...: cannot find symbol symbol : method getX() location: class javax.vecmath.Point3d System.out.println (t.getX()); 

It uses the same physical vecmath.jar file

If instead I use the source directly, it compiles on OS X but does not start

 Exception in thread "main" java.lang.NoSuchMethodError: javax.vecmath.Point3d.getX()D 

If I compile the sources on OS X to a jar file myself, and then use jar in the above example, again, I cannot compile.

The fields are now accessed in javax.vecmath.Tuple3d, which is an abstract class with public fields for x, y, and z. So on OS X, this will work (in fact, it seems to work everywhere).

 public class Foo { public static void main(String[] args) { Point3d t = new Point3d(1.0, 1.0, 1.0); System.out.println(tx); } } 

The fact is that I am working on a code base that depends on vecmath.jar, and in which the support ones are on Windows and want to continue using access methods, but I'm on OS X.

I am looking for both:

(1) figure out what's going on (2) figure out how to make these sources portable, depending on the vecmath.jar file.

+7
source share
1 answer

"An exception in the stream" main "java.lang.NoSuchMethodError: javax.vecmath.Point3d.getX ()" means that access is to version 1.5.2, and to version 1.3 is vecmath.jar for Apple. The * getter and setter methods were introduced in 1.5.

Check if the outdated version of Java 3D version 1.3 is installed in System / Library / Java / Extensions / on your Mac. Delete all Java 3D 1.3 related files, including vecmath.jar (jar, jnilib), they are useless.

August, InteractiveMesh

+6
source

All Articles