Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PLEASE HELP !!! JDK 1.2 problem

 
Himabindu Devulapalli
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ray Marsh
Ranch Hand
Posts: 458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
katyayan agrawal
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
katyayan agrawal
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sorry not the set class path but setpath=c:/jdk1.2/bin; in console.
thax
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic