gcj and JAMA

Andrew Haley aph@redhat.com
Mon Apr 5 10:00:00 GMT 2004


Andreas Balser writes:
 > Hello,
 > 
 > Has anyone succeeded in compiling programs with the
 > JAMA-Matrix-package?
 > 
 > I can generate working byte-code files, but I cannot generate
 > executables, as the following example shows:
 > 
 > import Jama.Matrix;
 > 
 > class TestMatrix{
 > 
 > public static void main (String[] args) {
 > 	double[][] A = new double[1][1];
 > 	A[0][0]=2;
 > 	
 > 	Matrix M = new Matrix(A);
 > 	M.get(0,0);
 > }
 > }
 > 
 > 
 > If I compile byte-code with 
 > :~/java $ gcj -C TestMatrix.java
 > :~/java $ java TestMatrix 
 > 
 > then nothing happens, i.e. it works.
 > However, if I try to compile an executable, then I get a
 > NullPointerException:
 > 
 > :~/java $ gcj TestMatrix.java -o TestMatrix --main=TestMatrix -L /tmp/Jama -lMatrix
 > :~/java $ ./TestMatrix 
 > Exception in thread "main" java.lang.NullPointerException
 > at TestMatrix.main(java.lang.String[]) (Unknown Source)
 > 
 > However, when I remove the "get"-line, it works (also, compiling
 > hello-world works).
 > 
 > Any help would be appreciated!
You need to tell us a bit more. What did you do to compile the
JAMA-Matrix jarfile?
Andrew.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /