![]() |
| ||
| I need a good java compiler Hi all, does anyone know of a good compiler I can download for java? It would be nice if it was an IDE but it does not have to be. I currently have the j2sdk-1_4 compiler http://java.sun.com/j2se/1.4.1/download.html and it does not seem to work that well. Also I know that this is really easy, but hey I can't compile anything I make, what is wrong with this code? public class BuckleShoe |
| ||
| Re: I need a good java compiler 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(); |
| ||
| Re: I need a good java compiler Quote:
public class HelloWorld I get an error message that says: Empty.java [1:1] class HelloWorld is public, should be declared in a file named HelloWorld.java public class HelloWorld ^ 1 error Errors compiling Empty. I don't understand, am I supposed to save in some sort of special file/format before compiling? |
| ||
| Re: I need a good java compiler 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 ? |
| ||
| Re: I need a good java compiler Quote:
java.lang.NoClassDefFoundError: Mystuff/Empty |
| ||
| Re: I need a good java compiler 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. |
| ||
| Re: I need a good java compiler Actually I haven't :o how would I start to do this? I have Netbeans IDE version 3.6 as my compiler, and I am running it on windoze xp home. |
| ||
| Re: I need a good java compiler 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. |
| ||
| Re: I need a good java compiler 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. |
| ||
| Re: I need a good java compiler 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. |
| All times are GMT -4. The time now is 8:11 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC