Javac and javaw?

I just started learning internet designing In java and till now i have been preety happy with the results but there is something thats really troubling me is that i have programmed a lot of java programs in my university using "import java.io.* " now i know this is only one of the millions of others that u can start a java program with but for some reason my J builder that i use complied a lot of the programs when i used java.io statment but when i switched to java.applet.Applet and java.awt.* it doenst really want to compile so i have to actually complie it using Ms-Dos i know poor me… :bawling:

One more small confusion i noticed that in J2SE they use “JAVAW” instead of “JAVAC” in terms of compiling…Just wondering is here a differce or is it possible to change the J2RE back to javac the one that is usually used???

Hm, that’s wierd that java.io.* works, but the applet class and awt classes don’t.

JavaW is for running programs in Windows from an icon instead of via the command prompt. Here’s more info:

http://developer.java.sun.com/developer/qow/archive/21/index.html

They don’t use javaw for compiling, but for running like Dave said. javac is the SUN JDK’s bytecode compiler. You probably mistook JBuilder’s console output from running your program as that from compilation.

What does JBuilder says when you try to compile it? I’ve a hunch it could be ‘smartly’ kicking in a warning that you can’t do file I/O on an unsigned applet.

“Invalid command line. Error : Invalid path”
This is the error mgs I get when i try to complie using the JBuilder (its actually an old version of JCreator that i use as its really handy) but whereas when i compile if using MS-DOS it compiles fine!!
I checked the “PATH” that we are supposed to set and its perfectly fine and even if it wasnt it wouldnt really compline in the first place…

Thanks Dave, i was also suspecting that they are they same thing as in java.io and applet…and also for the link…Joel you too i guess there must be something wrong with my program (JCreator) but have to figure it out i guess :bawling:

Check your CLASSPATH variable as well to make sure the correct Java libraries are accessible. On mine, I think it’s something like: C:\jdk1.4\lib (or something of that sort.)

I don’t think the standard java libraries in your %JAVA_HOME%\lib directory need to be placed in the CLASSPATH anymore, ever since JDK 1.2 I think. It finds those automatically.

Other libraries, on the other hand, need to be on your CLASSPATH.

Dark_angel: sorry I can’t really help much - not familiar with JCreator (I thought you were using JBuilder in your 1st post) and that error message it throws out is a little too cryptic heh.

well thanks anyway joel, so i guess JBuilder is a better program for compliling java code. I have been using JCreator for like an year, and never did get the time to check out the newer softwares but thanks anyways

I’ve been using JCreator happily for a year… you just need to point it to your sdk and its happy :confused: