NEED HELP
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
NEED HELP
When I try to compile Java i get a message saying
C:\WINDOWS\system32\javac.exe
saying "The system cannot find the file specified".
When i run the program i get
c:\sun\appserver\jdk\bin is not recognized as an internal or external command
operable program or hatch file.
how do i fix this
C:\WINDOWS\system32\javac.exe
saying "The system cannot find the file specified".
When i run the program i get
c:\sun\appserver\jdk\bin is not recognized as an internal or external command
operable program or hatch file.
how do i fix this
- talleyrand
- Posts: 624
- Joined: Mon Jul 21, 2003 6:56 pm
- Location: Kansas City, MO, USA
- Contact:
Easiest solution would be to remove all the java tools and click Configure, Tools, Add new and select Java. Failing that, post back and I'm sure you can be walked through the process.
One fairly important thing however: please be certain that you have downloaded the Java SDK from java.sun.com. The JRE allows you to run programs but you will need the SDK to compile your programs.
Best of luck.
One fairly important thing however: please be certain that you have downloaded the Java SDK from java.sun.com. The JRE allows you to run programs but you will need the SDK to compile your programs.
Best of luck.
I choose to fight with a sack of angry cats.
- talleyrand
- Posts: 624
- Joined: Mon Jul 21, 2003 6:56 pm
- Location: Kansas City, MO, USA
- Contact:
Open Textpad
* Configure
* Preferences
* Tools
If it says Java, click the X button (del key) and whoosh it's removed.
Install the java SDK. If you cannot figure this out, take a moment and read the FAQs on http://java.sun.com
At this point you are now ready to add the java tools back to TextPad.
Open Textpad
* Configure
* Preferences
* Tools
* Add -> Java SDK Commands
Voila
* Configure
* Preferences
* Tools
If it says Java, click the X button (del key) and whoosh it's removed.
Install the java SDK. If you cannot figure this out, take a moment and read the FAQs on http://java.sun.com
At this point you are now ready to add the java tools back to TextPad.
Open Textpad
* Configure
* Preferences
* Tools
* Add -> Java SDK Commands
Voila
I choose to fight with a sack of angry cats.
-
- Posts: 1
- Joined: Mon Feb 19, 2007 8:12 pm
Hi, I have used TextPad as a Java editor at school and it is GREAT. So don't be discouraged.
Installing on my home machine, I just ran into the same roadblock as you two have. It took me some time to get it right, but I have to admit that in the end I got it going by rereading the TextPad FAQ > Java > FAQ no. 4
It seems that the version of the Java Development Kit that I used (1.5.0_11) does not set a registry key that TextPad is looking for. In my case I installed the jdk1.5.0_11 (with netbeans) executable right from Sun's website.
I did go into System Properties>Advanced>Environment Vars>System Vars and added this to the end of my Path variable (this may not match your path exactly because you have to use the path to the \bin file YOUR computer -- which may vary from mine):
So now I could compile java from any directory using the command line -- e.g.,
and then
... and it worked fine. But TextPad didn't care. When I tried to use Tools>Compile Java, I got a window something to the effect of:
The value in the current version entry was "1.5" so then I navigated to
And I had to change the JavaHome variable from a value of "1" to the path to my JDK's main directory, which in my case is
NOTE: The first time I did this I messed up and used the same string used to set the path. That didn't work, but when I took off the "\bin" at the end it was fine, which to my chagrin is exactly what the FAQ says that TextPad is looking for.....
Anyway, I hope that helps. Keep trying and don't let anyone discourage you for asking good questions.
Erik
P.S. ONE MORE THING: You always edit the registry at your own risk. It's almost never a smart thing to do unless you are a real geek. Which I am not, alas. So don't do anything except the above. And before you make any changes at all, you really, really should back up the registry -- in regedit, choose file>export and find a safe place to keep your exported registry file. Then you or your geeky friend may be able to fix anything you mess up. I named today';s backup file "20070219 about to change hlm-s-js-jdk-1.5 from 1 to a path.reg" so I can figure out what I was up to. And if Java starts acting flaky, you should consider returning the registry to its previous state, even if it means TextPad is not usable.
Installing on my home machine, I just ran into the same roadblock as you two have. It took me some time to get it right, but I have to admit that in the end I got it going by rereading the TextPad FAQ > Java > FAQ no. 4
It seems that the version of the Java Development Kit that I used (1.5.0_11) does not set a registry key that TextPad is looking for. In my case I installed the jdk1.5.0_11 (with netbeans) executable right from Sun's website.
I did go into System Properties>Advanced>Environment Vars>System Vars and added this to the end of my Path variable (this may not match your path exactly because you have to use the path to the \bin file YOUR computer -- which may vary from mine):
Code: Select all
;C:\Program Files\Java\jdk1.5.0_11\bin (including the semicolon at the start to separate it from the previous code)
Code: Select all
c:\> javac Test.java
Code: Select all
c:\> java Test
So I ended up having to do what the FAQ suggested which was to open up regedit (Start>Run... and type in 'regedit' and OK) and navigate to(Title) "C:\Windows\system32\javac.exe" and (alert message) "The system cannot find the file specified."
Code: Select all
HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Development Kit\CurrentVersion
Code: Select all
HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Development Kit\1.5\JavaHome
Code: Select all
C:\Program Files\Java\jdk1.5.0_11
Anyway, I hope that helps. Keep trying and don't let anyone discourage you for asking good questions.
Erik
P.S. ONE MORE THING: You always edit the registry at your own risk. It's almost never a smart thing to do unless you are a real geek. Which I am not, alas. So don't do anything except the above. And before you make any changes at all, you really, really should back up the registry -- in regedit, choose file>export and find a safe place to keep your exported registry file. Then you or your geeky friend may be able to fix anything you mess up. I named today';s backup file "20070219 about to change hlm-s-js-jdk-1.5 from 1 to a path.reg" so I can figure out what I was up to. And if Java starts acting flaky, you should consider returning the registry to its previous state, even if it means TextPad is not usable.
- Nicholas Jordan
- Posts: 124
- Joined: Mon Dec 20, 2004 12:33 am
- Location: Central Texas ISO Latin-1
- Contact:
Re: NEED HELP
javac (dot exe) is not, or at least should not be in the windows system directory.jaynavs wrote: C:\WINDOWS\system32\javac.exe
saying "The system cannot find the file specified".
You can, just to fix what you have got [assuming your report is accurate] make a soft-link (shortcut in Win terminology) in the windows system directory that points to where javac acutally is, ... but that sort of defeats the purpose of posting - to find the answer to your question.
The correct way is to .......
Sorry, folks ....
Just give the entire path to the javac,.. yes no reg stuff for this level of question; I quit relying on the registry quite awhile back, be though it may I can install the %SystemRoot%\system32\charmap.exe by hand in the registry without getting out the licensed win disk and make file associations correctly [by hand in the registry] (if it doesn't use dde) but there is too much of windows that relies on the registry and you can inadvertenly waste your machine.