Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

Developer workflows using the VS Code for Java extension 1.0

October 20, 2021
Mohit Suman Roland Grunberg
Related topics:
Developer toolsJava
Related products:
Red Hat OpenShift

    The 1.0 release of Language Support for Java by Red Hat on Visual Studio Code is now available on VS Code Marketplace. We'd like to take the opportunity to showcase a few workflows that really make it enjoyable to develop Java applications in Visual Studio Code (VS Code).

    vscode-java 1.0: The one with Java 17

    The extension's 1.0 release supports workflows with Java 17. Released a few weeks ago, Java 17 marks a major point of change in the Java community as many organizations migrate to the latest Java runtime. Here is a short demo around the workflow using the Java extension and Java 17 support:

    One of the advantages of the vscode-java extension is that all it takes to start coding is a simple Java source file. There's no need for fancy IDE-specific config files or even build files (such as pom.xml or build.gradle) to get a project started.

    Let's take an in-depth tour of the Java extension's new features.

    Configuring your Java project

    First, we'll begin by opening VS Code in a folder with just a few Java source files, as shown in Figure 1.

    A screenshot of the project loaded in VS Code.
    Figure 1. Loading the project in VS Code.

    Note: One point worth repeating is that we support pretty much any Java runtime for which we can detect a compatible JDK.

    As Figure 2 shows, we have configured Java 8, 11, and 17 environments by providing paths to a compatible JDK installation. Although in this example we have set Java 17 as the default for unmanaged projects, you can easily switch to Java 8 by setting it to default: true. Once saved, the configuration will take effect. Maven or Gradle projects will have this configured in their build files; vscode-java can detect and honor those settings.

    An animated graphic showing various Java configuration runtimes.
    Figure 2. Java configuration runtimes.

    With a variety of different code actions, it's very easy to quickly get some boilerplate code. You can generate source headers with java.templates.fileHeader (File → Preferences → Settings), and getters/setters can be auto-generated through code completion. They can also be auto-generated via code actions on the individual fields or class itself, as shown in Figure 3.

    create-class-generate-getset
    Figure 3. Creating the ​​class to auto-generate getters/setters.

    Access references for unnmanaged projects

    Having access to the sources of the libraries you're using is important. While we've always supported this for managed projects (e.g., Maven or Gradle), we now support it for unmanaged projects as well. Simply reference a library from Maven Central, and the sources will be available automatically when interacting with some reference from that library, as shown in Figure 4.

    If you want a little more control over your unmanaged project's dependencies, but don’t want to transition to using some build tool, you can use java.project.referencedLibraries (File → Preferences → Settings). To jump to a particular method definition, you can use the right-click context menu or configure a keyboard shortcut (e.g., the F12 key).

    source-lookup
    Figure 4. Source lookup.

    Search for methods

    It's handy to be able to search for your method declarations the same way you might search for a file, especially when you're dealing with a new project or file structure. Rather than searching for a file that has the method we're interested in, we can search for the method directly. Simply enable java.symbols.includeSourceMethodDeclarations (File → Preferences → Settings).

    Type hierarchy

    The Java extension also now supports type hierarchy. This feature is accessible from the right-click context menu, but you can also easily configure it as a keyboard shortcut, as shown as Figure 5.

    source-method-lookup-type-hierarchy.
    Figure 5. Source method lookup type hierarchy.

    Run and debug

    In order to take advantage of run and debug capabilities, you'll need to install the vscode-java-debug extension from the Visual Studio Code Marketplace.

    The Debugger for Java extension lets you run and debug the project in many different ways. For simple projects, you can enable java.debug.settings.enableRunDebugCodeLens (File → Preferences → Settings), and use CodeLens directly from the main method.

    You can set breakpoints, inspect and modify variable values, and even interact with the program from the Debug Console, as shown in Figure 6.

    run-debug
    Figure 6. Run and debug.

    Future roadmap

    There are many items planned for the Java language support in VS Code. Some of these include:

    • Making it easier to configure compiler error/warnings and code formatting options.
    • Adding useful auto-completion features (such as Postfix completion).
    • Continuing to adopt convenient code actions (new Java language features, for example) and eventually reach feature parity with those provided by the Eclipse Java IDE.
    • Improving the language server's initial startup time and overall performance.
    • Embedding a Java runtime to improve the "Getting Started" experience.

    Testimonials

    "For me, VS Code for Java is the easiest way to get started with a Java project. It doesn't matter if you're starting from scratch or you need to quickly open an existing project—VSCode for Java is blazingly fast and small. It will work fast even on older machines, and it has all the features you need to be productive when developing Java projects, from old versions of Java up to the latest version: 17!"

    —Edson Yanaga, Java Champion and Microsoft MVP, Director of Developer Experience, Red Hat

    "vscode-java makes Visual Studio code a fast and lean way to edit Java projects. I can start and stop the editor on any project, small or large, in no time. This makes it a great tool to use as both my primary and secondary IDE while working on JBang and Quarkus projects."

    —Max Rydahl Andersen, Distinguished Engineer, Red Hat

    "Visual Studio Code and its vscode-java extension have become my go-to solution for a quick and lightweight code exploration and editing experience. Whether it's for examining pull requests, diving into a new code base, or a live demo during a conference talk, vscode-java allows me to work with Java code intuitively and efficiently, providing all the goodies you'd expect from your coding workbench, like code navigation, refactoring support, instant feedback in case of failures, etc. Part of the VSCode extension pack for Java, vscode-java integrates seamlessly with other extensions like the Java debugger and test runner, as well as features like remote development via SSH, making it an invaluable part of my Java toolbox."

    —Gunnar Morling, Java Champion, Principal Software Engineer, Red Hat

    Conclusion

    Check out our Quick Start guide to get started building Java applications using Visual Studio Code. Obviously, 1.0.0 is not the endgame. Development continues, so you can look forward to more goodies—there's a big one coming in the near future.

    Give us your feedback

    We would love️ to hear what you think about the Java extension. As always, your feedback is critical to our product improvement.

    • Have a question? Start a discussion on GitHub Discussions.
    • File a bug in GitHub Issues.
    • Chat with us on Gitter.
    • Find us on Twitter at @VSCodeJava.


     

    Be more productive with the new VS Code Java 1.0 

    Are you still stuck in Java 6, 7, or 8? Or up-to-date with Java 17?

    It doesn't matter which version; you can be more productive with the shiny and new VS Code Java 1.0 Extension! Join us as we review some of the noteworthy features of the past few releases, and talk about Java 17 support, type hierarchy, source lookup improvements, and plenty of valuable tips in between!

    Browse all DevNation Tech Talks

    Last updated: July 15, 2025

    Related Posts

    • Devfiles and Kubernetes cluster support in OpenShift Connector 0.2.0 extension for VS Code

    • vscode-xml 0.14.0: A more customizable XML extension for VS Code

    • How to use the VS Code Tekton Pipelines extension

    • Introducing 10 new features in Quarkus Tools for Visual Studio Code

    Recent Posts

    • Federated identity across the hybrid cloud using zero trust workload identity manager

    • Confidential virtual machine storage attack scenarios

    • Introducing virtualization platform autopilot

    • Integrate zero trust workload identity manager with Red Hat OpenShift GitOps

    • Best Practice Configuration and Tuning for Linux and Windows VMs

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Chat Support

    Please log in with your Red Hat account to access chat support.