How to add a jar to the IntelliJ's own classpath?
Answered
I'd like to use the Kafka plugin with my own login.callback.handler.class, as described in IJPL-163577. I think it might just work if I managed to add my callback handler class to IntelliJ's classpath. How would I go about doing that?
Please sign in to leave a comment.
Hello Christian
Currently, IntelliJ IDEA does not provide a UI or a supported mechanism to add JARs to the IDE’s process classpath. You can only:
So, you cannot reliably add your handler by “adding a JAR on IntelliJ’s own classpath” that’s not a supported extension point and could break the IDE. The only real way this becomes possible is when IJPL-163577 (and related work) is implemented.
Please subscribe to the issue and upvote to increase its visibility in our backlog.
Hi Monica,
It's a bit disappointing that this seems to make IntelliJ's Kafka plugin essentially incompatible with Azure Eventhubs that use OAUTH. Given that Confluent maintains the plugin, I doubt the ticket will ever get much attention, however: in my opinion, Confluent will have little commercial incentive to support the competition.
Hi Christian
Thanks for following up and for explaining how this affects your Azure Event Hubs setup. I completely understand why this feels disappointing. From your point of view, it’s a standard OAUTH-based Kafka scenario, and it’s reasonable to expect the Kafka plugin to handle it.
You’re right that at the moment, the plugin can’t use a custom
sasl.login.callback.handler.classthat isn’t on its own classpath, which effectively makes configurations like yours with Azure Event Hubs and OAUTHBEARER hard to use directly from the IDE. That limitation is exactly what we’re tracking in issue IJPL-163577, adding the ability to use OAUTHBEARER with a custom callback handler class.Even though the Kafka plugin is maintained by Confluent, the request itself is part of our IntelliJ Platform/Kafka integration backlog, and the decision to implement it is driven by technical feasibility and user demand, not by favouring one Kafka provider over another. Your use case with Azure Event Hubs is a very relevant example for us here, and your feedback (and vote/subscription) on the YouTrack issue genuinely helps increase its visibility.
Right now, unfortunately, there isn’t a supported IDE-side workaround I can recommend for injecting your custom handler other than bundling it as part of an IDE plugin; simply “dropping a JAR onto IntelliJ’s own classpath” isn’t supported, and it could break the IDE in subtle ways.
I can’t promise a specific timeline. However, I’ve noted your Azure Event Hubs/OAUTH scenario as an important concrete case for IJPL-163577, and I’d really encourage you to stay subscribed and keep it upvoted so we can better reflect this demand in our planning.