• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help - compiled error

 
Yuan Tseng
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I just learn Java about 2 month's. Is there anyone can help me solve this problem.
the code is like that:

I got a compiled error
Thanks in advance.
J.
[ edited to preserve formatting using the [code] and [/code] UBB tags -ds ]
[ March 11, 2003: Message edited by: Dirk Schreckmann ]
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is very strange. I don't see anything wrong with that line of code. Which version of Java are you using? To find out, you can type "java -version" at the command line.
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't know what's wrong with your code, but this
compiles without syntax errors:
 
Yuan Tseng
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i was using 'sun one studio' to compile. how do i find out which version from that? but i also tried to (c:\jdk1.3.1_07\bin\java-version) and got an error message 'bad command or file name'. i am using window 98.
thanks again.
yuan
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, it looks like you should have 1.3.1_07.
To confirm, go into a DOS command window and type:
java -version ( that's a space after java ).
If the java command cannot be found you can add "set PATH=c:\jdk1.3.1_07\bin;%PATH%" to your AUTOEXEC.BAT file and reboot. Don't put the quotes in.
Copy your source code to a directory like c:\temp, change into it, and compile the files outside the SunOne IDE. If that works we know where the real problem lies.
[ March 13, 2003: Message edited by: Barry Gaunt ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic