Start.bat debug The system cannot find the batch label specified - RUN_LOOP

Hi trying to setup a development environment on x64 Windows 10 Using VSCode.
Following the guides:

Also have set up local openHAB on the same machine following: openHAB on Windows

  • openHAB version 4.4
  • ENV Variable %JAVA_HOME% = C:\Program Files\Java\jdk-17
    ORACLE JDK 17
Java --version 
java 17.0.9 2023-10-17 LTS
Java(TM) SE Runtime Environment (build 17.0.9+11-LTS-201)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.9+11-LTS-201, mixed mode, sharing)

Trying to get the ‘startup.bat debug’ command to work as specified VSCode

  • Section heading: Steps for each Bundle
  • Step: 7.

But I get the following

c:\openHAB>C:\openHAB\start.bat debug
Launching the openHAB runtime...
The system cannot find the batch label specified - RUN_LOOP

I can’t find any mention of this issue in the forum.
I also noticed there is a start_debug.bat file in my openHAB directory, tried running that batch file too
and get exactly the same output.

c:\openHAB>start_debug.bat
Launching the openHAB runtime...
The system cannot find the batch label specified - RUN_LOOP

I can run the ‘startup.bat’ command with no issues and get the familiar openHAB page on http://localhost:8080.
Any guidance welcomed.

Strange solution to this.
Following through the batch files I found that karaf.bat is run and it contains the batch label RUN_LOOP.
I though I would try to understand what was going on and how far the processing was getting through karaf.bat before the problem arose, so I added an echo statement into the file and low and behold the problem resolved. So I reversed the the process ([CTRL][Z]) in Notepad ++ and save the file again; the problem reappeared, tried this a few time to be confident.
Adding the echo fixed it, I have no idea why this works but it does.
Lines 18 to 24 of karaf.bat now look like this.

rem

if not "%ECHO%" == "" echo %ECHO%

echo leeC

setlocal

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.