{"id":18554224,"url":"https://github.com/oracle/javavscode","last_synced_at":"2026-01-22T08:14:44.411Z","repository":{"id":200971162,"uuid":"706578036","full_name":"oracle/javavscode","owner":"oracle","description":"Java platform support for Visual Studio Code for full featured Java development (edit-compile-debug \u0026 test cycle)","archived":false,"fork":false,"pushed_at":"2025-03-19T15:46:46.000Z","size":11570,"stargazers_count":241,"open_issues_count":43,"forks_count":39,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-03T14:11:33.228Z","etag":null,"topics":["java","language-server-protocol","oracle","vscode-extension"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oracle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-18T08:18:40.000Z","updated_at":"2025-03-30T18:53:51.000Z","dependencies_parsed_at":"2024-05-03T05:45:26.939Z","dependency_job_id":"28d76ddc-a309-42aa-9e35-0ec1a3073e5b","html_url":"https://github.com/oracle/javavscode","commit_stats":{"total_commits":204,"total_committers":18,"mean_commits":"11.333333333333334","dds":0.3970588235294118,"last_synced_commit":"03970611a614a4778e5c6e64e2b0bdecbb89de14"},"previous_names":["oracle/javavscode"],"tags_count":9,"template":false,"template_full_name":"oracle/template-repo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Fjavavscode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Fjavavscode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Fjavavscode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Fjavavscode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oracle","download_url":"https://codeload.github.com/oracle/javavscode/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248586249,"owners_count":21128996,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","language-server-protocol","oracle","vscode-extension"],"created_at":"2024-11-06T21:20:18.483Z","updated_at":"2026-01-22T08:14:44.396Z","avatar_url":"https://github.com/oracle.png","language":"TypeScript","readme":"\u003c!--\n\nCopyright (c) 2023-2025, Oracle and/or its affiliates.\n\n    Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements. See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership. The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License. You may obtain a copy of the License at\n    \n       http://www.apache.org/licenses/LICENSE-2.0\n    \n    Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied. See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n--\u003e\n\n\u003c!-- This file has been modified for Oracle Java Platform extension --\u003e\n\n# Java Platform Extension for Visual Studio Code\n[![Visual Studio Marketplace](https://img.shields.io/visual-studio-marketplace/v/Oracle.oracle-java?style=for-the-badge\u0026label=VS%20Marketplace\u0026logo=visual-studio-code)](https://marketplace.visualstudio.com/items?itemName=Oracle.oracle-java)\n[![Installs](https://img.shields.io/visual-studio-marketplace/i/Oracle.oracle-java?style=for-the-badge)](https://marketplace.visualstudio.com/items?itemName=Oracle.oracle-java)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/oracle/javavscode/main.yml?branch=main\u0026style=for-the-badge\u0026logo=github)](https://github.com/oracle/javavscode/actions?query=workflow:Java%20Platform%20Support%20for%20Visual%20Studio%20Code)\n[![License](https://img.shields.io/github/license/oracle/javavscode?style=for-the-badge\u0026logo=apache)](https://github.com/oracle/javavscode/blob/main/LICENSE.txt)\n\nJava Platform extension from Oracle brings full-featured development support (edit-compile-debug \u0026 test cycle) to VS Code. It also offers support for Maven and Gradle projects. Applications using JDK 8 and above are supported.\n\n\n## Getting Started\n1. See the [VS Code Tips](https://github.com/oracle/javavscode/wiki/VS-Code-Tips) wiki for a quick primer on getting started with VS Code.\n2. Setting up the JDK\n    - If no JDK is present in your system then the extension can set things up for you. For more details refer to [JDK Downloader](#jdk-downloader) section.\n    - Set the VS Code `Settings | Jdk: Jdkhome` setting to point to the JDK that the Language Server will run on and also by default use for running and compiling projects.\n        - The extension requires JDK 17 or newer to run.\n    - Optionally, set a different JDK to compile and run projects in the `Settings | Jdk › Project: Jdkhome` setting.\n        - By default, the __jdk.jdkhome__ setting is used. \n        - Projects can run on JDK 8 and above.\n    - For more information, see the section [Selecting the JDK](#selecting-the-jdk).\n3. Use any one of the following ways to start coding, compiling and debugging in Java.\n    - Simply create a new Java class with `main` method.\n    - Use the __Java: New File from Template...__ command to create a new Java file.\n    - Use the __Java: New Project...__ command to create a new project.\n    - Open the folder with existing __Maven__ or __Gradle__ project files (_pom.xml_ or _build.gradle, gradle.properties_).\n\n## Supported Actions\nIn the VS Code command palette:\n* __Java: New Project...__ allows creation of new Maven or Gradle project \n* __Java: New File from Template...__ adds various files to the currently selected open project. Files are:\n    * Java - broad selection of various predefined Java classes\n    * Unit tests - JUnit and TestNG templates for test suites and test cases\n    * Other - various templates for Javascript, JSON, YAML, properties, ... files\n* __Java: Create New Notebook...__ command to create a new [Java notebook](#interactive-java-notebooks) (`.ijnb` file)\n* __Java: Open JShell...__ command to open [JShell](#jshell).\n* __Java: Compile Workspace__ - invoke Maven or Gradle build\n* __Java: Clean Workspace__ - clean Maven or Gradle build\n* __Download, install and Use JDK__ - allows download and installation of JDK binaries \n* Debugger __Java+...__ - start main class or test on selected JDK. More in [Debugger section](#debugger-and-launch-configurations)\n* __Test Explorer__ for Java tests results visualization and execution including editor code Lenses.\n* Maven and Gradle support including multi-project projects, subprojects opening and Gradle priming builds.\n* __Java: Go To Test/Tested Class__ - Navigates to the corresponding test or source class file\n\n## Project Explorer\nProject Explorer provides an overview of logical project structure, groups sources together and greatly simplifies Java package structure exploration. Project Explorer is an addition to the classical workspace explorer. Use it to build, test, execute and operate your Maven and Gradle Java projects.\u003cbr/\u003e\n![Project Explorer](vscode/images/project-explorer.png)\n\n## Interactive Java Notebooks\n### Introduction\n* Experience interactive coding with Java notebooks. See the [Using Interactive Java Notebooks](https://github.com/oracle/javavscode/wiki/Interactive-Java-Notebooks) wiki for guidance and tutorials on using notebooks.\n* Use the __Java: Create New Notebook...__ command to create a new Java notebook (`.ijnb` file)\u003cbr/\u003e\n    ![Java Notebook](vscode/images/java_notebook.gif)\n* Add code snippets with `+ Code` button and document with markdown cells using the `+ Markdown` button.\n* Double-click on a cell to edit and press `Esc` when done.\n* Jupyter-style notebooks let you combine Java code snippets with markdown-formatted text cells.\n* Run individual code cells or execute the entire notebook.\n* Save outputs alongside code cells.\n* **Sharing notebooks:**\n    * Share as `.ijnb` files for use with the Oracle Java extension.\n    * Rename with a `.ipynb` extension for viewing in other IDEs, such as Jupyter.\n* Download the [sample notebooks](https://github.com/oracle/javavscode/blob/main/samples/notebooks) and open them in VS Code to get started.\n\n### Java Notebooks for Java Projects\n* Document Java projects with interactive Java notebooks.\n    * Open or create a Java notebook in your workspace folder loaded with classes from your project.\u003cbr/\u003e\n    ![Java Notebook For Project](vscode/images/project_notebook.gif)\n    * Use the `Project Context` options to switch to a different project context.\u003cbr/\u003e\n    ![Switch Project Context](vscode/images/project_context.png)\n* Provide code snippets, markdown explanations, and expected outputs.\n\n### Notebook Configurations\nThe following configuration settings are available:\n* `jdk.notebook.classpath`\n* `jdk.notebook.modulepath`\n* `jdk.notebook.addmodules`\n* `jdk.notebook.enablepreview`\n* `jdk.notebook.implicitimports`\n\nThese settings *override* settings inferred from project context.\n\n## JShell\n* Use the __Java: Open JShell...__ command to open JShell.\n* Project classes from currently open project are automatically loaded.\u003cbr/\u003e\n![JShell](vscode/images/jshell.gif)\n\n## Debugger and Launch Configurations\nLanguage Server __Java+ ...__ launch configuration supports debugging and running Java applications using JDK11 or newer. \n1. The launch configuration (debugger) is invoked when `Run main | Debug main` codelens is selected in the code.\n2. Or __Java+...__ is selected in __Run and Debug__ activity panel.\u003c/br\u003e\n![Debug configurations](vscode/images/debuggers.png)\n### Launch Configurations\n* __Launch Java App__ - Debug or Run current Java project\n* __Attach to Port__ \u0026 __Attach to Process__ - Attach debugger actions. Available when __Java+ ...__ at the bottom of drop down list is selected.\n    * Select this configuration, then click the ![Run](vscode/images/run.png) button.\n    * Select either from available process or enter the port to connect to JVM running with JDWP.\n    * __Attach to Shared Memory__ is available on Windows in addition to above mentioned _Attach..._\n\nDefault launch configurations provided by Language Server can modified in `launch.json` file.\n\n### Run Configurations panel\nProgram arguments, VM options, environment variables, etc., can be set in the Run Configuration panel as part of Explorer. The panel is sufficient for all typical use-cases Java programmer faces. Only advanced, expert scenarios may require touching of `launch.json` (which still takes precedence).\u003cbr/\u003e\n![Run Configuration](vscode/images/run_config.png) \n\n## JDK Downloader\nIf the system does not detect any JDK, the extension will offer a downloader and setup prompt to help you set up a JDK. This setup provides options for Oracle JDK, OpenJDK, and allows you to choose from any installed JDK on your system.\nAlternatively, you can manually specify the path to JDK binaries by utilizing the JDK downloader.\nYou can also access the JDK downloader through the \"Download, install, and Use JDK\" option in the command palette.\u003cbr/\u003e\n![JDK Downloader](vscode/images/jdk_downloader.png)\n\n## Enabling Java Preview Features \nWhen using preview features use the quick fix action option to easily enable them.\n\n![Enable Preview](vscode/images/enable_preview.gif)\n## Supported Refactorings\n\nClass level refactorings as well as variable refactorings are supported in VS Code via the Oracle Java Platform extension. See the following screenshots:\n\n### Source Action ... context menu\n![Class Source Actions](vscode/images/Source_actions.png) \n\n### Introduce refactorings available via Show Code actions light bulb\n![Introduce ... refactoring](vscode/images/Introduce_refactoring.png)\n\n### More Refactorings available also using Refactor... context menu\n![More Refactorings](vscode/images/Refactor_menu.png)\n\n### Surround with refactorings\n![Surrond with Refactorings](vscode/images/Surrond_With_refactorings.png)  \n\nSome refactorings are two steps with like __Generate Override method__ ... where method to be overriden is selected in 2nd step:\u003cbr/\u003e\n![Override refactoring](vscode/images/Override_refactoring.png)\n\n### Change Method Parameters refactoring\nChange method parameters refactoring is provided using dedicated form allowing to change, add, move, remove method parameters.\u003cbr/\u003e\n![Change method parameters refactoring](vscode/images/change_method_params.png)\n\n### Move Members Refactoring\nMove members refactoring provides dedicated form as well.\u003cbr/\u003e\n![Move members refactoring](vscode/images/move_refactoring.png)\n\n### Some other supported refactorings are:\n* Convert to static import \n* Pull member up \u0026 down \n* Move class \n* Extract interface/method\n* Split into declaration and assignment \n* Extract local variable\n* Assign to variable\n* Generate hashCode/equals\n* Generate toString()\n* Surround With refactoring\n* `for` cycle refactoring\n* `try-catch` refactoring\n* `switch()` statement\n* `while()` cycle\n* Inline redundant variable \n* Constructor and method argument refactoring\n\n## Formatter Preferences\nEasily update default formatter preferences by adjusting a simple configuration option to tailor settings according to specific needs.\n\nOpen VS Code `Settings | Extensions | Java` and set `Jdk › Format: Settings Path:` option to the formatter preferences file.\n\nPlease refer to [Java formatting preferences](https://github.com/oracle/javavscode/wiki/Java-formatting-preferences) wiki for more info.\n\n## Hints Preferences\nEasily update default hint preferences by adjusting a simple configuration option to tailor hint preferences to specific needs.\n\nOpen VS Code `Settings | Extensions | Java` and set `Jdk › Hints: Preferences:` option to the xml hint preferences file.\n\n## Organize Imports\nOut of the box support for organizing imports in Java sources is available. It removes unused imports, groups imports by packages and updates your imports whenever a file is saved. In addition to the defaults, there is a rich set of configuration options. \n\nOpen VS Code `Settings | Extensions | Java` and search for _Jdk_ to set `Jdk › Java › Imports:` options:\n* `Count For Using Star Import` - Class count to use a star-import, 999 is the default value\n* `Count For Using Static Star Import` - Members count to use a static star-import, 999 is the default value\n* `Groups` - Groups of import statements (specified by their package prefixes) and their sorting order. Import statements within a group are ordered alphabetically\n\nThe `Jdk › Java › On Save: Organize Imports` setting in VS Code `Settings | Extensions | Java` enables the **Organize Imports** action to run when saving a document.\n\n## JavaDoc smart editing\nWhen adding JavaDoc to code Oracle Java Platform extension assists by suggesting to insert preformatted and prepopulated JavaDoc comment. Type `/**` above the method signature and the IDE offers to complete the JavaDoc. The action creates a JavaDoc comment with all the parameters prepared.\u003cbr/\u003e\n![JavaDoc Completion](vscode/images/javadoc.png)\n\n## Test Explorer\nOracle Java Platform extension provides Test Explorer view which allows to run all tests in a project, examine the results, go to source code and run particular test.\u003cbr/\u003e\n![Test Explorer](vscode/images/Test_explorer.png)\n\n### Localization support\nOracle Java Platform extension provides localization support for _Japanese_ and _Simplified Chinese_.\nUse the `View | Command Palette | Configure Display Language` command to select `ja` for _Japanese_ or `zh-cn` for _Simplified Chinese_\n\n\n![Localization.gif](vscode/images/Localization.gif)\n## Selecting the JDK\nThe JDK to build, run and debug projects is being searched in the following locations:\n\n- `jdk.project.jdkhome` setting (workspace then user settings)\n- `jdk.jdkhome` setting (workspace then user settings)\n- `JDK_HOME` environment variable\n- `JAVA_HOME` environment variable\n- current system path\n\nAs soon as one of the settings is changed, the Language Server is restarted.\n\n## How to use JDK early access builds\nThis setup makes it easier to experiment with early access JDK builds. Follow these steps to enable the use of an early access JDK:\n1. Open VS Code `Settings | Jdk › Advanced › Disable: Nbjavac` and enable the checkbox.\n2. Set `Settings | Jdk: Jdkhome` to point to the home-folder path of the early access JDK.\n\n## Troubleshooting\nIf your extension is not starting and throwing some error like no JDK found even if you have a working JDK installed in your machine, then you can try deleting cache for the workspace using `View | Command Palette | Delete Oracle Java extension cache for this workspace`. \n\n## Workspace\nThe extension will analyze the content of the opened workspace, and relevant other files. If the workspace contains a lot of data, this may take a long time. It is therefore recommended to avoid adding unnecessarily big folders in a workspace. Specifically, it is not recommended to open user's home directory as a part of the workspace.\n\n## Known Issues\n1. If an action has been applied to the Maven `pom.xml` file through the extension, such as enabling a preview feature or adding a test runner framework, subsequent compile or run operations may fail. To resolve this issue, please follow the steps below:\n    1. Check the `pom.xml` file for any duplicated tags.\n    2. If duplicated tags are found, remove the extra tags and attempt to compile again.\n    3. Add the `--enable-preview` VM argument to the *exec-maven-plugin* or *maven-surefile-plugin* configurations if they are used for execution or test runs.\n2. The *Project: Test Project* command executes the project's tests but does not update the Testing or the Tests Results panels. The test output is present only in the Terminal or Debug Console panel.\n\n## Telemetry\n\nYou may choose to enable the Oracle Java extension for Visual Studio Code (\\\"*JVSCE*\\\") to collect and send anonymous technical data commonly known as \\\"*telemetry data*\\\" to Oracle to help improve the Java platform. \n- No personal information nor source code is collected. \n- You may refer to the data collection and privacy policy for JVSCE at [TELEMETRY.md](vscode/TELEMETRY.md).\n- No information is sent prior to you enabling Telemetry.\n\n### Enabling/Disabling Telemetry\nIf you wish to enable or disable the collection and transmission of the telemetry data, you may do so in the following ways.\n1. Notification pop-up request to enable.\n    - Appears at the time of activation of the extension, when you have not made a choice for this setting.\n2. The Java extension setting: [`jdk.telemetry.enabled`](vscode://settings/jdk.telemetry.enabled)\n3. *(On Microsoft Visual Studio Code)* The global VS Code setting: [`telemetry.telemetryLevel`](vscode://settings/telemetry.telemetryLevel) must be set to `all` for enabling JVSCE telemetry.\n\n## Contributing\n\nThis project welcomes contributions from the community. Before submitting a pull request, please [review our contribution guide](./CONTRIBUTING.md)\n\n## Security\n\nPlease consult the [security guide](https://github.com/oracle/javavscode/blob/main/SECURITY.md) for our responsible security vulnerability disclosure process\n\n## License\n\nCopyright (c) 2023-2025 Oracle and/or its affiliates.\n\nOracle Java Platform Extension for Visual Studio Code is licensed under [Apache 2.0 License](https://github.com/oracle/javavscode/blob/main/LICENSE.txt).\nThe [THIRD_PARTY_LICENSES](./THIRD_PARTY_LICENSES.txt) file contains third party notices and licenses.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle%2Fjavavscode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foracle%2Fjavavscode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle%2Fjavavscode/lists"}