intellij idea - Hello World throwing error in Java -
from understand, intellij trying run program test file created first. how can fix this?
i'm trying run simple piece of code feel java. i'm not sure error means
> exception in thread "main" java.lang.classnotfoundexception: test @ > java.net.urlclassloader.findclass(urlclassloader.java:381) @ > java.lang.classloader.loadclass(classloader.java:424) @ > sun.misc.launcher$appclassloader.loadclass(launcher.java:331) @ > java.lang.classloader.loadclass(classloader.java:357) @ > java.lang.class.forname0(native method) @ > java.lang.class.forname(class.java:264) @ > com.intellij.rt.execution.application.appmain.main(appmain.java:122)
this code
public class age { public static void main(string[] args){ system.out.println("hey hey"); } }
right click , run age.main(). use this screenshot building , running java application
also please note:
the public class name should name of source file should appended .java @ end. example : class name . public class employee{} source file should employee.java.
Comments
Post a Comment