René's URL Explorer Experiment


Title: Error: Could not find or load main class · Issue #1085 · redhat-developer/vscode-java · GitHub

Open Graph Title: Error: Could not find or load main class · Issue #1085 · redhat-developer/vscode-java

X Title: Error: Could not find or load main class · Issue #1085 · redhat-developer/vscode-java

Description: When running the Java program by clicking "Run" on top of the static main function, it reports "Could not find or load the main class: xxx". However, directly invoking java with the source file works without any error. I tried to use the...

Open Graph Description: When running the Java program by clicking "Run" on top of the static main function, it reports "Could not find or load the main class: xxx". However, directly invoking java with the source file wor...

X Description: When running the Java program by clicking "Run" on top of the static main function, it reports "Could not find or load the main class: xxx". However, directly invoking java with...

Opengraph URL: https://github.com/redhat-developer/vscode-java/issues/1085

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Error: Could not find or load main class","articleBody":"When running the Java program by clicking \"Run\" on top of the static main function, it reports \"Could not find or load the main class: xxx\". However, directly invoking java with the source file works without any error. I tried to use the \"Java: Clean the Java Language Server Workspace\" command, and error persists.\r\n\r\nBy looking at the log (, here are two errors reported that may be the cause of the issue:\r\n\r\n```\r\n[2019-10-02 16:48:22.718] [exthost] [error] [redhat.java] provider FAILED\r\n[2019-10-02 16:48:22.720] [exthost] [error] Error: The request (id: 28, method: 'textDocument/hover') has been cancelled\r\n\tat c:\\Users\\tingh\\.vscode\\extensions\\redhat.java-0.50.0\\dist\\extension.js:1:68555\r\n\tat c:\\Users\\tingh\\.vscode\\extensions\\redhat.java-0.50.0\\dist\\extension.js:1:68849\r\n\tat Immediate.module.exports.M.G.Y.size.setImmediate (c:\\Users\\tingh\\.vscode\\extensions\\redhat.java-0.50.0\\dist\\extension.js:1:69210)\r\n\tat runCallback (timers.js:694:18)\r\n\tat tryOnImmediate (timers.js:665:5)\r\n\tat processImmediate (timers.js:647:5)\r\n[2019-10-02 16:48:23.302] [exthost] [info] ExtensionService#_doActivateExtension ms-vscode.cpptools {\"startup\":false,\"activationEvent\":\"onDebug\"}\r\n[2019-10-02 16:48:23.302] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/tingh/.vscode/extensions/ms-vscode.cpptools-0.25.1/dist/main\r\n[2019-10-02 16:48:23.429] [exthost] [info] ExtensionService#_doActivateExtension vscode.debug-server-ready {\"startup\":false,\"activationEvent\":\"onDebugResolve\"}\r\n[2019-10-02 16:48:23.429] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Program Files/Microsoft VS Code/resources/app/extensions/debug-server-ready/dist/extension\r\n```\r\n\r\n##### Environment\r\n- Operating System: Windows 10 x64 Pro 1903, Build 18362.356\r\n- JDK version: Oracle Java 12.0.2\r\n- Visual Studio Code version: 1.38.1\r\n- Java extension version: 0.50.0\r\n\r\n##### Steps To Reproduce\r\nSample Project: (FileIO.java)\r\n```java\r\nimport java.io.File;\r\nimport java.io.IOException;\r\nimport java.util.Scanner;\r\n\r\npublic class FileIO {\r\n\r\n    public static void main(String[] args)\r\n    throws IOException {\r\n        File file = new File(\"data.txt\");\r\n        Scanner fileInput = new Scanner(file);\r\n\r\n        for(int i = 0; i \u003c 5; i++) {\r\n            System.out.println(\r\n                i + \": \" + fileInput.nextDouble()\r\n            );\r\n        }\r\n\r\n        fileInput.close();\r\n    }\r\n}\r\n```\r\n\r\n##### Current Result\r\n```\r\nc:\\Research\\test_jav>cd C:\\Research\\test_jav && C:\\Users\\tingh\\.vscode\\extensions\\vscjava.vscode-java-debug-0.22.0\\scripts\\launcher.bat \"C:\\Program \r\nFiles\\Java\\jdk-12.0.2\\bin\\java\" --enable-preview -Dfile.encoding=UTF-8 -cp C:\\Users\\tingh\\AppData\\Roaming\\Code\\User\\workspaceStorage\\24ee80637ed5c707879e2f0bc2507a43\\redhat.java\\jdt_ws\\jdt.ls-java-project\\bin FileIO\r\nError: Could not find or load main class FileIO\r\nCaused by: java.lang.ClassNotFoundException: FileIO\r\n```\r\n\r\n##### Expected Result\r\n```\r\nc:\\Research\\test_jav>\"C:\\Program Files\\Java\\jdk-12.0.2\\bin\\java\" FileIO.java\r\n0: 11.0\r\n1: 22.0\r\n2: 33.0\r\n3: 44.0\r\n4: 55.0\r\n```\r\n\r\n##### Additional Informations\r\n","author":{"url":"https://github.com/TinghuiWang","@type":"Person","name":"TinghuiWang"},"datePublished":"2019-10-02T23:51:23Z","url":"https://github.com/redhat-developer/vscode-java/issues/1085"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:ee72faf1-6518-de54-8147-99b954fdf336
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB5F0:2D075:3E90:4EE5:6B0734A3
html-safe-nonce4b1c17b3f6716cbd6773cfb18f113dde379ed7e8be29fbe9b6c83dd98c9cc07e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNUYwOjJEMDc1OjNFOTA6NEVFNTo2QjA3MzRBMyIsInZpc2l0b3JfaWQiOiIyMjA0NjQ3NzY2MTI5ODQ5NTA3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac54b77ca8149c57a6047cc2ff4b3fe5d1c26df7fff4f7e7711c0f478a84c4e548
hovercard-subject-tagissue:501781230
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/redhat-developer/vscode-java/1085/issue_layout
twitter:imagehttps://opengraph.githubassets.com/0e0a3cff4244e7bd8d2c8e6df5974e5651c92cf51ab64c5a3a4f6681c4e1a4e0/redhat-developer/vscode-java/issues/1085
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/0e0a3cff4244e7bd8d2c8e6df5974e5651c92cf51ab64c5a3a4f6681c4e1a4e0/redhat-developer/vscode-java/issues/1085
og:image:altWhen running the Java program by clicking "Run" on top of the static main function, it reports "Could not find or load the main class: xxx". However, directly invoking java with the source file wor...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameTinghuiWang
hostnamegithub.com
expected-hostnamegithub.com
None2a60952cad7efb2604ea85e500208f51c1ec1943aa260ac605c13eb46a1ed83b
turbo-cache-controlno-preview
go-importgithub.com/redhat-developer/vscode-java git https://github.com/redhat-developer/vscode-java.git
octolytics-dimension-user_id11033755
octolytics-dimension-user_loginredhat-developer
octolytics-dimension-repository_id65561709
octolytics-dimension-repository_nworedhat-developer/vscode-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id65561709
octolytics-dimension-repository_network_root_nworedhat-developer/vscode-java
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release345c27626db08417fdfc84278a4415ae9a48d8f3
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/redhat-developer/vscode-java/issues/1085#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fredhat-developer%2Fvscode-java%2Fissues%2F1085
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fredhat-developer%2Fvscode-java%2Fissues%2F1085
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=redhat-developer%2Fvscode-java
Reloadhttps://github.com/redhat-developer/vscode-java/issues/1085
Reloadhttps://github.com/redhat-developer/vscode-java/issues/1085
Reloadhttps://github.com/redhat-developer/vscode-java/issues/1085
redhat-developerhttps://github.com/redhat-developer
vscode-javahttps://github.com/redhat-developer/vscode-java
Codehttps://github.com/redhat-developer/vscode-java
Issues839 (839)https://github.com/redhat-developer/vscode-java/issues
Pull requests7 (7)https://github.com/redhat-developer/vscode-java/pulls
Discussionshttps://github.com/redhat-developer/vscode-java/discussions
Actionshttps://github.com/redhat-developer/vscode-java/actions
Projectshttps://github.com/redhat-developer/vscode-java/projects
Wikihttps://github.com/redhat-developer/vscode-java/wiki
Security and qualityhttps://github.com/redhat-developer/vscode-java/security
Insightshttps://github.com/redhat-developer/vscode-java/insights
https://github.com/redhat-developer/vscode-java
New issuehttps://github.com/login?return_to=https://github.com/redhat-developer/vscode-java/issues/1085
New issuehttps://github.com/login?return_to=https://github.com/redhat-developer/vscode-java/issues/1085
Error: Could not find or load main classhttps://github.com/redhat-developer/vscode-java/issues/1085#top
duplicatehttps://github.com/redhat-developer/vscode-java/issues?q=state%3Aopen%20label%3A%22duplicate%22
https://github.com/TinghuiWang
TinghuiWanghttps://github.com/TinghuiWang
on Oct 2, 2019https://github.com/redhat-developer/vscode-java/issues/1085#issue-501781230
https://github.com/rajkundu
rajkunduhttps://github.com/rajkundu
on Oct 3, 2019https://github.com/redhat-developer/vscode-java/issues/1085#issuecomment-537787712
VS Code java logshttps://github.com/redhat-developer/vscode-java/wiki/Troubleshooting#get-the-vscode-java-logs
https://github.com/xCuri0
xCuri0https://github.com/xCuri0
on Oct 3, 2019https://github.com/redhat-developer/vscode-java/issues/1085#issuecomment-537810964
@rajkunduhttps://github.com/rajkundu
https://github.com/fbricon
fbriconhttps://github.com/fbricon
on Oct 4, 2019https://github.com/redhat-developer/vscode-java/issues/1085#issuecomment-538406308
https://download.jboss.org/jbosstools/jdt.ls/staging/?C=M;O=Dhttps://download.jboss.org/jbosstools/jdt.ls/staging/?C=M;O=D
https://github.com/TinghuiWang
TinghuiWanghttps://github.com/TinghuiWang
on Oct 4, 2019https://github.com/redhat-developer/vscode-java/issues/1085#issuecomment-538454411
fbriconhttps://github.com/fbricon
duplicatehttps://github.com/redhat-developer/vscode-java/issues?q=state%3Aopen%20label%3A%22duplicate%22
on Oct 4, 2019https://github.com/redhat-developer/vscode-java/issues/1085#event-2687916917
https://github.com/fbricon
fbriconhttps://github.com/fbricon
on Oct 4, 2019https://github.com/redhat-developer/vscode-java/issues/1085#issuecomment-538459240
#1086https://github.com/redhat-developer/vscode-java/issues/1086
fbriconhttps://github.com/fbricon
completedhttps://github.com/redhat-developer/vscode-java/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Oct 4, 2019https://github.com/redhat-developer/vscode-java/issues/1085#event-2687917459
https://github.com/temidosu
temidosuhttps://github.com/temidosu
on Oct 9, 2019https://github.com/redhat-developer/vscode-java/issues/1085#issuecomment-540088199
https://github.com/temidosu
temidosuhttps://github.com/temidosu
on Oct 9, 2019https://github.com/redhat-developer/vscode-java/issues/1085#issuecomment-540117560
https://github.com/feyselmubarek
feyselmubarekhttps://github.com/feyselmubarek
on Nov 24, 2019https://github.com/redhat-developer/vscode-java/issues/1085#issuecomment-557874972
Sign up for freehttps://github.com/signup?return_to=https://github.com/redhat-developer/vscode-java/issues/1085
Sign in to commenthttps://github.com/login?return_to=https://github.com/redhat-developer/vscode-java/issues/1085
duplicatehttps://github.com/redhat-developer/vscode-java/issues?q=state%3Aopen%20label%3A%22duplicate%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.