I have been programming for a while with no problems and now for some reason I have encountered a problem and I have tryed everything and it seems not work. I have a file which I compiled and afterwards I recieve the window "The system cannot find the file specified". Why is it giving me problems now and not before?
Thanks
Error message
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
System cannot find file specified...
This suggests that your system has lost the java.exe executable. I can't be sure what exactly has caused this, but you might try opening a command prompt somewhere, (NOT the %JAVA_HOME%\bin directory: Anywhere else BUT that!) and just typing:
> java
If you can't find that file, then that means 1 of two things:
1. The java.exe file in your %JAVA_HOME%\bin directory has been accidentally deleted/renamed/moved.
2. More likely, your &JAVA_HOME\bin directory is no longer in the System Path.
To determine which it is, go to %JAVA_HOME%\bin and verify that java.exe is still there.
SOLUTIONS:
1. If java.exe has been deleted, then uninstall the JDK and then re-install. You've corrupted your JDK and should just start from scratch with it.
2. If java.exe still exists, (much more likely,) go to System Properties--> Environment Variables and verify that you have a PATH system variable that includes the \bin directory. If you don't create/modify the PATH environment variable to include %JAVA_HOME%\bin. If it IS there, then I have no idea what's going on, and you'll have to give more information, most notably, the EXACT error message you're recieving.
Oh, and one more thing:
In this post, when I refer to %JAVA_HOME%, I am referring to the directory which contains the root install of your JDK, which usually looks something like:
C:\j2sdk1.4.1_01
C:\j2sdk1.4.1_02
etc, etc, etc...
So that I actually want you to be looking for the java.exe executable in:
C:\j2sdk1.41._02\bin
or something like that.
> java
If you can't find that file, then that means 1 of two things:
1. The java.exe file in your %JAVA_HOME%\bin directory has been accidentally deleted/renamed/moved.
2. More likely, your &JAVA_HOME\bin directory is no longer in the System Path.
To determine which it is, go to %JAVA_HOME%\bin and verify that java.exe is still there.
SOLUTIONS:
1. If java.exe has been deleted, then uninstall the JDK and then re-install. You've corrupted your JDK and should just start from scratch with it.
2. If java.exe still exists, (much more likely,) go to System Properties--> Environment Variables and verify that you have a PATH system variable that includes the \bin directory. If you don't create/modify the PATH environment variable to include %JAVA_HOME%\bin. If it IS there, then I have no idea what's going on, and you'll have to give more information, most notably, the EXACT error message you're recieving.
Oh, and one more thing:
In this post, when I refer to %JAVA_HOME%, I am referring to the directory which contains the root install of your JDK, which usually looks something like:
C:\j2sdk1.4.1_01
C:\j2sdk1.4.1_02
etc, etc, etc...
So that I actually want you to be looking for the java.exe executable in:
C:\j2sdk1.41._02\bin
or something like that.