Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Probs w/ recent reinstall

 
Linze marin
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am writing a few java programs, trying to teach myself java.

This morning, one of the support people at work removed and reinstalled
java.
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 say.java 14
'javac' is not recognized as an internal or external command,
operable program or batch file.


This is my classpath:
.;C:\j2sdk1.4.2_06\bin

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

Thanks in advance
Linze
[ October 14, 2004: Message edited by: Linze marin ]
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Linze marin
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 Hi.java
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
Posts: 703
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try running the program using:
java -classpath . Hi

If this works, add ;. at the end of your classpath.
 
Linze marin
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

[ October 15, 2004: Message edited by: Linze marin ]
 
Linze marin
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Linze
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic