English
See http://docs.oracle.com/javase/8/docs/technotes/tools/windows/classpath.html[official documentation] for more information about classpath.
See also xref:maven.adoc#maven[Maven] and xref:ant.adoc#ant[Ant] sections.
Resource files such as images or localisation data
Quiz for Packagers
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.myproject</groupId>
<artifactId>myproject</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<name>myproject</name>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
<project name="MyProject" default="dist" basedir=".">
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
Print out ``Hello World from'' and the name from previous step
Please note that two JAR files are separated by colon in a classpath definition.
`Output` class used only for output on terminal
`org.fedoraproject.helloworld.output`
org/fedoraproject/helloworld/input/Input.java
org/fedoraproject/helloworld/output/Output.java
org/fedoraproject/helloworld/HelloWorld.java
`org.fedoraproject.helloworld.input`
`org.fedoraproject.helloworld`
Optionaly the source code of our project (called source JAR then)
One could put invocation of `javac` to Makefile and simplify the compilation a bit. It might be sufficient for such a simple project, but it would quickly become hard to build more complex projects with this approach. Java world knows several high-level build systems which can highly simplify building of Java projects. Among the others, probably most known are http://maven.apache.org/[Apache Maven] and http://ant.apache.org/[Apache Ant].
Name two typical Java build systems and how you can identify which one is being used
Name at least three methods for bundling code in Java projects
Maven
Make
Let's create a simple hello world application that will execute following steps when run: