javac.exe automatically closing

Status
Not open for further replies.

cooldudie3

Boom Boom Boom
I am new to Java and I have downloaded the Java SE 6 SDK. I have finished programming my EXAMPLE.java program but I run javac.exe, it doesn't work. :(It opens, but after a second the command prompt window closes. I try many times but still does not work. Then I try to drag the .java file to the javac.exe. I get a .class file(successful) but according to "Java: A Beginner's Guide 4th Edition", I can open the javac.exe and type a command so it works. It is time consuming to drag the files. And when I run the .class file, java.exe does not work. The same thing happens, the window opens for a second, then closes.:mad::mad: But there are like words before it closes but it is too fast to be seen. :mad::mad:This is annoying and I am disappointed in Sun/Java. Does anyone have a solution?:confused::mad::(
JDK 6 Update 11 installed
Windows XP Pro SP3 system

Update:
I have scanned javac.exe with KAV and reported no viruses, trojans or malware.
I have tried to "Print Screen" but it's waay to fast!:mad:
 

chandru.in

In the zone
This is annoying and I am disappointed in Sun/Java.
You are new to something and don't know how to use it. Then you blame it and get annoyed and disappointed with it. That is very funny. :D

Could you please tell me where you learnt Java from? These kind of knee jerk reactions will not help you learn anything.
 

Faun

Wahahaha~!
Staff member
well...i can understand your problem. Please stop java programming now. Thats the very best advice I can give...lol
 
Last edited:

vamsi360

Always confused
well...i can understand your problem. Please stop java programming now. Thats the very best advice I can give...lol

lol


The problem is you have to open javac.exe in command prompt dude and you have to give one parameter.
Add C:\Program Files\Java\jdk1.6.0\bin to Path section under system variables in environmental variables ( in my computer propreties )

Now got cmd where you saved your .java file and type

javac filename.java and then
java classname

COOL!
 

Faun

Wahahaha~!
Staff member
^^actually some people like to double click every exe they see and command line is like a call of chuthullu for them.

@cooldudie3 if you really want to learn a programming language then first get familiar with basic os concepts.

You may have to set the classpath for java bin directory in win xp or any other os before you may be able to compile it from command line directly.

Open a command prompt. To do that type "cmd" in run dialog box (access it from Start menu).
...oh snap it will be a pain to write that all down.

Kindly refer to the tutorial (written by me for beginners like you)

Link: *t.webofgoo.com/2008/01/03/a-beginners-appraoch-to-java/
*t.webofgoo.com/2008/01/03/a-beginners-appraoch-to-java/
 
Status
Not open for further replies.
Top Bottom