Someone else already suggested a way around this in an earlier post.
Rather than sending e.g. "mailto:a@xxxxx";, try "start mailto:a@xxxxx";.
This certainly works for me if I try to type these into cmd.exe.  I haven't
tried from a Java program using rt.exec, but there's no reason why it
shouldn't work...

I'm not entirely sure why/how this works though, I cannot find a start.exe
that this is running?

Hope this helps,

Nigel Gay,
Computer Patent Annuities.

             om>                                                        To 
             Sent by:                  Java Programming on and around the  
             java400-l-bounces         iSeries / AS400                     
             @midrange.com             <java400-l@xxxxxxxxxxxx>            
             27/10/2005 12:39                                      Subject 
                                       Re: Questions on "Calling PC        
                                       Commands from RPG" article          
             Please respond to                                             
             Java Programming                                              
             on and around the                                             
              iSeries / AS400                                              

On 10/27/05, Walden H. Leverich <WaldenL@xxxxxxxxxxxxxxx> wrote:
> You need to get the shell to process your request.

I figured they were two different animals. CMD.EXE can handle .com, .exe,
.bat, etc. The "shell" can handle these as well as URL ... commands(?),
mailto:, http:, etc.? Right?

So, the magic question becomes, how do I do this? I see in the java source
there are a few statements that catch my eye that seem to be related to
actually processing the command:
Runtime rt = Runtime.getRuntime();
Process ps = rt.exec(Command_To_Execute);

Are there "shell" processes that can supplant cmd.exe usage?

TIA, Dan
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.

The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee; access to this
email by anyone else is unauthorised.

If you are not the intended recipient: (1) you are kindly requested
to return a copy of this message to the sender indicating that you
have received it in error, and to destroy the received copy; and (2)
any disclosure or distribution of this message, as well as any action
taken or omitted to be taken in reliance on its content, is prohibited
and may be unlawful.

This thread ...


Return to Archive home page | Return to MIDRANGE.COM home page