Skip to content

tools/run_tests.sh and run_tests.bat never actually put JOGL on the classpath (dead CLS_PATH variable) #7

Description

@Thrameos

Summary

Both tools/run_tests.sh and tools/run_tests.bat build a CLS_PATH/%CLS_PATH% variable that includes the JOGL jars (third_party/jogamp/jar/*), but the actual java invocation only ever passed $OUT_PATH/%OUT_PATH% to -cp -- CLS_PATH was computed and then never used. Separately, even fixing that naively hits a second issue: -jar and -cp together mean the JVM's own classpath handling is bypassed (the JUnit console launcher parses its own -cp/--class-path argument instead), and that parser does not expand a trailing /* into a jar list the way the real java launcher's -cp does -- so the jars have to be listed explicitly, not glob-referenced.

Impact

Any OSR-based JUnit test fails with NoClassDefFoundError: com/jogamp/opengl/awt/GLCanvas when run via the official script, since org.cef.browser.CefBrowserFactory needs JOGL classes for OSR (CefBrowserOsr). This presumably went unnoticed because no OSR-based JUnit test existed until this fork added one (OsrSmokeTest, see #2) -- the existing tests (DisplayHandlerTest, DragDataTest, TestFrameTest) all used windowed mode, which doesn't need JOGL.

Fix (in #2)

Explicitly enumerate the jars from third_party/jogamp/jar/*.jar into the classpath string passed to -cp, in both scripts.

Activity

  1. Thrameos commented on Aug 31, 2026

    @Thrameos
    OwnerAuthor

    Verified against current HEAD (coverage/phase1-value-objects-phase2-handlers branch): both tools/run_tests.sh and tools/run_tests.bat already build CLS_PATH/%CLS_PATH% with the JOGL jars explicitly enumerated (not glob-referenced) and pass it to -cp, matching exactly the fix this issue describes as landed in #2. run_tests.sh:

    CLS_PATH="$OUT_PATH"
    for jar in "${DIR}"/third_party/jogamp/jar/*.jar; do
      CLS_PATH="${jar}:${CLS_PATH}"
    done
    ...
    java ... -cp "$CLS_PATH" --select-package tests.junittests "$@"
    

    run_tests.bat has the equivalent for %%f in (...) do set CLS_PATH=... pattern. Closing as already fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions