Im new to java and i want to know how to capture java compiler syntax error messages. . .please help me.

Recommended Answers

All 9 Replies

What do you mean capture?

i wanted to save the compile errors in a storage area say like a database

If you are using Unix use this, to redirect the output to a file:

$javac ClassToCompile.java>file.txt

i already tried it. it saves the whole java source code including syntax errors but i just want is save only the syntax errors. .im using bluej compiler which is convenient to use. is there posibility that i can save those error massages in a file using bluej?

i cannot find a simple answer to that anywhere, i too use bluej, the only way that i see is to actually make an extension for bluej with the CompileEvent used somewhere, i don't write bluej extensions nor do i know how, but if you do then i think it may be the only way

i dont know how. anyone know how to please help me.

Ok you can try running javac command with a redirection to a file with > both in linux and windows

javac .......java > error.txt

If you use an editor the error list you can easily see after compilation

use textpad for the purpose..search google for textpad

install java first then install textpad

use ctrl+1 to compile...u will see error list

.im using bluej compiler which is convenient to use. is there posibility that i can save those error massages in a file using bluej?

Ok you can try running javac command with a redirection to a file with > both in linux and windows

javac .......java > error.txt

If you use an editor the error list you can easily see after compilation

use textpad for the purpose..search google for textpad

install java first then install textpad

use ctrl+1 to compile...u will see error list

i don't think that installing a new ide is what viber had in mind

commented: To the original crediter - please "approve" next time =) +2
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.