Merge branch 'master' of https://github.com/javapathfinder/jpf-core
[jpf-core.git] / docs / install / site-properties.md
1 # Creating  a site.properties file #
2
3 The site.properties file tells JPF at startup time where to look for installed projects, so that it can add classpaths accordingly without you having to type off your fingers. It is a normal [Java properties](http://en.wikipedia.org/wiki/.properties) file, which supports a few additional things like key expansion.
4
5 While you can tell JPF at startup time where to look for `site.properties`, we recommend using the default location, which is **`<user.home>/.jpf/site.properties`**. If you don't know what value the standard Java system property `user.home` has on your machine, please run the attached Java program. On Unix systems, this is your home directory.
6
7 Assuming that you installed your JPF projects under `<user.home>/projects/jpf`, a typical `site.properties` looks like this:
8
9 ~~~~~~~~ {.bash}
10 # JPF site configuration
11
12 jpf-core = ${user.home}/projects/jpf/jpf-core
13
14 # numeric extension
15 jpf-numeric = ${user.home}/projects/jpf/jpf-numeric
16
17 # annotation-based program properties extension
18 jpf-aprop = ${user.home}/projects/jpf/jpf-aprop
19
20 extensions=${jpf-core},${jpf-aprop}
21
22 #... and all your other installed projects
23 ~~~~~~~~ 
24
25 If you are a Windows user, and you want to enter absolute pathnames, don't use unquoted backslashes '\' since the `java.util.Properties` parser would interpret these as special chars (like `"\n"`). You can use ordinary slashes '/' instead. To avoid drive letters, use system properties like `${user.home}`.
26
27
28 A sample site.properties file is attached to this page. Note that the "`${..}`" terms are automatically expanded by JPF, i.e. you do not have to enter explicit paths.
29
30 Each installed project is defined by a "`<project-name> = <project-directory>`" key/value pair. The project name is usually the same as the repository name.
31
32 Note that we don't require anymore that all projects are in the extensions list, **but** jpf-core (or wherever your JPF core classes are) now needs to be in there. In fact, you probably want to have only `jpf-core` in `extensions`, and use the `@using <project-name>` for the other ones from either your project properties (jpf.properties, for project dependencies) or - usually - from your application properties (*.jpf) files. See [JPF configuration](../user/config) for details.