I wrote a file named compstr.java and tried to compile it c:\jdk1.2\projects\javac compstr.java but it says.. compstr.java is an invalid option or argument usage : javac <-options> < source file> and a list of usage option was given..what could be the problem is it something with classpath ? i gave same name as class file..no upper case or lower case mistake either. Thanks Himabindu
I got: "error: can't read file: compstr.java" Obviously I don't have that file, however, the error you're getting is when an option is entered that the compiler doesn't recognize. Example: javac -f compstr.java I get: -f is an invalid option or arguement. Double check your command line syntax. Option -g is useful for debugging a compile. Hope this helps.
Anxiety does not empty tomorrow of its sorrows, but only empties today of its strength. – Charles Spurgeon
Dear friend put your java file in c:\jdk1.2\bin and then compile instead of putting it in c:\jdk1.2\projects. Hopefully u will not find the said error. You can also compile it from any folder by just setting the class path in console as --- set classpath=c:/jdk1.2/bin; thanx
Joined: May 05, 2001
I am sorry not the set class path but setpath=c:/jdk1.2/bin; in console. thax