My program is writed in java. I create a new Process of aspell and then I read lines from InputStream, but my program can just read one line (the version of Aspell). Then, the readline is waiting for data. In the command line the call is that:
aspell -a --llang=es --encoding=utf-8 <c:\prueba.txt
and the output is correct.
But when I want to capture this output from the java code I can't do it.
My code java is this:
Runtime r = Runtime.getRuntime();
Process p = r.exec("aspell -a --lang=es --encoding=utf-8 <c:\\prueba.txt");
BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
System.out.println("xivato CmdExec(13)");
while ((line = input.readLine()) != null) {
System.out.println(line);
System.out.println(line);
}
the output of this code is one line with aspell info and then is waiting for more data (don't write suggs results)
(c:\prueba.txt have a incorrect word)
Have not anybody used aspell from java?
keroppi
From: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Aspell-user Digest, Vol 24, Issue 23 Date: 30 Nov 2004 08:56:36 -0800
Send Aspell-user mailing list submissions to [EMAIL PROTECTED]
To subscribe or unsubscribe via the World Wide Web, visit http://lists.gnu.org/mailman/listinfo/aspell-user or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED]
You can reach the person managing the list at [EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific than "Re: Contents of Aspell-user digest..."
Today's Topics:
1. Call aspell from java (keroppi kero) 2. Re: Call aspell from java (Christoph Hinterm?ller) 3. Re: Call aspell from java (Kevin Atkinson)
----------------------------------------------------------------------
Message: 1 Date: Mon, 29 Nov 2004 17:45:40 +0000 From: "keroppi kero" <[EMAIL PROTECTED]> Subject: [Aspell-user] Call aspell from java To: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=iso-8859-1; format=flowed
I'm trying to call aspell from java. I want aspell check one file and put the output in sell console.
I'm using windows XP :(
I've try it with this called:
aspell --lang=es --encoding=utf-8 <c:\pepe.txt
but this call return an error with this message: "Error: You must especify an action" (if I do it from shell comand).
If I do this call from java then Aspell is waitnig for words in the comand line.
How can I do it?
Thanks, Keroppi.
_________________________________________________________________ Hor�scopo, tarot, numerolog�a... Escucha lo que te dicen los astros. http://astrocentro.msn.es/
------------------------------
Message: 2 Date: Mon, 29 Nov 2004 21:06:42 +0100 From: Christoph Hinterm?ller <[EMAIL PROTECTED]> Subject: Re: [Aspell-user] Call aspell from java To: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="iso-8859-1"
Hi
Am Montag, 29. November 2004 18:45 schrieb keroppi kero:
> I'm trying to call aspell from java. I want aspell check one file and put
> the output in sell console.
>
> I'm using windows XP :(
>
> I've try it with this called:
>
> aspell --lang=es --encoding=utf-8 <c:\pepe.txt
>
> but this call return an error with this message: "Error: You must especify
> an action" (if I do it from shell comand).
>
> If I do this call from java then Aspell is waitnig for words in the comand
> line.
>
First of all sorry for the Flame but do you windows guys never read
documentation shiped with the programs just a question ?
Second read manual it tells you that you have to modify your above call line
to
aspell --lang=es --encoding=utf-8 -p <c:\pepe.txt
^^
this small -p tell aspell to do spellchecking in pipemode thus reading form
standard in and writing to standard out. you could spell it like that too
aspell --lang=es --encoding=utf-8 pipe <c:\pepe.txt
if you use -c or check instead of -p or pipe you get the standard console base
UI of aspell >-( grrrrrrrrrrrrrrrrrrrrrrrrr
cu
Xris
ps: read manual and documentation, for basic operation of aspell they are not
out of date only for the special questions they need update grrrrrrrrrrrr >-(
> How can I do it? > > Thanks, Keroppi. > > _________________________________________________________________ > Hor�scopo, tarot, numerolog�a... Escucha lo que te dicen los astros. > http://astrocentro.msn.es/ > > > > _______________________________________________ > Aspell-user mailing list > [EMAIL PROTECTED] > http://lists.gnu.org/mailman/listinfo/aspell-user > >
------------------------------
Message: 3 Date: Mon, 29 Nov 2004 13:27:53 -0700 (MST) From: Kevin Atkinson <[EMAIL PROTECTED]> Subject: Re: [Aspell-user] Call aspell from java To: Christoph Hinterm?ller <[EMAIL PROTECTED]> Cc: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> Content-Type: TEXT/PLAIN; charset=iso-8859-1
On Mon, 29 Nov 2004, Christoph Hinterm�ller wrote:
> Hi
> Am Montag, 29. November 2004 18:45 schrieb keroppi kero:
> > I'm trying to call aspell from java. I want aspell check one file and put
> > the output in sell console.
> >
> > I'm using windows XP :(
> >
> > I've try it with this called:
> >
> > aspell --lang=es --encoding=utf-8 <c:\pepe.txt
> >
> > but this call return an error with this message: "Error: You must especify
> > an action" (if I do it from shell comand).
> >
> > If I do this call from java then Aspell is waitnig for words in the comand
> > line.
> >
> First of all sorry for the Flame but do you windows guys never read
> documentation shiped with the programs just a question ?
> Second read manual it tells you that you have to modify your above call line
> to
> aspell --lang=es --encoding=utf-8 -p <c:\pepe.txt
> ^^
> this small -p tell aspell to do spellchecking in pipemode thus reading form
> standard in and writing to standard out. you could spell it like that too
> aspell --lang=es --encoding=utf-8 pipe <c:\pepe.txt
Um no. The option is '-a' NOT '-p'
-- http://kevin.atkinson.dhs.org
------------------------------
_______________________________________________ Aspell-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/aspell-user
End of Aspell-user Digest, Vol 24, Issue 23 *******************************************
_________________________________________________________________
Hor�scopo, tarot, numerolog�a... Escucha lo que te dicen los astros. http://astrocentro.msn.es/
_______________________________________________ Aspell-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/aspell-user
