File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Question about Text pad. Hope some one can answer it Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Question about Text pad. Hope some one can answer it" Watch "Question about Text pad. Hope some one can answer it" New topic
Author

Question about Text pad. Hope some one can answer it

Shivaji Marathe
Ranch Hand

Joined: Jan 11, 2002
Posts: 203
I have been using Textpad 4.5 to write,compile and run small java proagrams for quite some time now. All of a sudden it seems that each time I run the program using the Tools/Run Application option, a .BAT file is getting created. The .bat file contents are as follows.

[B]
@ECHO OFF
D:
CD "\Download\Test\Working files\starting"
D:\JBuilder35\jdk1.2.2\bin\java.exe Test
PAUSE
[B]
Even though I have Jbuilder installed on the same PC, I don't want to use the java.exe that comes with Jbuilder. My PATH, CLASSPATH and JAVA_HOME variables do not have any reference to JBuilder. I have JDK1.3.1 installed on the PC and all the environment variables point to the JDK1.3.1 installation.

Does anyone have any idea why this is happening and how I can fix it so Textpad stops generating these mysterious .BAT files?
Thanks
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
My guess is that it is some association that JBuilder has created. I've noticed JBuilder doing such things in the past, although not with TextPad specifically.

I'm going to move this to IDEs in the hopes that someone there can shed more light on the subject.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Craig Demyanovich
Ranch Hand

Joined: Sep 25, 2000
Posts: 173
I had a similar problem, though not with TextPad. Try typing the following at a command prompt:
> java -version
Does your output show the JBuilder binaries? If it does, you probably intalled JBuilder after you already had one of the Java 2 SDK's on your machine. JBuilder simply runs a install like the one for the Java 2 SDK. Consequently, the last SDK installer to run will make that set of binaries the default, even if they're older than the previous install. So, my solution was to install JBuilder first; then, install other SDK's.
Craig
Shivaji Marathe
Ranch Hand

Joined: Jan 11, 2002
Posts: 203
If I type java-version from the command prompt it shows me the correct version of JDK ( JDK 1.3.1) which I have installed and not the Jbuilder version ( JDK1.2.2).
And I have used the same setting last week without any problems. Have not installed any new sodtware nor have made any changes to the textpad or Jbuilder configuration.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Shivaji -
Under configure, preferences, select Tools, and then run Java Application. What is the command. Unfortunately this is disabled, so you can't change it, but it should tell you where it is running from. Or, if it just says java.exe, then I think it has to do with your PATH environemt variable. When it looks for java.exe it goes through the PATH variable, if JBuilder is before the Sun JRE, then JBuilder will be used. You will need to change your PATH variable to have SUN's JRE first.
I hope that is it.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

JBuilder doesn't change the PATH though, so perhaps something else has? But you've said you have not installed anything.

A colleague of mine ran into similar trouble a few months back. It just seemed to stop working for him.

You can try removing those top three tools, and asking Textpad to re-create them.

In Configure | Preferences | Tools, simply remove the default JDK commands. Then click Apply. Then when you click the Add button, at the bottom there is an option to add "JDK commands"

This worked for him.

If not, you can add your own JDK commands
Shivaji Marathe
Ranch Hand

Joined: Jan 11, 2002
Posts: 203
Mike :
Thanks for the Tip on deleting and adding my own commands to the TOOLS menu. First I tried the default "Add JDK commands" option. But no luck. The commands used Jbuilder files even though Jbuilder is nowhere in my PATH, CLASSPATH, JAVA_HOME, J2EE_HOME etc.
So finally I just added the commands myself, selecting the appropriate java.exe and javac.exe from the JDK1.3.1 folder.
Thing seem to be working fine now.
Thanks once again
 
 
subject: Question about Text pad. Hope some one can answer it