Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SDK6UserGuide/appendix/javaLambdas.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ By default Gradle will use the Java toolchain available locally, but it can be c
}

This settings plugin downloads the first Java toolchain matching the specified requirements that it finds among the
`JVM Vendors <https://docs.gradle.org/current/userguide/toolchains.html#sec:precedence>`__ recognized by Gradle and unzips it in the ``$USER_HOME/.gradle/.jdks`` folder,
`JVM Vendors <https://docs.gradle.org/current/userguide/toolchains.html#sec:precedence>`__ recognized by Gradle and unzips it in the ``<USER_HOME>/.gradle/.jdks`` folder,
so you do not have to install one manually.

.. note::
Expand Down
2 changes: 1 addition & 1 deletion SDK6UserGuide/howtos/disableIvyDescriptorPublication.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Disable Ivy Descriptor Publication by Default

If you don't need SDK 5 backward compatibility, you can disable Ivy descriptor publication by setting the Gradle property ``enable.ivy.descriptor.default=false``.

This property can be set in a ``gradle.properties`` file in ``$USER_HOME/.gradle/`` to apply it globally, or at the root of the Gradle project to
This property can be set in a ``gradle.properties`` file in ``<USER_HOME>/.gradle/`` to apply it globally, or at the root of the Gradle project to
apply it at project level.
It can also be passed to command line with ``-Penable.ivy.descriptor.default=false`` option.

Expand Down
4 changes: 2 additions & 2 deletions SDK6UserGuide/howtos/gradleJavaHome.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ you can define the property ``org.gradle.java.home`` in the `Gradle Properties <
Gradle Properties can be defined in the following locations, sorted by the highest priority:

- command line, as set using ``-D``.
- ``gradle.properties`` in the ``GRADLE_USER_HOME`` directory (defaults to ``$USER_HOME/.gradle``).
- ``gradle.properties`` in the ``GRADLE_USER_HOME`` directory (defaults to ``<USER_HOME>/.gradle``).
- ``gradle.properties`` in the project directory, then its parent project directory up to the build root directory.
- ``gradle.properties`` in the Gradle installation directory.

If an option is configured in multiple locations, the first one found in any of these locations wins.
Therefore, if you want all your Gradle project to use a different JDK than the system default JDK,
you can add the following property in the file ``$USER_HOME/.gradle/gradle.properties``::
you can add the following property in the file ``<USER_HOME>/.gradle/gradle.properties``::

org.gradle.java.home="C:\\path\\to\\the\\jdk"

Expand Down
6 changes: 3 additions & 3 deletions SDK6UserGuide/howtos/gradleMultiRepositories.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ How To Configure Multiple Gradle Repositories

If you want to make MicroEJ repositories available only to some projects, here is an example of configuration:

- Create a folder ``repositories`` in ``$USER_HOME/.gradle/init.d``.
- Create a folder ``repositories`` in ``<USER_HOME>/.gradle/init.d``.
- Move ``microej.init.gradle.kts`` to the ``repositories`` folder.
- Create a new ``repositories.init.gradle.kts`` file in ``$USER_HOME/.gradle/init.d`` with the following content::
- Create a new ``repositories.init.gradle.kts`` file in ``<USER_HOME>/.gradle/init.d`` with the following content::

val defaultRepository = "myOtherRepo" // can be set to null
val selectedRepository = System.getProperty("gradle.repository") ?: defaultRepository
Expand Down Expand Up @@ -37,7 +37,7 @@ activate these repositories by default, you can edit the ``defaultRepository`` i

.. warning::

If you put a repository configuration file that ends with ``.gradle.kts`` at the root of ``$USER_HOME/.gradle/init.d``,
If you put a repository configuration file that ends with ``.gradle.kts`` at the root of ``<USER_HOME>/.gradle/init.d``,
it will be automatically loaded. Contrary to what the official Gradle documentation says, the files does not need to end
with ``.init.gradle.kts``. That is the reason why we recommend to put the files in a folder. These files also need to end
with ``.gradle.kts``.
Expand Down
26 changes: 17 additions & 9 deletions SDK6UserGuide/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,34 @@ System Requirements
Check your JDK version
----------------------

The SDK requires a JDK 11 or a higher LTS version to be installed and:
The SDK requires a JDK (not a JRE) 11 or a higher LTS version to be installed and:

- The ``JAVA_HOME`` environment variable set to the path of a JDK.

OR

- The ``java`` executable of a JDK available in the ``PATH``.
- The ``java`` and ``javac`` executables of a JDK available in the ``PATH``.

If the ``JAVA_HOME`` is set to a JDK, make sure that it is a JDK 11 or a higher LTS version.

If the ``JAVA_HOME`` is not set, make sure a JDK executable is available in the ``PATH`` environment variable.
To check, run ``java -version`` in a terminal::
If the ``JAVA_HOME`` is not set, make sure the JDK executables are available in the ``PATH`` environment variable.
To check, execute ``java -version`` in a terminal::

$ java -version
openjdk version "11.0.15" 2022-04-19
OpenJDK Runtime Environment Temurin-11.0.15+10 (build 11.0.15+10)
OpenJDK 64-Bit Server VM Temurin-11.0.15+10 (build 11.0.15+10, mixed mode)
openjdk 11.0.19 2023-04-18
OpenJDK Runtime Environment Temurin-11.0.19+7 (build 11.0.19+7)
OpenJDK 64-Bit Server VM Temurin-11.0.19+7 (build 11.0.19+7, mixed mode)

If you don't have a JDK installed,
you can download and install one from `Adoptium <https://adoptium.net/temurin/releases/>`__.
Then execute ``javac --version``::

$ javac --version
javac 11.0.19

If the ``java`` program is not found, it means there is no JDK installed or it is not available in the ``PATH`` or ``JAVA_HOME`` environment variables.
If it is not installed, you can download and install one from `Adoptium <https://adoptium.net/temurin/releases/>`__.

If the ``java`` program is found but not the ``javac`` program, it means a JRE is installed and used, not a JDK.
In this case, install a JDK. You can download and install one from `Adoptium <https://adoptium.net/temurin/releases/>`__.


.. _sdk_6_configure_repositories:
Expand Down
4 changes: 2 additions & 2 deletions SDK6UserGuide/licenses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ If the SDK EULA is not accepted, the following message is displayed when executi
The license terms for this product can be downloaded from
https://repository.microej.com/licenses/sdk/LAW-0011-LCS-MicroEJ_SDK-EULA-v3.1C.txt
You can accept the EULA by setting the system property systemProp.accept-microej-sdk-eula-v3-1c=YES in a gradle.properties file
- in your Gradle User Home folder ($USER_HOME/.gradle/),
- in your Gradle User Home folder (<USER_HOME>/.gradle/),
- or in the root folder of your project,
or specifying the -Daccept-microej-sdk-eula-v3-1c=YES command line option,
or setting the ACCEPT_MICROEJ_SDK_EULA_V3_1C=YES environment variable.
Expand All @@ -88,7 +88,7 @@ As mentioned in the message, there are several ways to accept the SDK EULA:

systemProp.accept-microej-sdk-eula-v3-1c=YES

This can be in the ``gradle.properties`` of your Gradle User Home folder (located by default at ``$USER_HOME/.gradle/gradle.properties``),
This can be in the ``gradle.properties`` of your Gradle User Home folder (located by default at ``<USER_HOME>/.gradle/gradle.properties``),
or in the ``gradle.properties`` file at the root of your project for example.

- define the ``accept-microej-sdk-eula-v3-1c`` system property in the command line:
Expand Down
19 changes: 18 additions & 1 deletion SDK6UserGuide/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ This feature can be disabled for a build by passing the ``--no-watch-fs`` option

./gradlew build --no-watch-fs

or for all builds by setting the following property in the ``$USER_HOME/.gradle/gradle.properties`` file::
or for all builds by setting the following property in the ``<USER_HOME>/.gradle/gradle.properties`` file::

org.gradle.vfs.watch=false

Expand Down Expand Up @@ -438,6 +438,23 @@ If the ``prod`` version is deployed in another repository declared after the Mic
To fix this, declare the repository containing the ``prod`` version before the one containing the ``eval`` version.
Refer to :ref:`sdk_6_howto_gradle_add_repository` for more details on how to declare module repositories.

.. _sdk_6_missing_compilation_capability:

Missing Compilation Capability
------------------------------

During the build of a project (precisely the Java compilation phase), the following error may be raised::

* What went wrong:
Execution failed for task ':compileJava'.
> Error while evaluating property 'javaCompiler' of task ':compileJava'.
> Failed to calculate the value of task ':compileJava' property 'javaCompiler'.
> Toolchain installation 'C:\Program Files (x86)\Eclipse Adoptium\jre-11.0.28.6-hotspot' does not provide the required capabilities: [JAVA_COMPILER]

This means that the Java installation used by Gradle is not a JDK but a JRE, whereas Gradle and the SDK require a JDK.
Therefore, the solution is to install and configure a JDK.
Refer to :ref:`sdk_6_check_jdk` for more information.

..
| Copyright 2008-2025, MicroEJ Corp. Content in this space is free
for read and redistribute. Except if otherwise stated, modification
Expand Down
2 changes: 1 addition & 1 deletion SDKUserGuide/mmm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ SDK Configuration
By default, when starting an empty workspace, the SDK is configured to import dependencies
from :ref:`MicroEJ Central Repository <central_repository>` and to publish built modules to a local directory.
The repository configuration is stored in a :ref:`settings file <mmm_settings_file>` (``ivysettings.xml``), and the default one
is located at ``$USER_HOME\.microej\microej-ivysettings-[VERSION].xml``
is located at ``<USER_HOME>\.microej\microej-ivysettings-[VERSION].xml``

.. _mmm_preferences_page:

Expand Down
2 changes: 1 addition & 1 deletion SDKUserGuide/mmmRepository.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ provided by default in MicroEJ SDK configuration, which is connected to :ref:`Mi

<ea:property name="bar.populate.from.resolver" value="MicroEJChainResolver"/>

The ``MicroEJChainResolver`` is a URL resolver defined in ``$USER_HOME\.microej\microej-ivysettings-[VERSION].xml`` that points to MicroEJ Central Repository.
The ``MicroEJChainResolver`` is a URL resolver defined in ``<USER_HOME>\.microej\microej-ivysettings-[VERSION].xml`` that points to MicroEJ Central Repository.

.. _module_repository_consistency:

Expand Down
2 changes: 1 addition & 1 deletion VEEWearUserGuide/android/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Configure Repositories
The :ref:`SDK 6 repositories configuration <sdk_6_configure_repositories>` references the MicroEJ module repositories which are required for resolving the SDK Gradle plugins and modules.
Working with Android plugins and modules involves extending this configuration to include additional repositories that are essential for Android development.

- download and copy :download:`this file <resources/microej.wear.init.gradle.kts>` in ``$USER_HOME/.gradle/init.d/``.
- download and copy :download:`this file <resources/microej.wear.init.gradle.kts>` in ``<USER_HOME>/.gradle/init.d/``.

..
| Copyright 2008-2025, MicroEJ Corp. Content in this space is free
Expand Down