java.lang.VerifyError(Eclipse vs Command Line)
Dear all,
I'm a very new user of the java programming language. I'm experimenting with using Eclipse and Java commands built in to our University network. I've come up against a problem that I cannot resolve...
In Eclipse (on Windows), i've written a class which takes routines from some External JARs and produces some outputs. It works, great!
Now I want to run it from the command line (SuSe Linux)...
I've defined my CLASSPATH to include (explicitly) each of the .jar files that are required. Then, i compile my .java file:
javac SobolGenerator.java
BUT i get the following error:
Exception in thread "main" java.lang.VerifyError: (class: Statistics/Random, method: <clinit> signature: ()V) Incompatible argument to function
at QuasiRandom.Sobol.<init>(Sobol.java:436)
at SobolGenerator.generateNew(SobolGenerator.java:43)
at SobolGenerator.main(SobolGenerator.java:151)
I don't think it's anything I've written myself (but probably is), since it refers to an error in the Statistics/Random method...
QuasiRandom.Sobol issues the following command:
double u=Random.U1();
======================================
package Statistics;
import cern.jet.random.*;
import cern.jet.random.engine.MersenneTwister;
public class Random{
static double Y=0; //second normal deviate from Box-Muller
static boolean New=true;//flag indicating wether a new normal deviate
// has to be computed (otherwise Y is reported)
/**
First MersenneTwister uniform random number generator.
*/
public static final Uniform
uniform_1=new Uniform(new MersenneTwister(113));
/**
Second MersenneTwister uniform random number generator.
*/
public static final Uniform
uniform_2=new Uniform(new MersenneTwister(2113));
/**
First uniform u\in(0,1).
*/
public static double U1(){ return uniform_1.nextDouble(); }
/**
Second uniform u\in(0,1).
*/
public static double U2(){ return uniform_2.nextDouble(); }
/** Fair draw from {1,-1}.
*/
public static int Sign()
{
double x=U1(); return (x>0.5)? 1:-1;
}
/**
Loaded draw X from {-1,1}.
* X=1 with probability p,
* X=-1 with probability 1-p.
*
* @param p Probability that X=+1.
*/
public static int Sign(double p)
{
double x=U1(); return (x<p)? 1:-1;
}
/**>
Standard normal deviate using the inverse normal CDF on uniform
* deviates generated by the Mersenne Twister.
*/
public static double STN()
{
return FinMath.N_Inverse(uniform_1.nextDouble());
} //end STN()
} // end Random
==========================================
As i say, Eclipse does the whole thing fine but the command line approach doesn't work.
So if anyone can help I will be extremely grateful.
Best regards,
Neil

