3

My OS is Windows 10. I had an error when starting the .\artemis in the Windows PowerShell. It said:

Warning: JAVA_HOME environment variable is not set.

I already setting the JAVA_HOME's path at C:\Program Files\Java\jdk-19\bin. This is the result for echo %JAVA_HOME%:

C:\Program Files\Java\jdk-19\

I tried to test the mvn -v:

Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Maven home: C:\apache-maven-3.8.1\bin\..
Java version: 19.0.1, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-19
Default locale: en_US, platform encoding: UTF-8
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

(it should not be shown if the JAVA_HOME is not set tho)

I tried the java -version:

java version "19.0.1" 2022-10-18
Java(TM) SE Runtime Environment (build 19.0.1+10-21)
Java HotSpot(TM) 64-Bit Server VM (build 19.0.1+10-21, mixed mode, sharing)

The javac -version:

javac 19.0.1

Can someone explain how to fix it?

I forgot to mention it when I use git bash to run ./artemis the result is

./artemis: line 93: C:\Program Files\Java\jdk-19;/bin/java: No such file or directory

  • What version of ActiveMQ Artemis are you using? – Justin Bertram Oct 28 '22 at 15:59
  • 1
    Nothing `*_HOME` should have a bin directory in the path. It's the *installation* directory – g00se Oct 28 '22 at 16:13
  • @JustinBertram I'm using apache-artemis-2.26.0 oh yeah when I use git bash to start `./artemis` this is the result `./artemis: line 93: C:\Program Files\Java\jdk-19;/bin/java: No such file or directory` – Imam Ramadani Oct 31 '22 at 01:37

2 Answers2

1

Install and set Java SDK 11 as JAVA_HOME. Most applications will not work with SDK 18 or higher.

Artemis notes:

Note on Java versions: The old v17.0.1 version of the Artemis software required Java version 1.8 to run. All recent releases from v18.0.0 onwards require a minimum of Java 9 and ideally Java 11. This must be installed first.

Extracted from http://sanger-pathogens.github.io/Artemis/

  • 1
    I've tried it and it works, thank you – Imam Ramadani Oct 31 '22 at 04:21
  • There is no version "17.0.1" of ActiveMQ Artemis. The documentation you cited is for a _completely_ different project related to "genome browsing and annotation." – Justin Bertram Oct 31 '22 at 13:33
  • @JustinBertram There is a huge large lot of things with this name (Artemis). I couldn't guess haha. But this problem with Java is very universal. – Renato Araújo Nov 01 '22 at 18:46
  • @RenatoAraújo, the problem with your answer is that ActiveMQ Artemis _does work_ with Java 19. The problem is almost certainly with the script used to start the broker on Windows. – Justin Bertram Nov 02 '22 at 01:55
0

Did you try using the short name? It’s been some time since I used Windows but if I recall correctly I used to use PROGRA~1 instead of "Program files".

flyingfishcattle
  • 1,817
  • 3
  • 14
  • 25
user3304825
  • 107
  • 2
  • 12