Re: newbie: cannot execute HelloWorld
- From: heysc0tt@xxxxxxxxx
- Date: 27 Dec 2006 14:40:30 -0800
You need to move it into a folder called helloworld (i.e.
c:\helloworld\Main.class) because its in that package (package refers
to directory location) and then you can run from the folder above
helloworld using "java helloworld.Main".
Scott
On Dec 27, 12:25 pm, "R.A.M." <r_ahims...@xxxxxxxxxxxxxx> wrote:
Here source code:
package helloworld;
public class Main {
public Main() {
}
public static void main(String[] args) {
System.out.println("Hello, world!");
}
}U¿ytkownik "R.A.M." <r_ahims...@xxxxxxxxxxxxxx> napisa³ w wiadomo¶cinews:emuig9$fhr$1@xxxxxxxxxxxxxxx
Hello,
I have started learning Java. I have installed Java with NetBeans 5.0. In
NetBeans I have written Hello World application which I can run from IDE
correctly. But when I tried to run it from command prompt (> java
Main.class) I receive:
Exception in thread "main" java.lang.NoClassDefNotFoundError: Main/class
Could you explain me the problem and could you tell me how to solve it?
Thank you!
/RAM/
.
- References:
- newbie: cannot execute HelloWorld
- From: R.A.M.
- Re: newbie: cannot execute HelloWorld
- From: R.A.M.
- newbie: cannot execute HelloWorld
- Prev by Date: Re: systematic file(s) deletion
- Next by Date: Re: One for Three?
- Previous by thread: Re: newbie: cannot execute HelloWorld
- Next by thread: Java 5 annotation does not work
- Index(es):
Relevant Pages
|