jotajornaleiro
(usa Ubuntu)
Enviado em 05/12/2012 - 22:33h
esta e a tentativa no terminal:
jota@jota-G31T-M7:~$ cd /home/jota/NetBeansProjects/Welcome1/src/welcome1
jota@jota-G31T-M7:~/NetBeansProjects/Welcome1/src/welcome1$ java Welcome1
Exception in thread "main" java.lang.NoClassDefFoundError: Welcome1 (wrong name: welcome1/Welcome1)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: Welcome1. Program will exit.
jota@jota-G31T-M7:~/NetBeansProjects/Welcome1/src/welcome1$ javac Welcome1.java
jota@jota-G31T-M7:~/NetBeansProjects/Welcome1/src/welcome1$ java Welcome1
Exception in thread "main" java.lang.NoClassDefFoundError: Welcome1 (wrong name: welcome1/Welcome1)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: Welcome1. Program will exit.
jota@jota-G31T-M7:~/NetBeansProjects/Welcome1/src/welcome1$
e este e o codigo do programa:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package welcome1;
/**
*
* @author jota
*/
public class Welcome1 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
System.out.println("Welcome to Java Programing");
}
}
estou usando o netbeans e ele diz que tat tud ok
mas o prgrama nao executa
o que ta acontecendo?????