Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 08-09-2004, 07:10 PM   #1 (permalink)
Right Off the Assembly Line
 
Join Date: Mar 2004
Location: hyderabad
Posts: 25
Default help with JAVA


hey u guys,
im in a fix,m i got this problem with java..
Whenver i try to run a progrm, i get an error saying "NoClassDefFoundError", although the program is compiled well!!!

Plz help me, im running windows XP, java was runnning well before on XP, i lately am experiencing this problem,.....
__________________
Only one thing is certain -- that is, nothing is certain. If this statement is true, it is also false
---ANIRUDH
cockyrudh_2020 is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 08-09-2004, 07:26 PM   #2 (permalink)
Wise Old Owl
 
Join Date: Aug 2004
Location: New Delhi
Posts: 1,150
Default

add a variable called CLASSPATH in your local variables indicating the location of your class file and also the jre/jdk class files.
__________________
**** happens
pradeep_chauhan is offline  
Old 09-09-2004, 01:35 AM   #3 (permalink)
In The Zone
 
#/bin/sh's Avatar
 
Join Date: Apr 2004
Location: 42.65 N 73.76 W
Posts: 213
Default

means that your classpath is not set correctly. Make sure your JAVA_HOME is set up right before you run the startup scripts.
__________________
\"99 little bugs in the code, 99 bugs in the code, fix one bug, compile it again, 148 little bugs in the code. 148 little bugs in the code....\"
#/bin/sh is offline  
Old 09-09-2004, 01:36 AM   #4 (permalink)
In The Zone
 
#/bin/sh's Avatar
 
Join Date: Apr 2004
Location: 42.65 N 73.76 W
Posts: 213
Default

post you're source code,
it will help to solve you're problem & and let me know what you doing with?
__________________
\"99 little bugs in the code, 99 bugs in the code, fix one bug, compile it again, 148 little bugs in the code. 148 little bugs in the code....\"
#/bin/sh is offline  
Old 09-09-2004, 11:59 AM   #5 (permalink)
FooBar Guy
 
GNUrag's Avatar
 
Join Date: Jun 2004
Location: GNUmbai
Posts: 1,245
Default

for UNIX:
add this to your /etc/profile

CLASSPATH=/usr/jdk/jre/lib/rt.jar:.
export CLASSPATH


for WinXP,
add the path to your CLASSPATH environment variable.
CLASSPATH=C:\jdk\jre\lib\rt.jar;.


Notice the dot in the end... it refers to the class file that is in ur current directory...
__________________
- --
http://web.gnuer.org
GNUrag is offline  
Old 09-09-2004, 07:12 PM   #6 (permalink)
Right Off the Assembly Line
 
Join Date: Mar 2004
Location: hyderabad
Posts: 25
Default

well i tried everything you guys suggested, but of no use

my java folder is in D:/java
bin is in D:/java/bin

all my programs which used to compile earlier no longer work! im in a fix plz helpme
---ANIRUDH
__________________
Only one thing is certain -- that is, nothing is certain. If this statement is true, it is also false
---ANIRUDH
cockyrudh_2020 is offline  
Old 10-09-2004, 01:48 AM   #7 (permalink)
In The Zone
 
#/bin/sh's Avatar
 
Join Date: Apr 2004
Location: 42.65 N 73.76 W
Posts: 213
Default

If you can't compile, your PATH probably needs to be set.

c:/>set PATH=%PATH%;d:/java/bin

You can permanently set this by going to (WinXP) Start>Settings>System, Advanced tab, Environmental Variables
What do you get if you type in
java - version

If your system can't find this, it is a path problem. You can either set the path, or make it explicit:
d:/java/bin/javac MyClass.java //to compile
d:/java/bin/java -cp . MyClass //to run
__________________
\"99 little bugs in the code, 99 bugs in the code, fix one bug, compile it again, 148 little bugs in the code. 148 little bugs in the code....\"
#/bin/sh is offline  
Old 10-09-2004, 07:39 PM   #8 (permalink)
Right Off the Assembly Line
 
Join Date: Mar 2004
Location: hyderabad
Posts: 25
Default

well i managed to mess around and get it working,.... thanx for all the help guys!!!
--Anirudh
__________________
Only one thing is certain -- that is, nothing is certain. If this statement is true, it is also false
---ANIRUDH
cockyrudh_2020 is offline  
Old 11-09-2004, 01:04 AM   #9 (permalink)
In The Zone
 
#/bin/sh's Avatar
 
Join Date: Apr 2004
Location: 42.65 N 73.76 W
Posts: 213
Default

can you please post the full error stack you got?
with source code.
__________________
\"99 little bugs in the code, 99 bugs in the code, fix one bug, compile it again, 148 little bugs in the code. 148 little bugs in the code....\"
#/bin/sh is offline  
Old 11-09-2004, 01:06 AM   #10 (permalink)
In The Zone
 
#/bin/sh's Avatar
 
Join Date: Apr 2004
Location: 42.65 N 73.76 W
Posts: 213
Default

welcome no problem.
__________________
\"99 little bugs in the code, 99 bugs in the code, fix one bug, compile it again, 148 little bugs in the code. 148 little bugs in the code....\"
#/bin/sh is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Sujeet
- by abhidev
- by Sarath
- by Krow

Advertisement




All times are GMT +5.5. The time now is 08:27 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2