Having trouble running java programm
when I Type java C:\Users\and the location, I get Error: Could not find or load main class C:\Users\and the location
What do you want exactly to do ?
you have to compile first more than likely. In command prompt use javac C:\Users\Hello.java then use the java command like so java C:\Users\Hello this is an example replace with your actual location and application name respectively
I compiled it and it worked fine but when I want to run it I type java and the location but it doesn't work
when you navigate to the location there should be your .class file which shows you successfully compiled make sure when you use the java command that you dont include .java it should be java C:\Users\Hello if this stilll doesn't work your path to java might not be set correctly
Actually my path to java is correct and I tried to open the .class file with java and it still doesn't work
yeah you dont open the .class that answer below mine is incorrect, the java command is used on the .java file you just don't include. java when you run so if you have a program called hello.java you would type java hello also the prudent thing would be to ask if it has a main in your program as its not required to compile a file just to run.
Run a .class File
BMI calculator code project
How to create a border
please help me to solve it..