The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
September 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Package not tracable at run time.

Posted by Samant S. on September 03, 2000 at 7:49 AM

Please Help. I am exhausted
----------------------------
path=%PATH%;c:\jdk\bin;
Environmantal variable SET CLASSPATH=.;c:;

c:\>java -version
java version"1.2"
classic VM(build JDK 1.2-v, native threads)


package com.sss.frm;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
class Slate extends Jframe{.................................}

c:\com\sss\frm> javac Myframe.java
(my compiled class is in dir c:\com\sss\frm)

c:\> java Slate
Exception in thread "main" java.langNoClassDefFoundError: Slate


c:\com\sss\frm>java Slate
Exception in thread "main" java.langNoClassDefFoundError(wrong name: com/sss/frm/Slate)
at java.lang.ClassLoader.defineClass0(Native Method);
at java.lang.ClassLoader.defineClass(ClassLoader.java:403)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:101)
..........................................................................
..........................................................................


If the package definition is made into a comment (blocked) and then compiled.
The class executes as desired in its own directory.

I cannot gather where I am erring.

Yours samant S.



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us