//
//  Licensed to the Apache Software Foundation (ASF) under one or more
//  contributor license agreements.  See the NOTICE file distributed with
//  this work for additional information regarding copyright ownership.
//  The ASF licenses this file to You under the Apache License, Version 2.0
//  (the "License"); you may not use this file except in compliance with
//  the License.  You may obtain a copy of the License at
//
//      https://www.apache.org/licenses/LICENSE-2.0
//
//  Unless required by applicable law or agreed to in writing, software
//  distributed under the License is distributed on an "AS IS" BASIS,
//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//  See the License for the specific language governing permissions and
//  limitations under the License.
//

= Preparing your Computer



Building a project like Apache PLC4X on multiple target operating-systems is quite a challenge, but I think we managed to make it as simple as possible.

We usually test the PLC4X build on the following systems:

width=100%]
|===
| Operating System | CPU Architecture | Description
| Linux            | x86_64           | Most computers
| Linux            | aarch64          | Linux running on Macs with M processors (Paralells)
| Windows          | x86_64           | Most computers
| Windows          | aarch64          | Windows running on Macs with M processors (Paralells)
| Mac              | x86_64           | Older Macs
| Mac              | aarch64          | Newer Macs with M processors (Paralells)
|===

However, when building PLC4X there are some requirements the build is expecting you to have provided.
These greatly depend on which parts you want to build.

If you're just building the `Java` modules, these probably have the least demanding requirements.
Also, should the `Go` parts generally work without any additional installations as the maven build should automatically pull the required packages.

In order to build all Java parts of `PLC4X` you are required to have at least `Java 11` installed on your machine.

TIP: We have tested the build with Java 11 up to Java 21 (Latest version at the time of writing this document).

If a new version comes out, please give us a little time to verify and handle any related issues.
We'll probably fix them as soon as possible.
However, in the past with Oracle's new release strategy, there have been a few bumps on the road.

Also will PLC4X build with any Maven version starting with `Maven 3.6.0`.

[width=100%]
|===
| Profile        | Description                                              | Requirements
|                | Builds Java API, drivers                                a|
* Git
* LibPCAP
| `with-c`       | Builds C API, drivers                                   a|
| `with-dotnet`  | Builds C# and .Net API, drivers                         a|
* dotnet
| `with-python`  | Builds Python API, drivers                              a|
* python (min 3.7)
* pyenv
|===

The following pages will describe how to provide these requirements for your operating system.

* xref:preparing/linux.adoc[Linux]
* xref:preparing/macos.adoc[MacOS]
* xref:preparing/windows.adoc[Windows]

== Preparing your IDE

=== IntelliJ

When running Java unit-tests in IntelliJ, you might run into problems where during the test execution complaints arise that JUnit is unable to load `\{failsafeArgLine}`. In this case you need to go to `Settings -> Build, Execution, Deployment -> Build Tools -> Maven -> Running Tests` and deselect the option `argLine`.