User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Java section within the Software Development category of DaniWeb, a massive community of 397,834 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,519 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Java advertiser: Lunarpages Java Web Hosting
Views: 659 | Replies: 1
Reply
Join Date: Jun 2006
Posts: 11
Reputation: Cyrus_DB is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
Cyrus_DB Cyrus_DB is offline Offline
Newbie Poster

Help Help............

  #1  
Aug 19th, 2006
I'm a beginner in JAVA and I'm facing a problem in executing a sample program.Let me explain it step by step:

1. The following program was written thru a notepad and then saved as Sample.java:

class Sample
{
public static void main(String args[])
{
System.out.println("Hello World!!!");
}
}

2. The above program is then compiled by rhe following command:

javac Sample.java

Successful compilation: a .CLASS file named as Sample.class was generated.

3.The following command was implemented for execution:

java Sample

An error message appeared:

Exception in thread 'main':java.lang.NoClassDef Found.Errorample

PLEASE HELP...........
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2004
Location: H4x0rville
Posts: 2,105
Reputation: server_crash is on a distinguished road 
Rep Power: 9
Solved Threads: 18
server_crash's Avatar
server_crash server_crash is offline Offline
Postaholic

Re: Help............

  #2  
Aug 20th, 2006
Ohh, you have an environment variable issue. Check the java.sun site to get the latest info on how to correctly set your variables.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Java Marketplace
Thread Tools Display Modes

Other Threads in the Java Forum

All times are GMT -4. The time now is 7:25 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC