Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Why Forte's examples work in forte and not in JDK DOS console?

0 views
Skip to first unread message

wingle...@hotmail.com

unread,
Dec 18, 2000, 3:42:27 AM12/18/00
to
I have forte Community Edition and it has Text Editor example,
Ted.class it works when run from forte but get the following error when
run from JDK Dos console. What is wrong? Thank you ^_~
E:\java\forte4j\Development\examples\texteditor>java Ted
Exception in thread "main" java.lang.NoClassDefFoundError: Ted (wrong
name: exam
ples/texteditor/Ted)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)


Sent via Deja.com
http://www.deja.com/

Eric Kenneth Idema

unread,
Dec 18, 2000, 10:31:09 AM12/18/00
to
In comp.lang.java.programmer wingle...@hotmail.com wrote:
> I have forte Community Edition and it has Text Editor example,
> Ted.class it works when run from forte but get the following error when
> run from JDK Dos console. What is wrong? Thank you ^_~

Is the class in a package? I don't actually have forte so I can only
comment on what the error looks like. If the class is in a package
you need to use its full name when trying to run it from command line:

java examples.texteditor.Ted

And you need to be in the directory containing examples/texteditor/Ted.

HTH, Eric

Tulan W. Hu

unread,
Dec 19, 2000, 11:07:29 AM12/19/00
to
> E:\java\forte4j\Development\examples\texteditor>java Ted
1) Does the TextEditor in a package or ...?

> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
2) You might need special jar files that are included in the forte
classpath.


timbo...@my-deja.com

unread,
Dec 22, 2000, 8:24:23 PM12/22/00
to
In article <91o1bm$a...@nntpa.cb.lucent.com>,

Hi,

This sounds like a classpath problem. It looks
like the class file is not being found. Is the
current directory on the classpath?

BTW, there is a news server/mailing list for these
questions, monitored by Sun support personnel, at
news://news.netbeans.com - you may want to check
it out.

Regards,

Tim Boudreau
NetBeans - Sun Microsystems

dIon

unread,
Jan 2, 2001, 11:25:26 PM1/2/01
to
[This followup was posted to comp.lang.java.help and a copy was sent to
the cited author.]

The reason you are getting an error from the Command Prompt is that you
are not passing in the correct class.

In article <91kilj$7qq$1...@nnrp1.deja.com>, wingle...@hotmail.com
says...


> I have forte Community Edition and it has Text Editor example,
> Ted.class it works when run from forte but get the following error when
> run from JDK Dos console. What is wrong? Thank you ^_~
> E:\java\forte4j\Development\examples\texteditor>java Ted

The class Ted is in the package examples.texteditor.

so to run it you need to be in

E:\java\forte4j\Development

and run

java examples.texteditor.Ted

0 new messages