Code Intelligence now available for Java on

Beyang Liu

Today, we’re enabling Code Intelligence on for Java projects that use Maven. Our preview release of Java means you can jump to definition, find references, and hover over for docs on many of your favorite Java repositories — all without configuring a single editor plugin or cloning a single line of code to your local machine. Try it now on these repositories:

This is a preview, so coverage isn’t perfect. Java repositories with pom.xml that build with mvn install (without additional steps) should now have Code Intelligence on Sourcegraph. Support is coming soon for Android and Gradle projects. We will be incredibly responsive to feedback, so please send us bug reports to [email protected].

Code Intelligence superpowers

Tons of developers already use for Go and TypeScript, and all the same features are now available for Java. You can now hop across repository boundaries in Java code and find global usage examples drawn from other projects.

Cross-repository jump-to-definition lets you dive right into dependency source code without the context switch of checking out and building the dependency source repository:

Seamless cross-repo jump-to-def

Global usage examples show you how other repositories use a given class or method. They let you learn from the best examples in open source. And on private code, they let you see how code in other repositories (e.g., microservices) relies on the code you’re currently viewing.

Global usage examples

Code Intelligence in your GitHub pull requests

Java Code Intelligence on Maven-based projects is now also available in the Sourcegraph GitHub Chrome extension. That means hover tooltips and jump-to-definition in GitHub pull requests and the code browser:

Doc tooltips and jump-to-definition on GitHub

Available in the cloud and on-premises

Sourcegraph will index any open source or authorized private repository hosted on For enterprise customers, we also support GitHub Enterprise, Bitbucket, GitLab, and Phabricator. Read more about our enterprise offering here or sign up for free on

About the author

Beyang Liu is the CTO and co-founder of Sourcegraph. Beyang studied Computer Science at Stanford, where he published research in probabilistic graphical models and computer vision at the Stanford AI Lab. You can chat with Beyang on Twitter @beyang or our community Discord.

Get Cody, the AI coding assistant

Cody makes it easy to write, fix, and maintain code.