jdk

Using the Java SDK with TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
matt

jdk

Post by matt »

need to compile java programs and run them in textpad 4.5
where is jdk or javac.exe
Irina

Re: jdk

Post by Irina »

go to http://java.sun.com/j2se/1.4/download.html and click download under "SDK" for Windows (all languages, including English).
Install this package and then go in TextPad and click Configure->Preferences->Tools->Add->Program. Search on your computer exe for the installed j2sdk (that's what now passes for jdk). Then you can load the code, and in Tools click Compile, Run etc. Works perfectly
Good luck,
Irina
Annie Chen

Re: jdk

Post by Annie Chen »

Hi,

I follow the instructions, but still can't compile my Java coding, but can run it. The error msg is : The system cannot find the file specified.

Can you help me? What should I do???

Thanks a lot!


Annie Chen
Ed Frost

Re: jdk

Post by Ed Frost »

The default location for javac.exe is the .\bin folder located in your installation directory.

An easy way to add the compile and run commands for Java is to go to:
Configure --> Preferences --> Tools --> Add ... then click on JDK commands
This will populate the list box with compile and run commands. Click on apply and test it out.

Assuming that you've done this already (I just wanted to be thorough), then there may be something wrong with your class path in your autoexec.bat

Solution:
You will need to open autoexec.bat located on the root of your hard drive. Modify (or create) the classpath as follows:
CLASSPATH=.;C:\j2sdk1.4.0_01\bin
Be sure not to use spaces. The paths are seperated by semicolons. In this example, if I were to compile my source code via textpad, the current directory would be checked (see the period before the first semicolon); then it would search C:\j2sdk1.4.0_01\bin -- where my compiler (javac) is located. Be sure to replace "C:\j2sdk1.4.0_01\bin" if your installation folder differs from the default.

Hope that helped. Good luck!
1212

Re: jdk

Post by 1212 »

121
Post Reply