Использование VSCODE и получение noclassDeffounderrorJAVA

Программисты JAVA общаются здесь
Anonymous
Использование VSCODE и получение noclassDeffounderror

Сообщение Anonymous »

Я обычно использую IDE, как IntelliJ, но пытаюсь переехать в VSCODE, но я не понимаю, почему проект, над которым я работаю над IntelliJ, работает нормально, но когда я открываю этот проект в VSCODE, я получаю эту ошибку. Я посмотрел на другие ответы на эти вопросы, но все они упоминают такие вещи, как Bin, SRC и Classpath, с которыми я не очень знаком. Я полагаю, что это если вы управляете Java через CMD, но я не знаю. Как я могу это решить?package Solved_Problems;

class Problem_001_MultiplesOf3And5{

// Multiples of 3 and 5

/*
*
* If we list all the natural numbers below 10 that are multiples of 3 or 5, we
* get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the
* multiples of 3 or 5 below 1000.
*
*/

public static void main(String[] args) {

int totalsum = 0;

for (int i = 1; i < 1000; i++) {
if ((i % 3 == 0) || (i % 5 == 0))
totalsum += i;
}

System.out.println(totalsum);

}

}

< /code>

output: < /p>

Error: Could not find or load main class Problem_001_MultiplesOf3And5
Caused by: java.lang.ClassNotFoundException: Problem_001_MultiplesOf3And5

[Done] exited with code=1 in 0.835 seconds


Подробнее здесь: https://stackoverflow.com/questions/564 ... founderror

Вернуться в «JAVA»