File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Probs w/ recent reinstall Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Probs w/ recent reinstall" Watch "Probs w/ recent reinstall" New topic

Probs w/ recent reinstall

Linze marin

Joined: Jul 23, 2004
Posts: 12
I am writing a few java programs, trying to teach myself java.

This morning, one of the support people at work removed and reinstalled
I have not been able to get a prog. to work since.

This the error I get when trying to run at DOS:

C:\j2sdk1.4.2_06\bin\cd2>javac 14
'javac' is not recognized as an internal or external command,
operable program or batch file.

This is my classpath:

What do I need to do to get Java operational again?

Thanks in advance
[ October 14, 2004: Message edited by: Linze marin ]
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
This may help you. Take a look at this. Find the part 5 about the path variable (not classpath).
[ October 14, 2004: Message edited by: Barry Gaunt ]

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Linze marin

Joined: Jul 23, 2004
Posts: 12
I have used the path name to comile a file in a dir. path different
from j2sdk1.4.2_06\bin, but when I attempt to run it using the same path name, I get the same exception seen below. Am I missing a "class" directory?

Thanks, Linze

C:\j2sdk1.4.2_06\bin>dir Hi*
10/14/2004 12:42p 404 Hi.class
10/14/2004 12:27p 107
2 File(s) 511 bytes
0 Dir(s) 6,001,131,520 bytes free

C:\j2sdk1.4.2_06\bin>java Hi
Exception in thread "main" java.lang.NoClassDefFoundError: Hi
Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673
Try running the program using:
java -classpath . Hi

If this works, add ;. at the end of your classpath.
Linze marin

Joined: Jul 23, 2004
Posts: 12

[ October 15, 2004: Message edited by: Linze marin ]
Linze marin

Joined: Jul 23, 2004
Posts: 12
I just fixed the problem by editing the path variable. Somehow
that became corrupted.

That for your thoughtful suggestions. I learn something every day
from this forum.

I agree. Here's the link:
subject: Probs w/ recent reinstall
It's not a secret anymore!