English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i have a program on notepad app :
public class welcome{

public static void main(string[]){

system.out.println("welcome to java!");

}

}
then the response inC:command prompt:
C:\java>javac welcome.java
cannot read :welcome.java
1error

2006-12-27 01:35:24 · 2 answers · asked by abdoulaye h 1 in Computers & Internet Programming & Design

2 answers

make sure u r saving the file in ur java installation folder's bin file example:: C:\\java\bin\ save ur files here then compile and run it.
second option to make the environment variable

2006-12-27 01:50:18 · answer #1 · answered by iMaXX 4 · 0 0

i hope you are using winXP, not sure if this method works for older OS.

find the javac.exe file, by default is in 'C:\Program Files\Java\jdk1.5.0_09\bin'

open 'command prompt', drag and drop the javac.exe onto the command prompt and you will see the path there.

press 'space'

then find your welcome.java and drop it into command prompt, it will add another path after the javac.exe

Enter and you should have compiled the java file, by the way, System.out.println should have caps 'S'

2006-12-28 04:02:37 · answer #2 · answered by stealth_boi 2 · 0 0

fedest.com, questions and answers