简体   繁体   English

App.java 不在项目 ss_d36b3017 的类路径上,不会编译成 a.class 文件Java(32)

[英]App.java is not on the classpath of project ss_d36b3017, it will not be compiled to a .class fileJava(32)

I am constantly facing this error and I have no idea how to fix it.我经常面临这个错误,我不知道如何解决它。

App.java is not on the classpath of project ss_d36b3017, it will not be compiled to a .class fileJava(32)

I am using Visual Studio Code for writing Java.我正在使用 Visual Studio Code 编写 Java。 I have set up the environment variable.我已经设置了环境变量。 javac --version and java --version and giving the expected results in PowerShell. javac --version 和 java --version 并在 PowerShell 中给出预期结果。 I am using a very simple folder convention than is made by VS Code pallet.我使用的文件夹约定比 VS Code 托盘制作的非常简单。 It has 1 folder (in drive D:)named project which has 3 folder named lib(This is vacant), src(This has the App.java)<readme.md It has no building tools.它有 1 个文件夹(在驱动器 D:)命名项目,其中有 3 个文件夹名为 lib(这是空的),src(这有 App.java)<readme.md 它没有构建工具。 Code inside the App.java does not affect the issue. App.java 中的代码不会影响该问题。

I need some help.我需要一些帮助。

Try the following two ways to see if question goes away.尝试以下两种方法,看看问题是否消失。

  1. Open Command Palette and choose Java: Clean Java Language Server Workspace打开命令面板并选择Java:清理 Java 语言服务器工作区

  2. Right click the folder src and choose Add Folder to Java Source Path , then reload the window.右键单击文件夹src并选择Add Folder to Java Source Path ,然后重新加载 window。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 “.java 不在项目的类路径中,不会编译为.class 文件”错误 - ".java is not on the classpath of project, it will not be compiled to a .class file" error 将编译后的 class 文件添加到类路径中,以便在 java gradle 项目中导入 - Add compiled class files to classpath for import in java gradle project 如何使用classname.java而不是App.java创建Java项目 - How to create Java project with classname.java instead of App.java 新的Maven项目无法编译:“ App.java:[1,8] <identifier> 预期” - New maven project fails to compile: “App.java:[1,8] <identifier> expected” app.java:14: 错误:非法启动表达式如何解决?(我刚开始学习java...) - app.java:14: error: illegal start of expression how to fix it?(i just started learning java…) 尝试使用类路径运行Java程序; Java无法找到我原来的编译类 - Trying to run Java program with classpath; java is not able to find my original compiled class Java 项目中的类路径问题 - Issue with classpath in Java project fabric-sdk-java 如何在我的 App.java 中实现 Network.addBlockListener 方法 - fabric-sdk-java How to implement the Network.addBlockListener method in my App.java 使用pom.xml和app.java的简单spring-boot应用程序显示构建失败错误 - Simple spring-boot application with pom.xml and app.java is showing build failed error Java类路径,找不到类 - Java classpath, class not found
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM