File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes help - compiled error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "help - compiled error" Watch "help - compiled error" New topic
Author

help - compiled error

Yuan Tseng
Greenhorn

Joined: Mar 11, 2003
Posts: 21
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

Joined: Dec 06, 2001
Posts: 3061
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.


Java API Documentation
The Java Tutorial
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Don't know what's wrong with your code, but this
compiles without syntax errors:


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Yuan Tseng
Greenhorn

Joined: Mar 11, 2003
Posts: 21
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

Joined: Aug 03, 2002
Posts: 7729
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: help - compiled error
 
Similar Threads
sorting objects
NullPointerException
91%
JAVA FILE INPUT-OUTPUT ... SOMEONE PLEASE HELP!!!!!
how can i read this