Can't properly compile and run program - No Class Def Found Error


Can't properly compile and run program - No Class Def Found Error



Source code



I'd like to properly compile and run the program, but the solutions I've tried aren't working.


javac src/main/java/ReceitoDromo.java



Output


Note: ReceitoDromo.java uses unchecked or unsafe operations
Note: Recompile with -Xlint:unchecked



Exception


java src.main.java.ReceitoDromo
Error: Could not find or load main class src.main.java.ReceitoDromo





open the command line, go to the folders where your ReceitoDromo.class file is, and invoke java ReceitoDromo. What is your output?
– Daniele
Jul 1 at 17:49


ReceitoDromo.class


java ReceitoDromo




1 Answer
1



There might be some syntax error in code. Mostly it happens when you use collections without type specifiers.
eg- you have to specify
ArrayList< Integer >() for older version of java as you can't use ArrayList()<>






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

How to make file upload 'Required' in Contact Form 7?

Rothschild family

amazon EC2 - How to make wp-config.php to writable?