i want to display the errors found in compilation in textarea
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sumit_Murgai
Posted On:   Sunday, January 20, 2002 11:55 PM

i am creating a gui for java , i am giving an option to compile the program . one solution is that i use a batch file and do it , but in this case i the errors r shown on cmd prompt . i want the errors to be shown in testarea of java

Re: i want to display the errors found in compilation in textarea

Posted By:   Christopher_Schultz  
Posted On:   Monday, January 21, 2002 05:21 AM

From your program, there are two things you can do:




  1. Run the compiler by creating a Process object, and capturing the standard output and standard error streams. These can, through various combinations of buffers and readers, be "redirected" into a TextArea.



  2. Run the compiler by directly calling the compiler class from your code. This will not create a separate process and you can find some other way to get the errors, etc. from the build. I have never called the compiler directly from Java, so you'll have to do some research on this option.




Good luck,
-chris
About | Sitemap | Contact