The Artima Developer Community
Sponsored Link

Java Answers Forum
java problem

4 replies on 1 page. Most recent reply: Jan 8, 2006 9:51 PM by deepika jain

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 4 replies on 1 page
albert sie

Posts: 2
Nickname: albert85
Registered: Dec, 2005

java problem Posted: Dec 23, 2005 8:23 PM
Reply to this message Reply
Advertisement
i can compile the java file successfully. but after i run it the error message:


Exception in thread "main" java.lang.NoClassDefFoundError: Welcome2

come out.
this is my sources code
someone can please help me

public class Welcome2
{
public static void main(String args[])
{
System.out.print( "welcome to");
System.out.println("Java Programming!");
}
}


Dave Hinton

Posts: 42
Nickname: catbells
Registered: Oct, 2003

Re: java problem Posted: Dec 24, 2005 6:54 AM
Reply to this message Reply
The problem is not with your source code. You are running it wrongly.

partha saradhi

Posts: 1
Nickname: parthu
Registered: Dec, 2005

Re: java problem Posted: Dec 27, 2005 2:54 AM
Reply to this message Reply
no compile or runtime errors . here class name file name must be same Ok.....

Kondwani Mkandawire

Posts: 530
Nickname: spike
Registered: Aug, 2004

Re: java problem Posted: Dec 27, 2005 3:33 AM
Reply to this message Reply
Actually you have to set the class path. Check my response to
the post that has something to do with MySQL driver or
ClassNotFound (or something to that effect - a few posts
below this one), I explain how to do this for both the Linux
and Windows platform.

deepika jain

Posts: 2
Nickname: deepikaj
Registered: Jan, 2006

Re: java problem Posted: Jan 8, 2006 9:51 PM
Reply to this message Reply
set the enviroment variable then only run the program and must also check that ur class name and the name by which u save ur file is same and also in ur cmd put the parth right.

Flat View: This topic has 4 replies on 1 page
Topic: java Previous Topic   Next Topic Topic: memory leak in Jsp and servlets

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use