How to compile my java?

How i compile java? when i open javac, it closes in less than a second...

[80 byte] By [TheShadyGuy118a] at [2007-11-27 11:17:54]
# 1

just type javac Filename.java

on command prompt

student-javaa at 2007-7-29 14:27:37 > top of Java-index,Java Essentials,Java Programming...
# 2

Make sure that , the CLASSPATH and PATH variables are set in a proper way in Environmentvariables in your system if you are using WINDOWS.

CLASSPATH=%JAVA_HOME%/lib;

PATH=%JAVA-HOME%/bin;

then you have to check in commandprompt by simply typing 'javac'.

if you get the Options, then it is working properly.

hope this may help you.

surendra babu

surendra.INDa at 2007-7-29 14:27:37 > top of Java-index,Java Essentials,Java Programming...
# 3

Hi there

javac is not meant to be double-clicked. You open a dos-window, go to the folder where your source code resides and type something like

javac Helloworld.java

javac is a command-line tool.

Make sure your path-settings are correct. Otherwise Windows wont know where javac.exe resides.

Cheers

reidar20a at 2007-7-29 14:27:37 > top of Java-index,Java Essentials,Java Programming...