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

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