|
Lines 1536-1542
Link Here
|
| 1536 |
<row> |
1536 |
<row> |
| 1537 |
<entry><filename>java</filename></entry> |
1537 |
<entry><filename>java</filename></entry> |
| 1538 |
<entry>Software related to the Java language.</entry> |
1538 |
<entry>Software related to the Java language.</entry> |
| 1539 |
<entry></entry> |
1539 |
<entry><filename>java</filename> shall not be the only |
|
|
1540 |
category for a port. Porters are also encouraged not to |
| 1541 |
use <filename>java</filename> as the main category of a |
| 1542 |
port.</entry> |
| 1540 |
</row> |
1543 |
</row> |
| 1541 |
|
1544 |
|
| 1542 |
<row> |
1545 |
<row> |
|
Lines 4297-4303
Link Here
|
| 4297 |
<command>jikes</command> (by setting <literal>'no'</literal> |
4300 |
<command>jikes</command> (by setting <literal>'no'</literal> |
| 4298 |
or <literal>'yes'</literal>). In the later case, <filename |
4301 |
or <literal>'yes'</literal>). In the later case, <filename |
| 4299 |
role="package">devel/jikes</filename> will be added to build |
4302 |
role="package">devel/jikes</filename> will be added to build |
| 4300 |
dependencies of the port.</entry> |
4303 |
dependencies of the port. In any case that <command>jikes</command> |
|
|
4304 |
is actually used in place of <command>javac</command>, then the |
| 4305 |
<makevar>HAVE_JIKES</makevar> variable is defined by |
| 4306 |
<filename>bsd.java.mk</filename>.</entry> |
| 4301 |
</row> |
4307 |
</row> |
| 4302 |
</tbody> |
4308 |
</tbody> |
| 4303 |
</tgroup> |
4309 |
</tgroup> |
|
Lines 4435-4440
Link Here
|
| 4435 |
JDKs used |
4441 |
JDKs used |
| 4436 |
<filename>${JAVA_HOME}/lib/classes.zip</filename>.</entry> |
4442 |
<filename>${JAVA_HOME}/lib/classes.zip</filename>.</entry> |
| 4437 |
</row> |
4443 |
</row> |
|
|
4444 |
<row> |
| 4445 |
<entry><makevar>HAVE_JIKES</makevar></entry> |
| 4446 |
<entry>Defined whenever <command>jikes</command> is used by |
| 4447 |
the port (see <makevar>USE_JIKES</makevar> above).</entry> |
| 4448 |
</row> |
| 4438 |
</tbody> |
4449 |
</tbody> |
| 4439 |
</tgroup> |
4450 |
</tgroup> |
| 4440 |
</table> |
4451 |
</table> |
|
Lines 4469-4478
Link Here
|
| 4469 |
Default: |
4480 |
Default: |
| 4470 |
<filename>${JAVASHAREDIR}/classes</filename>.</entry> |
4481 |
<filename>${JAVASHAREDIR}/classes</filename>.</entry> |
| 4471 |
</row> |
4482 |
</row> |
|
|
4483 |
<row> |
| 4484 |
<entry><makevar>JAVALIBDIR</makevar></entry> |
| 4485 |
<entry>The directory where JAR files installed by other |
| 4486 |
ports are located. Default: |
| 4487 |
<filename>${LOCALBASE}/share/java/classes</filename>.</entry> |
| 4488 |
</row> |
| 4472 |
</tbody> |
4489 |
</tbody> |
| 4473 |
</tgroup> |
4490 |
</tgroup> |
| 4474 |
</table> |
4491 |
</table> |
| 4475 |
|
4492 |
|
|
|
4493 |
<para>The related entries are defined in both |
| 4494 |
<makevar>PLIST_SUB</makevar> (documented |
| 4495 |
<link linkend="porting-plist">here</link>) and |
| 4496 |
<makevar>SUB_LIST</makevar>.</para> |
| 4497 |
|
| 4498 |
</sect2> |
| 4499 |
|
| 4500 |
<sect2 id="java-building-with-ant"> |
| 4501 |
<title>Building with Ant</title> |
| 4502 |
|
| 4503 |
<para>When the port is to be built using Apache Ant, it has to |
| 4504 |
define <makevar>USE_ANT</makevar>. Ant is thus considered to be |
| 4505 |
the sub-make command. When no <literal>do-build</literal> target |
| 4506 |
is defined by the port, a default one will be set that simply |
| 4507 |
runs Ant according to <makevar>MAKE_ENV</makevar>, |
| 4508 |
<makevar>MAKE_ARGS</makevar> and <makevar>ALL_TARGETS</makevar>. |
| 4509 |
This is similar to the <makevar>USE_GMAKE</makevar> mechanism, |
| 4510 |
which is documented <link linkend="makefile-build">here</link>. |
| 4511 |
</para> |
| 4512 |
|
| 4513 |
<para>If <command>jikes</command> is used in place of |
| 4514 |
<command>javac</command> (see <makevar>USE_JIKES</makevar> |
| 4515 |
<link linkend="java-variables">above</link>), then Ant will |
| 4516 |
automatically use it to build the port.</para> |
| 4517 |
|
| 4476 |
</sect2> |
4518 |
</sect2> |
| 4477 |
|
4519 |
|
| 4478 |
<sect2 id="java-best-practices"> |
4520 |
<sect2 id="java-best-practices"> |
|
Lines 4487-4493
Link Here
|
| 4487 |
statement (where <filename>myport.jar</filename> is the name |
4529 |
statement (where <filename>myport.jar</filename> is the name |
| 4488 |
of the JAR file installed as part of the port):</para> |
4530 |
of the JAR file installed as part of the port):</para> |
| 4489 |
|
4531 |
|
| 4490 |
<programlisting>PLIST_FILES+= ${JAVAJARDIR:S,^${PREFIX}/,,}/myport.jar</programlisting> |
4532 |
<programlisting>PLIST_FILES+= %%JAVAJARDIR%%/myport.jar</programlisting> |
| 4491 |
|
4533 |
|
| 4492 |
<para>When porting a Java application, the port usually installs |
4534 |
<para>When porting a Java application, the port usually installs |
| 4493 |
everything under a single directory (including its JAR |
4535 |
everything under a single directory (including its JAR |
|
Lines 4548-4553
Link Here
|
| 4548 |
the issue you are trying to resolve is related to either a JDK |
4590 |
the issue you are trying to resolve is related to either a JDK |
| 4549 |
implementation or <filename>bsd.java.mk</filename>.</para> |
4591 |
implementation or <filename>bsd.java.mk</filename>.</para> |
| 4550 |
|
4592 |
|
|
|
4593 |
<para>Similarly, there is a defined policy regarding the |
| 4594 |
<makevar>CATEGORIES</makevar> of a Java port, which is detailed |
| 4595 |
<link linkend="makefile-categories">here</link>.</para> |
| 4596 |
|
| 4551 |
</sect2> |
4597 |
</sect2> |
| 4552 |
|
4598 |
|
| 4553 |
</sect1> |
4599 |
</sect1> |