cd i1
java po
Exception in thread "main" java.lang.NoClassDefFoundError: po (wrong name:
i1/po
)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:509)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
3)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:246)
at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
Can someon tellmi what is the problem?
Thanks in advanced
Igor
--
______
/__ _\
\/_/\ \/ __ ___ _ __
\ \ \ /'_ `\ / __`\/\`'__\
_\ __/\ \L\ \/\ \L\ \ \ \/
/_____\ ____ \ ____/\ _\
\/_____/\/___L\ \/___/ \/_/
/____/
_/__/
Your friendly Java runtime already did: class "po" not found, name
was "il/po".
The way Java packages work you, classes need to be in directories off
the CLASSPATH according to their packages. So assuming the usual case
where the CLASSPATH includes the current directory, you would need to
put the po class in an il subdirectory. Then run:
java il.po
where java will look in the il subdirectory, find po.class, and
execute it happily.
Unti you get comfortable with Java you may want to remove the package
declaration from the .java source file. It should then work as you
originally expected it to.
Cheers,
Chris
Cheers,
Chris
That would be "Until you get comfortable... ".
Note to self: Ignore button on spell-checker should not be a reflex.
Chris
If file is po.java I think U have to compile in JavaCode before launching it
...
$ javac i1/po.java
$ java i1/Po
NB ... Usually po is Po, note the capital letter!! cos it's in syntax rules
for Java, class name as to be with capital letter Uppercase, so it create a
Po.class U can launch with java ....
Hi, Grava