1.

Solve : How to run Java Program??

Answer»

It is using the MS-DOS Prompt, am i right?
ok so i written some program and i couldn't run it. Maybe i have type the wrong things so hope that someone can solve this problem.

My Java program is saved in C: ----> Java(a folder that i have created) ---> my .java files is saved in here.

so when i run the MS-Dos Prompt, it goes like this:

C:\> ( i typed "cd java")

C:\Java> (then i typed "javac Multiple.java")

C:\Java>javac Multiple.java
Bad command or file name

so i wonder what is wrong or is it i have typed the wrong WAY. hope someone can shed some light. Thanks
The ERROR message refers to the fact that javac cannot be found. EITHER it doesn't exist in your directory c:\Java or anywhere along your path.

Either include the path to the javac program or to your multiple.java program.

My guess is to change directory to where javac lives, and run it as javac c:\java\multiple.java

Hope this helps.

Should be interesting to see where multiple.class ends up. i thought javac is built-in automatically? if that is not so, where can i download this program or others?(i'm running window 98 SE)
i saved it as "Multiple.java" under "all files" not "text documents". i TRIED changing it to D: drive. it is still the same.

i did a seach on Multiple.class and there were no result.It's doubtful that Microsoft would bundle Java which is PUBLISHED by Sun Microsystems. You can download Java from:

http://java.sun.com/j2se/index.jsp

Hope this helps. thanks alot. i am installing now. not sure if i installed the wrong one. because i found one which is 33+Mb annd another 300+Kb... kinda weird.. but i chose the second one ... 307kb..



Discussion

No Comment Found