Rune-Time Error

D

Donkano

http://img390.imageshack.us/img390/7571/errwe3.png

I compiled the program fine but when I try to execute it, I get the
error above.

Program source code:
//---------------------------------------------
package Default;

public class Test {
public static void main(String[] args) {
System.out.print("Hello.\n");
System.out.println("How are you?");
System.out.print("I\tam\twell.");
}
}
//---------------------------------------------

How come it is having these errors?
 
J

Jeffrey Schwab

Donkano said:
http://img390.imageshack.us/img390/7571/errwe3.png

I compiled the program fine but when I try to execute it, I get the
error above.

Program source code:
//---------------------------------------------
package Default;

public class Test {
public static void main(String[] args) {
System.out.print("Hello.\n");
System.out.println("How are you?");
System.out.print("I\tam\twell.");
}
}
//---------------------------------------------

How come it is having these errors?

"Test" (capitalized), not "test" lowercase. Java is case-sensitive.

The term is "run," not "rune." Rune means something else. Rune-time
was (for most of us) a long time ago.
 
R

Robert Klemme

http://img390.imageshack.us/img390/7571/errwe3.png

I compiled the program fine but when I try to execute it, I get the
error above.

Program source code:
//---------------------------------------------
package Default;

public class Test {
public static void main(String[] args) {
System.out.print("Hello.\n");
System.out.println("How are you?");
System.out.print("I\tam\twell.");
}
}
//---------------------------------------------

How come it is having these errors?

you have to properly set the classpath.

robert
 
D

Donkano

"Test" (capitalized), not "test" lowercase. Java is case-sensitive.
Ok, I will give that a try.
The term is "run," not "rune." Rune means something else. Rune-time
was (for most of us) a long time ago.
It was a typo I did and realized that I typoed just after I submitted
it. I don't know how I managed an "e" into there...

And to the 2nd poster, I did set the class path as said several times
on Google.
 
S

Simon Brooke

Donkano said:
http://img390.imageshack.us/img390/7571/errwe3.png

I compiled the program fine but when I try to execute it, I get the
error above.

Program source code:
//---------------------------------------------
package Default;

public class Test {
public static void main(String[] args) {
System.out.print("Hello.\n");
System.out.println("How are you?");
System.out.print("I\tam\twell.");
}
}
//---------------------------------------------

How come it is having these errors?

You've declared that a class called 'Test' is in a package (and hence, a
directory) called 'Default' but in fact it isn't. And, as others have
said, the class is NOT called 'test' and you need to set your classpath.
 
J

Jeffrey Schwab

Donkano said:
Ok, I will give that a try.

As Simon pointed out (and I missed), you'll also need either to remove
the package declaration, or put Test.class in an appropriate
subdirectory and run it with its full name. It will save a fair amount
of heart-ache if you use a lowercase package name, as well, e.g.
"default" instead of "Default."
It was a typo I did and realized that I typoed just after I submitted
it. I don't know how I managed an "e" into there...

Been there. I hate it when that happens. :)

Good luck.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,270
Messages
2,571,102
Members
48,773
Latest member
Kaybee

Latest Threads

Top