Compiling problem

Celegorm

Site Team
Staff member
Messages
11,741
Location
USA
Well, this is more/less a problem, but by posting here i know people who know waht they are doing can help me out.

I use a Java compiler called Textpad. When i try to compile (so i can test run the program), i get an error message saying "The System Cannot Find the file Specified" Up on the title bar, it paths to the C:Windows\system32\javac.exe


I use this program at school, so i looked in that location on their comptuers and that file does not exist! its not even hidden!

I have tried every possable combo of uninstalling/reinstalling both java (from sun's website) and the compiler.

any ideas on what i could do to get this to work?
 
there is a workaround for this. Whats happening is when the jdk was installed, assuming you downloaded it from https://sdlc5d.sun.com/ECom/EComActionServlet;jsessionid=2E4A43F2BCB8D91F7AFA88EB03873843
it's not putting it in the system32 folder, which would make it a generally consumable application. It's still in the java folder, so what you need to do is tweak textpad a little bit.
Steps:
1.) Open textpad ( I assume 4.1xx version)
2.) Click on configure at the top
3.) Click on preferences
4.) Click on tools
5.) Click on add
6.) Select program from the Drop Down List
7.) Navigate to the javac file located at C:\Program Files\Java\jdk1.6.0\bin\javac.exe (usually) and click open
8.) at the bottom click apply
9.) close out of the window and repeat steps 2-4
10.) now select the textpad default option of compile java
11.) copy the regulare expression field and paste it into the Javac you created

basically make sure everything but the commandName match, and then use that tool you created and problem solved.
The same thing goes for running the java application once it's compiled. Only the path would be C:\Program Files\Java\jre1.6.0\bin\java.exe Assuming you have the latest edition of the java runtime environment.
 
I followed all the steps but i dont understand step 10 -11 what does regulare expression mean?
 
in step 10, I assumed that your version of Textpad came with a default "Compile Java" option. What I was referring to was to highlight that option in the left pane of the preferences window, and copy the regular expression field(which is found towards the middle of the window under the heading: "Regular Expression to match output". If you don't have this "Compile Java" option, or you can't find what i'm referring to, this is the regular expression:
Code:
^\(\(\(.[^:]\)\|\([A-Za-z]:\)\)[^:]+\):\([0-9]+\):
You place that string under the "Regular Expression to match output" heading in the new program you added. pm me if you still have trouble getting it to work for you.
 
Back
Top Bottom