I have created a classe that I need to execute from the Windows cmd, but there is no way to execute it. I have updated java, I have tried a thousand different commands, but whatever happens, the error is always the same:
Error: the main class "name of the classe" was not found or loaded
Basically what I have to do is put java nameclass parameter (in the case of my code the name of a file). In case it helps I put the beginning of the code below:
package dam_m06b0_eac1;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
/**
*
* @author theda
*/
public class VeureInfo {
public static File nomDirectoriFitxer = null;
public static void main(String[] args) {
The complete path where the class is located is the following:
C: \ Users \ theda \ OneDrive \ Documents \ NetBeansProjects \ DAM_M06B0_EAC1 \ src \ dam_m06b0_eac1 \ VeureInfo.java
I put an image of various commands that I have been testing (of so many others). I have tried both with -classpath and without:
I have even tried to try to run another different class and it jumps the same error, so I guess I'm doing something wrong when using the command.