08-09-2004, 07:10 PM
|
#1 (permalink)
|
|
Right Off the Assembly Line
Join Date: Mar 2004
Location: hyderabad
Posts: 25
|
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
|
|
|
|
Advertisements. Register and be a member of the community to get rid of them.
|
|
Advertisement
|
|
08-09-2004, 07:26 PM
|
#2 (permalink)
|
|
Wise Old Owl
Join Date: Aug 2004
Location: New Delhi
Posts: 1,150
|
add a variable called CLASSPATH in your local variables indicating the location of your class file and also the jre/jdk class files.
__________________
**** happens
|
|
|
09-09-2004, 01:35 AM
|
#3 (permalink)
|
|
In The Zone
Join Date: Apr 2004
Location: 42.65 N 73.76 W
Posts: 213
|
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....\"
|
|
|
09-09-2004, 01:36 AM
|
#4 (permalink)
|
|
In The Zone
Join Date: Apr 2004
Location: 42.65 N 73.76 W
Posts: 213
|
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....\"
|
|
|
09-09-2004, 11:59 AM
|
#5 (permalink)
|
|
FooBar Guy
Join Date: Jun 2004
Location: GNUmbai
Posts: 1,245
|
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...
|
|
|
09-09-2004, 07:12 PM
|
#6 (permalink)
|
|
Right Off the Assembly Line
Join Date: Mar 2004
Location: hyderabad
Posts: 25
|
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
|
|
|
10-09-2004, 01:48 AM
|
#7 (permalink)
|
|
In The Zone
Join Date: Apr 2004
Location: 42.65 N 73.76 W
Posts: 213
|
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....\"
|
|
|
10-09-2004, 07:39 PM
|
#8 (permalink)
|
|
Right Off the Assembly Line
Join Date: Mar 2004
Location: hyderabad
Posts: 25
|
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
|
|
|
11-09-2004, 01:04 AM
|
#9 (permalink)
|
|
In The Zone
Join Date: Apr 2004
Location: 42.65 N 73.76 W
Posts: 213
|
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....\"
|
|
|
11-09-2004, 01:06 AM
|
#10 (permalink)
|
|
In The Zone
Join Date: Apr 2004
Location: 42.65 N 73.76 W
Posts: 213
|
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....\"
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|