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 7.0 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <link rel="stylesheet" type="text/css" href="stylesheets/style.css">
  5. <title>Platform Issues</title>
  6. </head>
  7. <h1>Platform Issues</h1>
  8. <h2>Java versions</h2>
  9. <h3>Java 1.5</h3>
  10. You may need a bigger stack than default, especially if you are using the built in
  11. XSLT engine. We recommend you use Apache Xalan; indeed, some tasks (JUnit report in XML,
  12. for example) may not work against the shipping XSL engine.
  13. <h3>Java 1.2</h3>
  14. You may sometimes see messages like
  15. <pre>
  16. A nonfatal internal JIT (3.10.107(x)) error 'chgTarg: Conditional' has
  17. occurred in :
  18. 'org/apache/tools/ant/Project.addReference
  19. (Ljava/lang/String;Ljava/lang/Object;)V': Interpreting method.
  20. Please report this error in detail to
  21. http://java.sun.com/cgi-bin/bugreport.cgi
  22. </pre>
  23. These are caused by subtle incompatibilities between the Java1.4+ compiled
  24. release; bugs in the Java runtime that Sun won't fix. Possible solutions:-
  25. <ol>
  26. <li>Upgrade your JVM.
  27. <li>Recompile Ant on a Java1.2 machine
  28. <li>Add <tt>-Djava.compiler=NONE</tt> to
  29. the value of your ANT_OPTS environment variable. This turns the JIT off.
  30. <li>Ignore the messages.
  31. </ol>
  32. <h2>Unix and Linux</h2>
  33. <ul>
  34. <li> You should use a GNU version of <tt>tar</tt> to untar the Apache
  35. Ant source tree, if you have downloaded this as a tar file. If you get
  36. wierd errors about missing files, this is the problem.
  37. </li>
  38. <li> Ant does not preserve file permissions when a file is copied, moved or
  39. archived, because Java does not let it read or write the permissions.
  40. Use <tt>&lt;chmod&gt;</tt> to set permissions, and when creating a
  41. tar archive, use the <tt>mode</tt> attribute of <tt>&lt;tarfileset&gt;</tt>
  42. to set the permissions in the tar file, or <code>&lt;apply&gt;</code> the real tar program.
  43. </li>
  44. <li> Ant is not symbolic link aware in moves, deletes and when recursing down a tree
  45. of directories to build up a list of files. Unexpected things can happen.
  46. <li> Linux on IA-64: apparently you need a larger heap than the default
  47. one (64M) to compile big projects. If you get out of heap
  48. errors, either increase the heap or use a forking javac. Better yet,
  49. use jikes for extra compilation speed.
  50. </ul>
  51. <h2>Microsoft Windows</h2>
  52. Windows 9x (win95, win98, win98SE and winME) has a batch file system which
  53. does not work fully with long file names, so we recommend that ant and the JDK
  54. are installed into directories without spaces, and with 8.3 filenames.
  55. The Perl and Python launcher scripts do not suffer from this limitation.
  56. <p>
  57. All versions of windows are usually case insensitive, although mounted
  58. file systems (Unix drives, Clearcase views) can be case sensitive underneath,
  59. confusing patternsets.
  60. <p>
  61. Ant can often not delete a directory which is open in an Explorer window.
  62. There is nothing we can do about this short of spawning a program to kill
  63. the shell before deleting directories.
  64. Nor can files that are in use be overwritten.
  65. <h2>Cygwin</h2>
  66. Cygwin is not an operating system; rather it is an application suite
  67. running under Windows and providing some UNIX like functionality. AFAIK, Sun did
  68. not create any specific Java Development Kit or Java Runtime Environment for
  69. cygwin. See this link :
  70. <a href="http://www.inonit.com/cygwin/faq/">http://www.inonit.com/cygwin/faq/</a> .
  71. Only Windows path
  72. names are supported by JDK and JRE tools under Windows or cygwin. Relative path
  73. names such as "src/org/apache/tools" are supported, but Java tools do not
  74. understand /cygdrive/c to mean c:\.
  75. <p>
  76. The utility cygpath (used industrially in the ant script to support cygwin) can
  77. convert cygwin path names to Windows.
  78. You can use the <code>&lt;exec&gt;</code> task in ant to convert cygwin paths to Windows path, for
  79. instance like that :
  80. <pre>
  81. &lt;property name=&quot;some.cygwin.path&quot; value=&quot;/cygdrive/h/somepath&quot;/&gt;
  82. &lt;exec executable=&quot;cygpath&quot; outputproperty=&quot;windows.pathname&quot;&gt;
  83. &lt;arg value=&quot;--windows&quot;/&gt;
  84. &lt;arg value=&quot;${some.cygwin.path}&quot;/&gt;
  85. &lt;/exec&gt;
  86. &lt;echo message=&quot;${windows.pathname}&quot;/&gt;
  87. </pre>
  88. We get lots of support calls from Cygwin users. Either it is incredibly
  89. popular, or it is trouble. If you do use it, remember that Java is a
  90. Windows application, so Ant is running in a Windows process, not a
  91. Cygwin one. This will save us having to mark your bug reports as invalid.
  92. <h2>Apple MacOS X</h2>
  93. MacOS X is the first of the Apple platforms that Ant supports completely;
  94. it is treated like any other Unix.
  95. <h2>Novell Netware</h2>
  96. <p>To give the same level of sophisticated control as Ant's startup scripts on other platforms, it was decided to make the main ant startup on NetWare be via a Perl Script, "runant.pl". This is found in the bin directory (for instance - bootstrap\bin or dist\bin).</p>
  97. <p>One important item of note is that you need to set up the following to run ant:</p>
  98. <ul><li><code>CLASSPATH</code> - put ant.jar, xercesImpl.jar, xml-apis.jar and any other needed jars on the system classpath.</li>
  99. <li><code>ANT_OPTS</code> - On NetWare, <code>ANT_OPTS</code> needs to include a parameter of the form, <nobr>"-envCWD=<code>ANT_HOME</code>"</nobr>, with <code>ANT_HOME</code> being the fully expanded location of Ant, <b>not</b> an environment variable. This is due to the fact that the NetWare System Console has no notion of a current working directory.</li>
  100. </ul>
  101. <p>It is suggested that you create up an ant.ncf that sets up these parameters, and calls <code>perl ANT_HOME/dist/bin/runant.pl</code></p>
  102. <p>The following is an example of such an NCF file(assuming ant is installed in <nobr>'sys:/apache-ant/'):</nobr></p>
  103. <code>
  104. &nbsp;&nbsp;&nbsp;envset CLASSPATH=SYS:/apache-ant/bootstrap/lib/ant.jar<br>
  105. &nbsp;&nbsp;&nbsp;envset CLASSPATH=$CLASSPATH;SYS:/apache-ant/lib/xercesImpl.jar <br>
  106. &nbsp;&nbsp;&nbsp;envset CLASSPATH=$CLASSPATH;SYS:/apache-ant/lib/xml-apis.jar <br>
  107. &nbsp;&nbsp;&nbsp;envset CLASSPATH=$CLASSPATH;SYS:/apache-ant/lib/optional/junit.jar <br>
  108. &nbsp;&nbsp;&nbsp;envset CLASSPATH=$CLASSPATH;SYS:/apache-ant/bootstrap/lib/optional.jar <br>
  109. <br>
  110. &nbsp;&nbsp;&nbsp;setenv ANT_OPTS=-envCWD=sys:/apache-ant <br>
  111. &nbsp;&nbsp;&nbsp;envset ANT_OPTS=-envCWD=sys:/apache-ant <br>
  112. &nbsp;&nbsp;&nbsp;setenv ANT_HOME=sys:/apache-ant/dist/lib <br>
  113. &nbsp;&nbsp;&nbsp;envset ANT_HOME=sys:/apache-ant/dist/lib <br>
  114. <br>
  115. &nbsp;&nbsp;&nbsp;perl sys:/apache-ant/dist/bin/runant.pl <br>
  116. </code>
  117. <p>Ant works on JVM version 1.3 or higher. You may have some luck running it on JVM 1.2, but serious problems have been found running Ant on JVM 1.1.7B. These problems are caused by JVM bugs that will not be fixed.</p>
  118. <p>JVM 1.3 is supported on Novell NetWare versions 5.1 and higher.</p>
  119. <h2>Other platforms</h2>
  120. Support for other platforms is not guaranteed to be complete, as certain
  121. techniques to hide platform details from build files need to be written and
  122. tested on every particular platform. Contributions in this area are welcome.
  123. <hr>
  124. <p align="center">Copyright &copy; 2002-2005 The Apache Software Foundation. All rights
  125. Reserved.</p>
  126. </html>