Skip to content

Windows start-openas2.bat bug: missing -D for OPENAS2_LOG_DIR causes ClassNotFoundException #493

@BasharatHaider246

Description

@BasharatHaider246

Version: OpenAS2Server 4.8.0
OS: Windows 10 / 11
Java: Java 17 (also reproducible with Java 11 / 20)

Problem:
The Windows startup script bin/start-openas2.bat contains a typo
that prevents OpenAS2 from starting.

The following line is shipped as:

set EXTRA_PARMS=%EXTRA_PARMS% DOPENAS2_LOG_DIR="%OPENAS2_LOGGING_BASE%"

Because the -D prefix is missing, the JVM treats
DOPENAS2_LOG_DIR=... as a class name, resulting in:

Error: Could not find or load main class DOPENAS2_LOG_DIR=...
Caused by: java.lang.ClassNotFoundException

Fix:
Change the line to:

set EXTRA_PARMS=%EXTRA_PARMS% -DOPENAS2_LOG_DIR="%OPENAS2_LOGGING_BASE%"

After this change, OpenAS2 starts correctly on Windows.

This affects all Windows users regardless of Java version.
The error message is misleading and looks like a Java compatibility issue.

Please fix the missing "-D" in start-openas2.bat for future releases.

I can submit a pull request with this one-line fix if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions