My guess is that your school uses some new packaged classes because they are too lazy to create a one line statement that reads input. EasyReader is not a java class, that is, if you haven't downloaded that add on..
use this:
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int x = br.readLine();
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
The filename should have the same name as the class:
public class X
so the filename should be:
X.java
Is your filename HelloWorld.java ?
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
Ohh I see what it is now, it's your classpath..Have you set it yet?
If you haven't set it to point directly to the tools.jar file
If you have, post it, and I will take a look at it.
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
The Sun compiler is the ONLY official one for the language.
There are others that are certified to be correct but the Sun package (which you claim doesn't work...) is the standard.
Anything that doesn't compile with that should not compile with anything.
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
Sorry, I've never really worked with netbeans, so I don't know anything about setting the classpath on that...Maybe it's the same principle though:
try this:
GOTO: Start -->(right click on)My computer--> properties -->advanced
--environment variables
you should have one that says classpath and path:
set the path variable to the path that points to the bin folder located in your jdk folder
set the classpath variable to the path that points to the tools.jar file located in your jdk folder
Again, not sure if this will work. I don't use netbeans.
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
If you don't even know how to use your classpath you shouldn't be using an IDE at all.
For an IDE, you normally set the included libraries for a project in the project options.
RTFM about how to do that.
As to Netbeans, scrap that piece of junk.
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337