You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

platform.html 8.0 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <!--
  2. Licensed to the Apache Software Foundation (ASF) under one or more
  3. contributor license agreements. See the NOTICE file distributed with
  4. this work for additional information regarding copyright ownership.
  5. The ASF licenses this file to You under the Apache License, Version 2.0
  6. (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. -->
  15. <html>
  16. <head>
  17. <meta http-equiv="Content-Language" content="en-us">
  18. <link rel="stylesheet" type="text/css" href="stylesheets/style.css">
  19. <title>Platform Issues</title>
  20. </head>
  21. <body>
  22. <h1>Platform Issues</h1>
  23. <h2>Java versions</h2>
  24. <h3>Java 5</h3>
  25. <p>
  26. You may need a bigger stack than default, especially if you are using
  27. the built in XSLT engine. We recommend you use Apache Xalan; indeed,
  28. some tasks (JUnit report in XML, for example) may not work against the
  29. shipping XSL engine.
  30. </p>
  31. <h2>Unix and Linux</h2>
  32. <ul>
  33. <li>You should use a GNU version of <code>tar</code> to untar the Apache
  34. Ant source tree, if you have downloaded this as a tar file. If you get
  35. weird errors about missing files, this is the problem.</li>
  36. <li>Ant does not preserve file permissions when a file is copied,
  37. moved or archived, because Java does not let it read or write the
  38. permissions. Use <code>&lt;chmod&gt;</code> to set permissions, and
  39. when creating a tar archive, use the <var>mode</var> attribute
  40. of <code>&lt;tarfileset&gt;</code> to set the permissions in the tar
  41. file, or <code>&lt;apply&gt;</code> the real tar program.</li>
  42. <li>Ant is not symbolic link aware in moves, deletes and when
  43. recursing down a tree of directories to build up a list of
  44. files. Unexpected things can happen.</li>
  45. <li>Linux on IA-64: apparently you need a larger heap than the default
  46. one (64M) to compile big projects. If you get out of heap errors,
  47. either increase the heap or use a forking javac. Better yet, use jikes
  48. for extra compilation speed.</li>
  49. </ul>
  50. <h2>Microsoft Windows</h2>
  51. <p>
  52. Windows 9x (win95, win98, win98SE and winME) are not supported in Ant1.7,
  53. </p>
  54. <p>
  55. The Ant team has retired support for these products because they are
  56. outdated and can expose customers to security risks. We recommend that
  57. customers who are still running Windows 98 or Windows Me upgrade to a
  58. newer, more secure operating system, as soon as possible.
  59. </p>
  60. <p>
  61. Customers who upgrade to Linux report improved security, richer
  62. functionality, and increased productivity.
  63. </p>
  64. <h2>Microsoft Windows 2K, XP and Server 2K03</h2>
  65. <p>
  66. Windows 9x (win95, win98, win98SE and winME) has a batch file system
  67. which does not work fully with long file names, so we recommend that
  68. ant and the JDK are installed into directories without spaces, and
  69. with 8.3 filenames. The Perl and Python launcher scripts do not
  70. suffer from this limitation.
  71. </p>
  72. <p>
  73. All versions of Windows are usually case insensitive, although mounted
  74. file systems (Unix drives, ClearCase views) can be case sensitive
  75. underneath, confusing patternsets.
  76. </p>
  77. <p>
  78. Ant can often not delete a directory which is open in an Explorer
  79. window. There is nothing we can do about this short of spawning a
  80. program to kill the shell before deleting directories. Nor can files
  81. that are in use be overwritten.
  82. </p>
  83. <p>
  84. Finally, if any Ant task fails with an <code>error=2</code>, it
  85. means that whatever native program Ant is trying to run, it is not
  86. on the path.
  87. </p>
  88. <h2>Microsoft Windows Vista</h2>
  89. <p>
  90. There are reports of problems with Windows Vista security bringing
  91. up dialog boxes asking if the user wants to run an untrusted
  92. executable during an Ant run, such as when the &lt;signjar&gt; task
  93. runs the <code>jarsigner.exe</code> program. This is beyond Ant's
  94. control, and stems from the OS trying to provide some illusion of
  95. security by being reluctant to run unsigned native executables. The
  96. latest Java versions appear to resolve this problem by having signed
  97. binaries.
  98. </p>
  99. <h2>Cygwin</h2>
  100. <p>
  101. Cygwin is not an operating system; rather it is an application suite
  102. running under Windows and providing some UNIX like functionality. Sun
  103. has not created any specific Java Development Kit or Java Runtime
  104. Environment for cygwin. See this
  105. link: <a href="http://www.inonit.com/cygwin/faq/">http://www.inonit.com/cygwin/faq/</a>.
  106. Only Windows path names are supported by JDK and JRE tools under
  107. Windows or cygwin. Relative path names such as "src/org/apache/tools"
  108. are supported, but Java tools do not
  109. understand <samp>/cygdrive/c</samp> to mean <samp>c:\</samp>.
  110. </p>
  111. <p>
  112. The utility <code>cygpath</code> (used industrially in
  113. the <code>ant</code> script to support cygwin) can convert cygwin path
  114. names to Windows. You can use the <code>&lt;exec&gt;</code> task in
  115. Ant to convert cygwin paths to Windows path, for instance like that:
  116. </p>
  117. <pre>
  118. &lt;property name=&quot;some.cygwin.path&quot; value=&quot;/cygdrive/h/somepath&quot;/&gt;
  119. &lt;exec executable=&quot;cygpath&quot; outputproperty=&quot;windows.pathname&quot;&gt;
  120. &lt;arg value=&quot;--windows&quot;/&gt;
  121. &lt;arg value=&quot;${some.cygwin.path}&quot;/&gt;
  122. &lt;/exec&gt;
  123. &lt;echo message=&quot;${windows.pathname}&quot;/&gt;
  124. </pre>
  125. <p>
  126. We get lots of support calls from Cygwin users. Either it is
  127. incredibly popular, or it is trouble. If you do use it, remember that
  128. Java is a Windows application, so Ant is running in a Windows process,
  129. not a Cygwin one. This will save us having to mark your bug reports as
  130. invalid.
  131. </p>
  132. <h2>Apple MacOS X/macOS</h2>
  133. <p>
  134. MacOS X a.k.a. macOS is the first of the Apple platforms that Ant
  135. supports completely; it is treated like any other Unix.
  136. </p>
  137. <h2>Novell Netware</h2>
  138. <p>
  139. To give the same level of sophisticated control as Ant's startup
  140. scripts on other platforms, it was decided to make the main ant
  141. startup on NetWare be via a Perl Script, <code>runant.pl</code>. This
  142. is found in the <samp>bin</samp> directory (for
  143. instance&mdash;<samp>bootstrap\bin</samp>
  144. or <samp>dist\bin</samp>).
  145. </p>
  146. <p>One important item of note is that you need to set up the following to run Ant:</p>
  147. <ul>
  148. <li><code>CLASSPATH</code>&mdash;put <samp>ant.jar</samp> and any other needed jars on the system classpath.</li>
  149. <li><code>ANT_OPTS</code>&mdash;On NetWare, <code>ANT_OPTS</code>
  150. needs to include a parameter of the
  151. form, <code>-envCWD=<i>ANT_HOME</i></code>,
  152. with <code><i>ANT_HOME</i></code> being the fully expanded location
  153. of Ant, <strong>not</strong> an environment variable. This is due
  154. to the fact that the NetWare System Console has no notion of a
  155. current working directory.</li>
  156. </ul>
  157. <p>It is suggested that you create up an ant.ncf that sets up these parameters, and calls <samp>perl ANT_HOME/dist/bin/runant.pl</samp></p>
  158. <p>The following is an example of such an NCF file (assuming Ant is installed in <samp>sys:/apache-ant/</samp>):</p>
  159. <pre>
  160. envset CLASSPATH=sys:/apache-ant/bootstrap/lib/ant.jar
  161. envset CLASSPATH=$CLASSPATH;sys:/apache-ant/lib/optional/junit.jar
  162. envset CLASSPATH=$CLASSPATH;sys:/apache-ant/bootstrap/lib/optional.jar
  163. setenv ANT_OPTS=-envCWD=sys:/apache-ant
  164. envset ANT_OPTS=-envCWD=sys:/apache-ant
  165. setenv ANT_HOME=sys:/apache-ant/dist/lib
  166. envset ANT_HOME=sys:/apache-ant/dist/lib
  167. perl sys:/apache-ant/dist/bin/runant.pl</pre>
  168. <p>Ant works on JVM version 1.3 or higher. You may have some luck
  169. running it on JVM 1.2, but serious problems have been found running
  170. Ant on JVM 1.1.7B. These problems are caused by JVM bugs that will
  171. not be fixed.</p>
  172. <p>JVM 1.3 is supported on Novell NetWare versions 5.1 and higher.</p>
  173. <h2>Other platforms</h2>
  174. <p>
  175. Support for other platforms is not guaranteed to be complete, as
  176. certain techniques to hide platform details from build files need to
  177. be written and tested on every particular platform. Contributions in
  178. this area are welcome.
  179. </p>
  180. </body>
  181. </html>