Title: Extension incorrectly runs cached `.class` file from another class of same name with no `package` · Issue #1587 · microsoft/vscode-java-debug · GitHub
Open Graph Title: Extension incorrectly runs cached `.class` file from another class of same name with no `package` · Issue #1587 · microsoft/vscode-java-debug
X Title: Extension incorrectly runs cached `.class` file from another class of same name with no `package` · Issue #1587 · microsoft/vscode-java-debug
Description: Bug report Suppose there is a file structure: folder1/ Main.java folder2/ Main.java // folder1/Main.java public class Main { public static void main(String[] args) { System.out.println("Main 1"); } } // folder2/Main.java public class Mai...
Open Graph Description: Bug report Suppose there is a file structure: folder1/ Main.java folder2/ Main.java // folder1/Main.java public class Main { public static void main(String[] args) { System.out.println("Main 1"); }...
X Description: Bug report Suppose there is a file structure: folder1/ Main.java folder2/ Main.java // folder1/Main.java public class Main { public static void main(String[] args) { System.out.println("Main 1...
Opengraph URL: https://github.com/microsoft/vscode-java-debug/issues/1587
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Extension incorrectly runs cached `.class` file from another class of same name with no `package`","articleBody":"Bug report\n\nSuppose there is a file structure:\n```\nfolder1/\n Main.java\nfolder2/\n Main.java\n```\n```java\n// folder1/Main.java\npublic class Main {\n public static void main(String[] args) {\n System.out.println(\"Main 1\");\n }\n}\n```\n```java\n// folder2/Main.java\npublic class Main {\n public static void main(String[] args) {\n System.out.println(\"Main 2\");\n }\n}\n```\nNo `package` statements; the projects are not connected at all.\n\nWhen `folder1/Main.java` is run first, it gives the correct output `Main 1`.\nBut if `folder2/Main.java` is then run, it gives the wrong output of `Main 1` instead of `Main 2`; the first built file is run instead.\n`folder1/Main.java` 'shadows' `folder2/Main.java`, since the class name is the same and there are no package statements.\nAnother file structure that causes this is `./Main.java`, `./folder/Main.java`\n\nThis bug is inconvenient when multiple different, unrelated Java projects are in the same workspace.","author":{"url":"https://github.com/aatle","@type":"Person","name":"aatle"},"datePublished":"2025-11-23T04:27:53Z","url":"https://github.com/microsoft/vscode-java-debug/issues/1587"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7ef98016-2536-33ca-9ff5-8d0ee7970e7e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 96C2:3EE41D:1D7CDFE:2969002:6B073120 |
| html-safe-nonce | b3e1e03306cbc202feed28d7184df34610fd9b0440c2008b4f6735e20b9247a7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NkMyOjNFRTQxRDoxRDdDREZFOjI5NjkwMDI6NkIwNzMxMjAiLCJ2aXNpdG9yX2lkIjoiNDMxNTUzMjg2MjkxMDA5ODI0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 53ab8ba661335009c2cd7c1aa28a09aafedc3cf5d448e4440699082c3cf3cee3 |
| hovercard-subject-tag | issue:3655482628 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/vscode-java-debug/1587/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1a2c009c45c5c7d044a0cf5542e304243748bf877980642a17a24c807d7e854a/microsoft/vscode-java-debug/issues/1587 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1a2c009c45c5c7d044a0cf5542e304243748bf877980642a17a24c807d7e854a/microsoft/vscode-java-debug/issues/1587 |
| og:image:alt | Bug report Suppose there is a file structure: folder1/ Main.java folder2/ Main.java // folder1/Main.java public class Main { public static void main(String[] args) { System.out.println("Main 1"); }... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | aatle |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2a60952cad7efb2604ea85e500208f51c1ec1943aa260ac605c13eb46a1ed83b |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/vscode-java-debug git https://github.com/microsoft/vscode-java-debug.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 102584737 |
| octolytics-dimension-repository_nwo | microsoft/vscode-java-debug |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 102584737 |
| octolytics-dimension-repository_network_root_nwo | microsoft/vscode-java-debug |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 345c27626db08417fdfc84278a4415ae9a48d8f3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width