java - Class file don't run -


this question has answer here:

c:\users\student3>java -cp c:\users\student3 start exception in thread "main" java.lang.noclassdeffounderror: start (wrong name: wo rk/start)         @ java.lang.classloader.defineclass1(native method)         @ java.lang.classloader.defineclass(unknown source)         @ java.security.secureclassloader.defineclass(unknown source)         @ java.net.urlclassloader.defineclass(unknown source)         @ java.net.urlclassloader.access$100(unknown source)         @ java.net.urlclassloader$1.run(unknown source)         @ java.net.urlclassloader$1.run(unknown source)         @ java.security.accesscontroller.doprivileged(native method)         @ java.net.urlclassloader.findclass(unknown source)         @ java.lang.classloader.loadclass(unknown source)         @ sun.misc.launcher$appclassloader.loadclass(unknown source)         @ java.lang.classloader.loadclass(unknown source)         @ sun.launcher.launcherhelper.checkandloadmain(unknown source) 

screenshot: http://imageshack.us/photo/my-images/835/mt6a.png/ it's first run class windows, happens?

update:

exception in thread "main" java.lang.noclassdeffounderror: org/apache/poi/ss/usermodel/row so.. should create 1 hundred directories?

notice part says "wrong name: work/start". means class file found contains class called "work.start", wanted run 1 that's called "start".

you can 2 things:

  1. create directory called work , move start.class file there. run "java work.start".
  2. remove package declaration start.java , recompile.

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -