Hi,
I have
uname -a
Linux Westparkstr42 2.6.18-4-486 #1 Wed May 9 22:23:40 UTC 2007 i686 GNU/Linux
I can compile hello world like this
public class HelloWorld {
public static void main(
String[] args) {
System.out.println("Hello, World");
}
}
morten@Westparkstr42:~$ javac -version
Eclipse
Java Compiler v_677_R32x, 3.2.1 release, Copyright IBM Corp 2000, 2006. All rights reserved.
morten@Westparkstr42:~$ javac HelloWorld.java
morten@Westparkstr42:~$ java HelloWorld
Hello, World
morten@Westparkstr42:~$
Then I face a problem
here I found something interesting
http://www.cs.princeton.edu/introcs/23recursion/ http://www.cs.princeton.edu/introcs/23recursion/PlasmaCloud.java.html woun't do
javac PlasmaCloud.java
----------
1. ERROR in PlasmaCloud.java (at line 35)
double displacement = StdRandom.gaussian(0, stddev);
^^^^^^^^^
StdRandom cannot be resolved
----------
2. ERROR in PlasmaCloud.java (at line 40)
StdDraw.setPenColor(color);
^^^^^^^
StdDraw cannot be resolved
----------
3. ERROR in PlasmaCloud.java (at line 41)
StdDraw.filledSquare(x, y, size);
^^^^^^^
StdDraw cannot be resolved
----------
4. WARNING in PlasmaCloud.java (at line 57)
int SIZE = Integer.parseInt(args[0]);
^^^^
The local variable SIZE is never read
----------
4 problems (3 errors, 1 warning)morten@Westparkstr42:~$
javac Factorial.java
morten@Westparkstr42:~$ java Factorial 10
3628800
I haven't tried all, Factorial works and the html code looks identical to the ascii code.
but something can be specific to my eclipse java compiler.
i did search for the first error
StdRandom had here no matches.
Best regards from a java newcomer.
Morten