GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Extension loading from classpath · Issue #71 · dflib/jjava

Extension loading from classpath #71

New issue
Copy link
New issue
Copy link
Closed
#88
Closed
Extension loading from classpath#71
#88
Copy link
Milestone
1.0-a6

Description

@616c
616c
opened on Jul 9, 2025
Issue body actions

My Goal

I'm looking for a way to automatically load an extension that is provided as a simple jar in the classpath.

The extension can be successfully loaded if this is entered into a cell:

(new my.path.MyExtension()).install(getKernelInstance())

Problem

Maybe I'm missing something. I would have expected that since JJAVA_LOAD_EXTENSIONS per default is enabled, my extension is found during startup, but it isn't. The service specification in META-INF is provided, I triple-checked this.

As I understand the jjava code, the setup only takes place automatically if the jar is added via %maven magics.

I tried to use JJAVA_STARTUP_SCRIPT, but here getKernelInstance() is not available and org.dflib.jjava.JJava.getKernelInstance() returns null.

Alternatively, if this is intentionally not happening at load time, it would be an option if the kernel instance is available in startup scripts.

Activity

  1. andrus commented on Jul 9, 2025

    @andrus
    andrus
    on Jul 9, 2025
    Contributor
    More actions

    I know for sure an extension is loaded when added as an explict notebook dependency, e.g. as %maven my:lib:1.0. Need to doublecheck the behavior when it is already on the classpath...

  2. 616c commented on Jul 9, 2025

    @616c
    616c
    on Jul 9, 2025
    ContributorAuthor
    More actions

    Yes it is. As I see it, in MavenResolver constructor there is an instance of extensionLoader = new ExtensionLoader(); created. But it seems to be the only place where it's used, so it looks like it applies only for %maven magics.

  3. andrus
    added this to the 1.0-a6 milestone on Jul 9, 2025
  4. andrus commented on Sep 28, 2025

    @andrus
    andrus
    on Sep 28, 2025
    Contributor
    More actions

    @616c : Quick question. When you observed your original condition, how did you add your Jar to classpath? Was it via JJAVA_CLASSPATH variable? (If so, I think I found the issue).

  5. 616c commented on Oct 10, 2025

    @616c
    616c
    on Oct 10, 2025 via email
    ContributorAuthor
    More actions
    Yes, via JJAVA_CLASSPATH (sorry for the delayed answer, have been on vacations with net detox)
  6. andrus
    added a commit that references this issue on Oct 11, 2025

    Extension loading from classpath #71

    218a30d
  7. andrus
    closed this as completedin #88on Oct 11, 2025
  8. andrus
    added 5 commits that reference this issue on Oct 11, 2025

    Extension loading from classpath #71

    ef44c0b

    Extension loading from classpath #71

    83ac3a6

    Extension loading from classpath #71

    0e30011

    Extension loading from classpath #71

    6712159

    Extension loading from classpath #71

    73b1097
  9. andrus commented on Oct 22, 2025

    @andrus
    andrus
    on Oct 22, 2025
    Contributor
    More actions

    Note that 1.0-a6 was released with this fix - #101

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

    Type

    No type

    Projects

    No projects

      Milestone

      • 1.0-a6

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.