commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mat Jaggard <apa...@jaggard.org.uk>
Subject Re: [math] Help, how to compile? Thanks a huge
Date Mon, 07 Jan 2013 08:45:40 GMT
You need to use -classpath when you run java as well as when you run javac.

Also, you need to include [math] on your subject line when posting about
that module to this list.


On 7 January 2013 08:29, George Xu <togeorgexu@gmail.com> wrote:

> Hi,
>
> Anyone can help? I am new and has difficulty in compiling with the .jar
> files.
>
> I downloaded the .zip file, unzipped and put the 4 .jar files at
> c:\Users\herehere.
> I wrote a simple test code at the same directory(the current directory, as
> above.
> .(current directory) is at Environmental Variable, CLASSPATH. But it does
> not
> compile simply by .>Javac Test.java.
>
> I compiled with
> .>javac -CLASSPATH c:\Users\herehere\xxx.jar Test.java (I explicitly spell
> out
> xxx and tried all four). The compike passed. But cannot .>java Test, and it
> complains java.lang.NoClassDefFoundError.
>
> Help please,
>
>
> ________________________________
> import
> java.util.*;
> import
> org.apache.commons.math3.*;
> public
> class Test {
> public static void main(String[] args) {
> System.out.println(
> "Hello World!"); // Display the string.
> Vector v=
> new Vector();
> v.add(
> "1");v.add("2");v.add("3");v.add("4");v.add("5");
> v.insertElementAt(v.remove(v.size()-1),0);
> int i=0;
> while(i<v.size()){
> System.out.println(
> "E @ i:\t"+v.get(i));
> i++;
> Acosh a=
> new Acosh();
> System.out.println(
> "acosh:\t"+a.value(2.5));
> }
> }
> }
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message