| ~~ |
| ~~ Licensed to the Apache Software Foundation (ASF) under one or more |
| ~~ contributor license agreements. See the NOTICE file distributed with |
| ~~ this work for additional information regarding copyright ownership. |
| ~~ The ASF licenses this file to You under the Apache License, Version 2.0 |
| ~~ (the "License"); you may not use this file except in compliance with |
| ~~ the License. You may obtain a copy of the License at |
| ~~ |
| ~~ http://www.apache.org/licenses/LICENSE-2.0 |
| ~~ |
| ~~ Unless required by applicable law or agreed to in writing, software |
| ~~ distributed under the License is distributed on an "AS IS" BASIS, |
| ~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| ~~ See the License for the specific language governing permissions and |
| ~~ limitations under the License. |
| ~~ |
| ~~ |
| |
| -------- |
| Apache Commons Exec |
| -------- |
| -------- |
| 12 November 2008 |
| -------- |
| |
| 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 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 |
| retrieving 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 initiatives to create and maintain a simple, reusable and well-tested package. Since some of the |
| more problematic platforms are not readily available, it is our 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 |
| |
| Version v1.3 (current), is JDK 1.5 compatible - |
| {{{http://commons.apache.org/exec/download_exec.cgi}Download now!}}. |
| |
| Version v1.2, is JDK 1.3 compatible. |
| |
| Version v1.1, is JDK 1.3 compatible. |
| |
| For previous releases, see the {{{http://archive.apache.org/dist/commons/exec/}Apache Archive}}. |
| |
| |