[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#990534: arduino: Arduino-IDE not starting witch Cinnamon Desktop.

On Sat, 10 Jul 2021, Carsten Schoenert wrote:

> ensure users have also installed openjdk-11-jre to get Arduino IDE working.

Or 17?

If you need to ensure a minimum version, do this (/bin/sh-safe):

if test "$(java -XshowSettings:properties -version 2>&1 | \
    sed -n '/^    java.version = \([0-9]*\)\..*$/s//\1/p')" -lt 11; then
	echo >&2 "E: Either no JRE found or JRE too old (<11):"
	java -version
	exit 1

The command substitution evaluates to the first number before
a period in the version, which is either 1 (from 1.8.x) or 8
for JRE 8, 11 for JRE 11, and obviously larger for later ones.
If none, it evaluates to empty, which test … -lt interprets as
zero which will also work.

Please submit this to the Arduino IDE maintainer.

Infrastrukturexperte • tarent solutions GmbH
Am Dickobskreuz 10, D-53121 Bonn • http://www.tarent.de/
Telephon +49 228 54881-393 • Fax: +49 228 54881-235
HRB AG Bonn 5168 • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg


Mit dem tarent-Newsletter nichts mehr verpassen: www.tarent.de/newsletter


Reply to: