How to run compiled java code !!!
i've written one very simple java code and compiled, but when i run it gives me error as java class not found.
i've written code as:
package com.example;
publicclass nav
{
publicstaticvoid main(String args[])
{
System.out.println("Hello World");
}
}
then compiled as:
javac -d f:/ nav.java
it creates a folder named as com/example and under that nav.class has been created.
But when i try to run this nav.class file it gives me as:
Exception in thread"main" java.lang.NoClassDefFoundError: nav (wrong name: com/
example/nav)
could anyone tell how to run any compiled java source code with package....
in advance thanks....

