this is my prog
class printer
{
public void print()
{
System.out.println("Hello from java");
}
}
public class app
{
public static void main(String[] args)
{
printer printer1 = new printer();
printer1.print();
}
}
when i tried to run it it didn't work....
then i entered the sdk bin path in the path(using the environmental variable setting) and also noticed that there is no CLASSPATH variable in the list!!!
any way after adding the sdk bin path it get compiled...
and generated the clases files for printer and app
but when i tried to run it with the java app command it get an error
(Exception in thread "main" java.lang.NoClassDefFoundError: C:\work\New\app)
also when i tried to place them in seperate files printer.java and app.java and compiled separatly printer.java get compiled but when tried to run app.java i got an error message
C:\work>javac app.java
app.java:1: '.' expected
import printer;
^
1 error
Please help..i will gave u more info if needed
2006-07-04
07:18:06
·
6 answers
·
asked by
Harisankar S
2
in
Computers & Internet
➔ Programming & Design