Error in executing

Posted by Saranya.R on Stack Overflow See other posts from Stack Overflow or by Saranya.R
Published on 2010-06-16T10:07:49Z Indexed on 2010/06/16 10:12 UTC
Read the original article Hit count: 250

Filed under:
|

Hi........

I am interested in sending tweets using Java program.I wrote the following prgram.It doen't show any error in compiling.But while executing it shows

"Exception in thread "main" java.lang.NoClassDefFoundError: hi Caused by: java.lang.ClassNotFoundException: hi at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) Could not find the main class: hi. Program will exit." This is my code..

package twitter;

//import java.lang.object; import net.unto.twitter.*; import net.unto.twitter.TwitterProtos.Status; public class hi { public static void main(String args[]) {

Api api = Api.builder().username("usename").password("password").build(); api.updateStatus("This is a test message.").build().post();

} } Can anybody help me ..Pls

© Stack Overflow or respective owner

Related posts about java

Related posts about twitter