Exception in thread “main” java.lang.NoClassDefFoundError: (wrong name -


i want execute java in lexing folder. error wrong name this error

enter image description here

enter image description here

based on screenshot of code, need add package deceleration lexing start of source file. see creating , using packages more details

so using...

package lexing;  public class lexing {     public static void main(string args[]) {         system.out.println("hello world");     } } 

i placed in lexing directory (calling lexing.java).

then, @ command line (in directory containing lexing directory), typed:

javac lexing\*.java 

followed by

java lexing.lexing 

which output

hello world 

having said that, highly recommend making use of suitable ide


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -