Spawn an external process from NetRexx...

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

Spawn an external process from NetRexx...

Fernando Cassia-2
Has anybody played with launching an external process from a
NetRexx-written application?.

What is the best way to achieve it from netrexx?. (sorry if this has
been covered in some of the netrexx tutorials, I managed to misplace
my TNRL print copy).

I´m a fan of using pure-Java whenever it´s possible, but for some
things, I might need to launch a native executable, ie calling
ffmpeg...

Normally in Java I´d have to use Runtime.exec(), hook the filehandles
for output and spawn a tread to look into those

http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

But I wonder if there´s something simpler.

BTW: This is nice reading:
http://www.codeproject.com/KB/java/ProcessHelper.aspx

FC

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Spawn an external process from NetRexx...

Jeff Hennick
Combining this with FC's next note, re: Apache Commons, gives: ( http://commons.apache.org/exec/ )

Apache Commons Exec

Rationale

Executing external processes from Java is a well-known problem area. It is inheriently platform dependent and requires the developer to know and test for platform specific behaviors, for example using cmd.exe on Windows or limited buffer sizes causing deadlocks. The JRE support for this is very limited, albeit better with the new Java SE 1.5 ProcessBuilder class.

Reliably executing external processes can also require knowledge of the environment variables before or after the command is executed. In J2SE 1.1-1.4 there is not support for this, since the method, System.getenv(), for retriving environment variables is deprecated.

There are currently several different libraries that for their own purposes have implemented frameworks around Runtime.exec() to handle the various issues outlined above. The proposed project should aim at coordinating and learning from these initatives to create and maintain a simple, reusable and well-tested package. Since some of the more problematic platforms are not readily available, it is my hope that the broad Apache community can be a great help.

Scope of the package

The package shall create and maintain a process execution package written in the Java language to be distributed under the ASF license. The Java code might also be complemented with scripts (e.g. Perl scripts) to fully enable execution on some operating systems. The package should aim for supporting a wide range of operating systems while still having a consistent API for all platforms.

Releases

The latest version v1.1, is JDK 1.3 compatible - Download now!.

For previous releases, see the Apache Archive.

On 6/16/2011 7:39 AM, Fernando Cassia wrote:
Has anybody played with launching an external process from a
NetRexx-written application?.

What is the best way to achieve it from netrexx?. (sorry if this has
been covered in some of the netrexx tutorials, I managed to misplace
my TNRL print copy).

I´m a fan of using pure-Java whenever it´s possible, but for some
things, I might need to launch a native executable, ie calling
ffmpeg...

Normally in Java I´d have to use Runtime.exec(), hook the filehandles
for output and spawn a tread to look into those

http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

But I wonder if there´s something simpler.

BTW: This is nice reading:
http://www.codeproject.com/KB/java/ProcessHelper.aspx

FC

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/




_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Spawn an external process from NetRexx...

Patrick Forhan
REXX had a cool concept that it would delegate to the calling context whenever it encountered something it couldn't process.  That meant for shell scripts (and CGI scripts by extension), it would delegate to the shell to try and run code.  Did anything like that make it into NetRexx?

Pat.

On Thu, Jun 16, 2011 at 8:52 AM, Jeff Hennick <[hidden email]> wrote:
Combining this with FC's next note, re: Apache Commons, gives: ( http://commons.apache.org/exec/ )

Apache Commons Exec

Rationale

Executing external processes from Java is a well-known problem area. It is inheriently platform dependent and requires the developer to know and test for platform specific behaviors, for example using cmd.exe on Windows or limited buffer sizes causing deadlocks. The JRE support for this is very limited, albeit better with the new Java SE 1.5 ProcessBuilder class.

Reliably executing external processes can also require knowledge of the environment variables before or after the command is executed. In J2SE 1.1-1.4 there is not support for this, since the method, System.getenv(), for retriving environment variables is deprecated.

There are currently several different libraries that for their own purposes have implemented frameworks around Runtime.exec() to handle the various issues outlined above. The proposed project should aim at coordinating and learning from these initatives to create and maintain a simple, reusable and well-tested package. Since some of the more problematic platforms are not readily available, it is my hope that the broad Apache community can be a great help.

Scope of the package

The package shall create and maintain a process execution package written in the Java language to be distributed under the ASF license. The Java code might also be complemented with scripts (e.g. Perl scripts) to fully enable execution on some operating systems. The package should aim for supporting a wide range of operating systems while still having a consistent API for all platforms.

Releases

The latest version v1.1, is JDK 1.3 compatible - Download now!.

For previous releases, see the Apache Archive.

On 6/16/2011 7:39 AM, Fernando Cassia wrote:
Has anybody played with launching an external process from a
NetRexx-written application?.

What is the best way to achieve it from netrexx?. (sorry if this has
been covered in some of the netrexx tutorials, I managed to misplace
my TNRL print copy).

I´m a fan of using pure-Java whenever it´s possible, but for some
things, I might need to launch a native executable, ie calling
ffmpeg...

Normally in Java I´d have to use Runtime.exec(), hook the filehandles
for output and spawn a tread to look into those

http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

But I wonder if there´s something simpler.

BTW: This is nice reading:
http://www.codeproject.com/KB/java/ProcessHelper.aspx

FC

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/




_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/





--
Defy mediocrity.

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Spawn an external process from NetRexx...

Robert L Hamilton
Found this code
Addr_Value =  Translate(Address())               
SELECT /* Addr_Value  */
WHEN Addr_Value  = 'BASH' THEN Say "OP_SYS is 'Generic UNIX'"
WHEN Addr_Value  = 'CMD'  THEN Say "OP_SYS is 'Windoze'"
WHEN Addr_Value  = 'CMS'  THEN Say "OP_SYS is 'z/VM'"
WHEN Addr_Value  = 'KORN' THEN Say "OP_SYS is 'Generic UNIX'"
-- 
OTHERWISE Say '. . . Problem in SELECT . .  '
END /*  select on Addr_Value */

in an old ooRexx4.1 program.
 
BobH
Richardson Texas USA

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Spawn an external process from NetRexx...

Fernando Cassia-2
On Thu, Jun 16, 2011 at 13:03, Robert Hamilton <[hidden email]> wrote:
> Found this code
> Addr_Value =  Translate(Address())
> SELECT /* Addr_Value  */

That is a great code snippet. Many thanks :)

FC

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Spawn an external process from NetRexx...

Fernando Cassia-2
In reply to this post by Jeff Hennick
On Thu, Jun 16, 2011 at 10:52, Jeff Hennick <[hidden email]> wrote:
> Combining this with FC's next note, re: Apache Commons, gives: (
> http://commons.apache.org/exec/ )

Yes, thanks. :) I did ask here first, then I found about Apache
Commons, answering my own question... :)

FC
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Spawn an external process from NetRexx...

Marc Remes
In reply to this post by Fernando Cassia-2
Check out sysutils.zip on the www.netrexx.org download/tools tab.
René was kind enough to post it there.
Some stuff I had lingering around, kind of a rexxutils implementation..
rxCmd is what you are looking for.


Best regards

Marc Remes

IBM Certified IT Specialist
IBM Global Technology Services
Mobile: 32 475 33 8162
mailto:mremes@...



Tenzij hierboven anders aangegeven: / Sauf indication contraire ci-dessus: / Unless otherwise stated above:

International Business Machines of Belgium sprl / bvba
Siège social / Maatschappelijke zetel: Avenue du Bourget 42 Bourgetlaan, B-1130 Bruxelles/Brussel
N° d'entreprise / Ondernemingsnr: TVA / BTW BE 0405 912 336
RPM Bruxelles / RPR Brussel

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/


smime.p7s (12K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Spawn an external process from NetRexx...

alansam


On 21 June 2011 05:58, Marc Remes <[hidden email]> wrote:
Check out sysutils.zip on the www.netrexx.org download/tools tab.
René was kind enough to post it there.
Some stuff I had lingering around, kind of a rexxutils implementation..
rxCmd is what you are looking for.


Best regards

Marc Remes

Nice,

I only have one question: why did you choose to hard wire the envSeparator instead of using System.getProperty("path.separator") in the determineOS method?  Am I missing some subtle distinction?

A.
--
Can't tweet, won't tweet!

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Alan

--
Needs more cowbell.
Reply | Threaded
Open this post in threaded view
|

Re: Spawn an external process from NetRexx...

Robert L Hamilton
Say System.getProperty("path.separator")

Exit;

Returns ;  in jEdit

Bob H

On Tue, Jun 21, 2011 at 10:52 AM, Alan Sampson <[hidden email]> wrote:


On 21 June 2011 05:58, Marc Remes <[hidden email]> wrote:
Check out sysutils.zip on the www.netrexx.org download/tools tab.
René was kind enough to post it there.
Some stuff I had lingering around, kind of a rexxutils implementation..
rxCmd is what you are looking for.


Best regards

Marc Remes

Nice,

I only have one question: why did you choose to hard wire the envSeparator instead of using System.getProperty("path.separator") in the determineOS method?  Am I missing some subtle distinction?

A.
--
Can't tweet, won't tweet!

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/




_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Spawn an external process from NetRexx...

alansam


On 21 June 2011 11:20, Robert Hamilton <[hidden email]> wrote:
Say System.getProperty("path.separator")

Exit;

Returns ;  in jEdit


On Windows...  On UNIX-like systems it will return ':' (colon) on VMS I think it's ',' (comma).  The property's contract within the API is to return the system-dependent path separator character; which is why I asked the question; is there some other reason to not use that property?

A.

--
Can't tweet, won't tweet!

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Alan

--
Needs more cowbell.
Reply | Threaded
Open this post in threaded view
|

Re: Spawn an external process from NetRexx...

Robert L Hamilton
I would have guessed / for a 'path separator' on windoze

BobH

On Tue, Jun 21, 2011 at 2:45 PM, Alan Sampson <[hidden email]> wrote:


On 21 June 2011 11:20, Robert Hamilton <[hidden email]> wrote:
Say System.getProperty("path.separator")

Exit;

Returns ;  in jEdit


On Windows...  On UNIX-like systems it will return ':' (colon) on VMS I think it's ',' (comma).  The property's contract within the API is to return the system-dependent path separator character; which is why I asked the question; is there some other reason to not use that property?

A.

--
Can't tweet, won't tweet!

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/




_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Spawn an external process from NetRexx...

Patrick Forhan
path.separator is the separator for path variables, like PATH, CLASSPATH or LIBPATH
file.separator is what you are thinking of.

Pat.

On Tue, Jun 21, 2011 at 3:49 PM, Robert Hamilton <[hidden email]> wrote:
I would have guessed / for a 'path separator' on windoze

BobH

On Tue, Jun 21, 2011 at 2:45 PM, Alan Sampson <[hidden email]> wrote:


On 21 June 2011 11:20, Robert Hamilton <[hidden email]> wrote:
Say System.getProperty("path.separator")

Exit;

Returns ;  in jEdit


On Windows...  On UNIX-like systems it will return ':' (colon) on VMS I think it's ',' (comma).  The property's contract within the API is to return the system-dependent path separator character; which is why I asked the question; is there some other reason to not use that property?

A.

--
Can't tweet, won't tweet!

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/




_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/





--
Defy mediocrity.

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Spawn an external process from NetRexx...

Robert L Hamilton
Think you, Pat.

BobH

On Tue, Jun 21, 2011 at 4:04 PM, Patrick Forhan <[hidden email]> wrote:
path.separator is the separator for path variables, like PATH, CLASSPATH or LIBPATH
file.separator is what you are thinking of.

Pat.


On Tue, Jun 21, 2011 at 3:49 PM, Robert Hamilton <[hidden email]> wrote:
I would have guessed / for a 'path separator' on windoze

BobH

On Tue, Jun 21, 2011 at 2:45 PM, Alan Sampson <[hidden email]> wrote:


On 21 June 2011 11:20, Robert Hamilton <[hidden email]> wrote:
Say System.getProperty("path.separator")

Exit;

Returns ;  in jEdit


On Windows...  On UNIX-like systems it will return ':' (colon) on VMS I think it's ',' (comma).  The property's contract within the API is to return the system-dependent path separator character; which is why I asked the question; is there some other reason to not use that property?

A.

--
Can't tweet, won't tweet!

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/




_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/





--
Defy mediocrity.

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/




_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Spawn an external process from NetRexx...

Kermit Kiser
In reply to this post by Robert L Hamilton
Bob --

Do not put the "exit" statement in scripts executed under NetRexxScript. It will break the output routing for subsequent scripts and you will not see any "say" output after that until you restart jEdit. If you need an explicit exit use the "return" statement.

Sorry about the undocumented bug.

-- Kermit


On 6/21/2011 11:20 AM, Robert Hamilton wrote:
Say System.getProperty("path.separator")

Exit;

Returns ;  in jEdit

Bob H

On Tue, Jun 21, 2011 at 10:52 AM, Alan Sampson <[hidden email]> wrote:


On 21 June 2011 05:58, Marc Remes <[hidden email]> wrote:
Check out sysutils.zip on the www.netrexx.org download/tools tab.
René was kind enough to post it there.
Some stuff I had lingering around, kind of a rexxutils implementation..
rxCmd is what you are looking for.


Best regards

Marc Remes

Nice,

I only have one question: why did you choose to hard wire the envSeparator instead of using System.getProperty("path.separator") in the determineOS method?  Am I missing some subtle distinction?

A.
--
Can't tweet, won't tweet!

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/



_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Spawn an external process from NetRexx...

Aviatrexx
In reply to this post by Robert L Hamilton
Like a lot of terms derived from UNIX, "path" is ambiguous unless
further defined.  If you are talking about a "file path", Windows uses
the slash character, but that in itself is ambiguous.

Windows (technically the DOS shell underlying/associated with it) uses
"\" as a file path separator.  If you are using the "Command Prompt"
window, cmd.exe (as did its predecessor command.com) will accept only
the back-slash in a file path.

MS-DOS started life as QDOS (Quick & Dirty Operating System), a
knock-off of CP/M, which itself was a derivative of UNIX.  Legend has
it that Bill Gates changed the file path separator character from '/'
to '\' in order to make MS-DOS just different enough from CP/M to be
legal.

Many, but hardly all of the routines in Windows will accept both
angles of slash, but the back-slash is the only one that works with
all parts of the OS.

-Chip-

On 6/21/11 20:49 Robert Hamilton said:

> I would have guessed / for a 'path separator' on windoze
>
> BobH
>
> On Tue, Jun 21, 2011 at 2:45 PM, Alan Sampson <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>
>
>     On 21 June 2011 11:20, Robert Hamilton <[hidden email]
>     <mailto:[hidden email]>> wrote:
>
>         Say System.getProperty("path.separator")
>
>         Exit;
>
>         Returns ;  in jEdit
>
>
>     On Windows...  On UNIX-like systems it will return ':' (colon) on
>     VMS I think it's ',' (comma).  The property's contract within the
>     API is to return the system-dependent path separator character;
>     which is why I asked the question; is there some other reason to not
>     use that property?
>
>     A.
>
>     --
>     Can't tweet, won't tweet!
>
>     _______________________________________________
>     Ibm-netrexx mailing list
>     [hidden email] <mailto:[hidden email]>
>     Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Spawn an external process from NetRexx...

ThSITC
May I, for 10 cents, simply add:

The package org.netrexx.runtime.compatibility

will simply setup  some (NEW) conventions for this:

1. ) Any backslash in a given file-naMe will be translated to a slash
(WHEN opSys is Linux, Unix, AIX, or whatsoever)

2.) Any slash in a given filename will be tranlated to a back-slash
(under Windows)

Thus, we willl have a *convention* once forver to use URL notation (with
slashes), within org.netrexx.runtime.compatibility


Will save a lot of (too detailed) struggles, IMHO :-)

Greetings from Vienna,
Thomas.

PS: Only disadvantge is foresee is that (Windows) File-Names might not
contain a slash!
========================================================


Am 22.06.2011 14:35, schrieb Chip Davis:

> Like a lot of terms derived from UNIX, "path" is ambiguous unless
> further defined.  If you are talking about a "file path", Windows uses
> the slash character, but that in itself is ambiguous.
>
> Windows (technically the DOS shell underlying/associated with it) uses
> "\" as a file path separator.  If you are using the "Command Prompt"
> window, cmd.exe (as did its predecessor command.com) will accept only
> the back-slash in a file path.
>
> MS-DOS started life as QDOS (Quick & Dirty Operating System), a
> knock-off of CP/M, which itself was a derivative of UNIX.  Legend has
> it that Bill Gates changed the file path separator character from '/'
> to '\' in order to make MS-DOS just different enough from CP/M to be
> legal.
>
> Many, but hardly all of the routines in Windows will accept both
> angles of slash, but the back-slash is the only one that works with
> all parts of the OS.
>
> -Chip-
>
> On 6/21/11 20:49 Robert Hamilton said:
>> I would have guessed / for a 'path separator' on windoze
>>
>> BobH
>>
>> On Tue, Jun 21, 2011 at 2:45 PM, Alan Sampson <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>>
>>
>>     On 21 June 2011 11:20, Robert Hamilton <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>>         Say System.getProperty("path.separator")
>>
>>         Exit;
>>
>>         Returns ;  in jEdit
>>
>>
>>     On Windows...  On UNIX-like systems it will return ':' (colon) on
>>     VMS I think it's ',' (comma).  The property's contract within the
>>     API is to return the system-dependent path separator character;
>>     which is why I asked the question; is there some other reason to not
>>     use that property?
>>
>>     A.
>>
>>     --     Can't tweet, won't tweet!
>>
>>     _______________________________________________
>>     Ibm-netrexx mailing list
>>     [hidden email] <mailto:[hidden email]>
>>     Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Ibm-netrexx mailing list
>> [hidden email]
>> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>>
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>
>


--
Thomas Schneider (www.thsitc.com)
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Thomas Schneider, Vienna, Austria (Europe) :-)

www.thsitc.com
www.db-123.com
Reply | Threaded
Open this post in threaded view
|

Re: Spawn an external process from NetRexx...

alansam


On 22 June 2011 06:49, Thomas Schneider <[hidden email]> wrote:
May I, for 10 cents, simply add:

The package org.netrexx.runtime.compatibility

will simply setup  some (NEW) conventions for this:

1. ) Any backslash in a given file-naMe will be translated to a slash (WHEN opSys is Linux, Unix, AIX, or whatsoever)

2.) Any slash in a given filename will be tranlated to a back-slash (under Windows)

Thus, we willl have a *convention* once forver to use URL notation (with slashes), within org.netrexx.runtime.compatibility


This system dependent minutia is outside the scope of the NetRexx language and the compiler should not be muddying the waters by getting involved.  NetRexx does not need have an opinion on this or interfere with anyone's code.  No surprises please.

A.

--
Can't tweet, won't tweet!

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Alan

--
Needs more cowbell.
Reply | Threaded
Open this post in threaded view
|

Re: Spawn an external process from NetRexx...

rvjansen
In reply to this post by ThSITC
Thomas,

I don't think so, Java has mechanisms to deal with this already.

René.

On 22 jun 2011, at 15:49, Thomas Schneider wrote:

> May I, for 10 cents, simply add:
>
> The package org.netrexx.runtime.compatibility
>
> will simply setup  some (NEW) conventions for this:
>
> 1. ) Any backslash in a given file-naMe will be translated to a slash (WHEN opSys is Linux, Unix, AIX, or whatsoever)
>
> 2.) Any slash in a given filename will be tranlated to a back-slash (under Windows)
>
> Thus, we willl have a *convention* once forver to use URL notation (with slashes), within org.netrexx.runtime.compatibility
>
>
> Will save a lot of (too detailed) struggles, IMHO :-)
>
> Greetings from Vienna,
> Thomas.
>
> PS: Only disadvantge is foresee is that (Windows) File-Names might not contain a slash!
> ========================================================
>
>
> Am 22.06.2011 14:35, schrieb Chip Davis:
>> Like a lot of terms derived from UNIX, "path" is ambiguous unless further defined.  If you are talking about a "file path", Windows uses the slash character, but that in itself is ambiguous.
>>
>> Windows (technically the DOS shell underlying/associated with it) uses "\" as a file path separator.  If you are using the "Command Prompt" window, cmd.exe (as did its predecessor command.com) will accept only the back-slash in a file path.
>>
>> MS-DOS started life as QDOS (Quick & Dirty Operating System), a knock-off of CP/M, which itself was a derivative of UNIX.  Legend has it that Bill Gates changed the file path separator character from '/' to '\' in order to make MS-DOS just different enough from CP/M to be legal.
>>
>> Many, but hardly all of the routines in Windows will accept both angles of slash, but the back-slash is the only one that works with all parts of the OS.
>>
>> -Chip-
>>
>> On 6/21/11 20:49 Robert Hamilton said:
>>> I would have guessed / for a 'path separator' on windoze
>>>
>>> BobH
>>>
>>> On Tue, Jun 21, 2011 at 2:45 PM, Alan Sampson <[hidden email] <mailto:[hidden email]>> wrote:
>>>
>>>
>>>
>>>    On 21 June 2011 11:20, Robert Hamilton <[hidden email]
>>> <mailto:[hidden email]>> wrote:
>>>
>>>        Say System.getProperty("path.separator")
>>>
>>>        Exit;
>>>
>>>        Returns ;  in jEdit
>>>
>>>
>>>    On Windows...  On UNIX-like systems it will return ':' (colon) on
>>>    VMS I think it's ',' (comma).  The property's contract within the
>>>    API is to return the system-dependent path separator character;
>>>    which is why I asked the question; is there some other reason to not
>>>    use that property?
>>>
>>>    A.
>>>
>>>    --     Can't tweet, won't tweet!
>>>
>>>    _______________________________________________
>>>    Ibm-netrexx mailing list
>>>    [hidden email] <mailto:[hidden email]>
>>>    Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Ibm-netrexx mailing list
>>> [hidden email]
>>> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>>>
>> _______________________________________________
>> Ibm-netrexx mailing list
>> [hidden email]
>> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>>
>>
>
>
> --
> Thomas Schneider (www.thsitc.com)
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>


_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Spawn an external process from NetRexx...

ThSITC
Hi Rene,
    exactly, and that is the reason why I'm implementing it in RexxFile :-)
It will be already there in my upcoming submission of my new run-time
package

org.netrexx.runtime.compatibility

I'l also, first time, use all the JAR File attributes (Licence, Author, etc)
in this next release (for trial)

Have a nice week.
Thomas.
=======================================================
Am 22.06.2011 20:29, schrieb René Jansen:

> Thomas,
>
> I don't think so, Java has mechanisms to deal with this already.
>
> René.
>
> On 22 jun 2011, at 15:49, Thomas Schneider wrote:
>
>> May I, for 10 cents, simply add:
>>
>> The package org.netrexx.runtime.compatibility
>>
>> will simply setup  some (NEW) conventions for this:
>>
>> 1. ) Any backslash in a given file-naMe will be translated to a slash (WHEN opSys is Linux, Unix, AIX, or whatsoever)
>>
>> 2.) Any slash in a given filename will be tranlated to a back-slash (under Windows)
>>
>> Thus, we willl have a *convention* once forver to use URL notation (with slashes), within org.netrexx.runtime.compatibility
>>
>>
>> Will save a lot of (too detailed) struggles, IMHO :-)
>>
>> Greetings from Vienna,
>> Thomas.
>>
>> PS: Only disadvantge is foresee is that (Windows) File-Names might not contain a slash!
>> ========================================================
>>
>>
>> Am 22.06.2011 14:35, schrieb Chip Davis:
>>> Like a lot of terms derived from UNIX, "path" is ambiguous unless further defined.  If you are talking about a "file path", Windows uses the slash character, but that in itself is ambiguous.
>>>
>>> Windows (technically the DOS shell underlying/associated with it) uses "\" as a file path separator.  If you are using the "Command Prompt" window, cmd.exe (as did its predecessor command.com) will accept only the back-slash in a file path.
>>>
>>> MS-DOS started life as QDOS (Quick&  Dirty Operating System), a knock-off of CP/M, which itself was a derivative of UNIX.  Legend has it that Bill Gates changed the file path separator character from '/' to '\' in order to make MS-DOS just different enough from CP/M to be legal.
>>>
>>> Many, but hardly all of the routines in Windows will accept both angles of slash, but the back-slash is the only one that works with all parts of the OS.
>>>
>>> -Chip-
>>>
>>> On 6/21/11 20:49 Robert Hamilton said:
>>>> I would have guessed / for a 'path separator' on windoze
>>>>
>>>> BobH
>>>>
>>>> On Tue, Jun 21, 2011 at 2:45 PM, Alan Sampson<[hidden email]<mailto:[hidden email]>>  wrote:
>>>>
>>>>
>>>>
>>>>     On 21 June 2011 11:20, Robert Hamilton<[hidden email]
>>>> <mailto:[hidden email]>>  wrote:
>>>>
>>>>         Say System.getProperty("path.separator")
>>>>
>>>>         Exit;
>>>>
>>>>         Returns ;  in jEdit
>>>>
>>>>
>>>>     On Windows...  On UNIX-like systems it will return ':' (colon) on
>>>>     VMS I think it's ',' (comma).  The property's contract within the
>>>>     API is to return the system-dependent path separator character;
>>>>     which is why I asked the question; is there some other reason to not
>>>>     use that property?
>>>>
>>>>     A.
>>>>
>>>>     --     Can't tweet, won't tweet!
>>>>
>>>>     _______________________________________________
>>>>     Ibm-netrexx mailing list
>>>>     [hidden email]<mailto:[hidden email]>
>>>>     Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>>>>
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> Ibm-netrexx mailing list
>>>> [hidden email]
>>>> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>>>>
>>> _______________________________________________
>>> Ibm-netrexx mailing list
>>> [hidden email]
>>> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>>>
>>>
>>
>> --
>> Thomas Schneider (www.thsitc.com)
>> _______________________________________________
>> Ibm-netrexx mailing list
>> [hidden email]
>> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>>
>


--
Thomas Schneider (www.thsitc.com)
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Thomas Schneider, Vienna, Austria (Europe) :-)

www.thsitc.com
www.db-123.com