• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to redirect the linux terminal contents to a textpane

 
sonu thomas
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi.. I was trying to run a java class file using java code.The aim was to direct the executing sequence of the terminal of fedora 10 into a frame with a textpane.

My code is:


The content of jrun.sh is



When the content of nn.java was this:



It worked smoothly

But when I remove the comment on line--notable,it gave me Textpane with no content.

The problem is : I cant read an input from nn.java

Kindly give me a solution...

If i am able to: get the terminal pop up with executing the nn.class,and i am able to enter the input,the it will do...

Thanks in advance...
 
Rob Spoor
Sheriff
Pie
Posts: 20494
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should really read When Runtime.exec() won't. You are reading from the process' input and error streams sequentially. If the error stream's buffer fills up while you're still reading from the input stream the process will block indefinitely.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic