File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Can anyone solve this error and give a suggestion foe the following : Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Can anyone solve this error and give a suggestion foe the following :" Watch "Can anyone solve this error and give a suggestion foe the following :" New topic
Author

Can anyone solve this error and give a suggestion foe the following :

Manoj Ruban
Greenhorn

Joined: Mar 12, 2011
Posts: 2
here instead of using netbeans to execute all programs can't i use Command prompt for the execution of the program. i have already learned java but not so depth here this is something i can't understand at all i further don't know what exactly to do can you tell what to do to execute the program here i got just an empty applet window no any components in it after the code has been executed.
as well it displays this error message

i tried almost all the way i knew but nothing worked to me so can anyone give the correct code of the following code snippet
and moreover i tried to execute it by using command prompt



i think you may need some files came along with this i can't attach them here so by following this link you can download all the files that required to execute this program

IN THIS LINK Take a look at " S " Section and download the "SplitPaneDemo" files.

http://download.oracle.com/javase/tutorial/uiswing/components/splitpane.html

ERROR MESSAGE

C:\tt>Appletviewer SplitPaneDemo.java

java.lang.NoClassDefFoundError: SplitPaneDemo (wrong name: components/SplitPaneD
emo)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java :620)
at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:12
4)
at sun.applet.AppletClassLoader.findClass(AppletClass Loader.java:178)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 06)
at sun.applet.AppletClassLoader.loadClass(AppletClass Loader.java:127)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 51)
at sun.applet.AppletClassLoader.loadCode(AppletClassL oader.java:618)
at sun.applet.AppletPanel.createApplet(AppletPanel.ja va:778)
at sun.applet.AppletPanel.runLoader(AppletPanel.java: 707)
at sun.applet.AppletPanel.run(AppletPanel.java:361)
at java.lang.Thread.run(Thread.java:619)

here is the code
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18761
    
  40

Manoj Ruban wrote:
java.lang.NoClassDefFoundError: SplitPaneDemo (wrong name: components/SplitPaneD
emo)


This is caused when you have a class name mismatch -- how you compiled it is not how you are running it.

Check how you are running it in your html. You either have it in a different package, forgot to put the class files into the components package, or didn't specify it as part of the class to run.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4531
    
    5

Please BeForthrightWhenCrossPostingToOtherSites
http://www.java-forums.org/awt-swing/40381-can-anyone-say-how-i-fix-error-im-beginner.html


luck, db
There are no new questions, but there may be new answers.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can anyone solve this error and give a suggestion foe the following :