2

This is my first post here, so, please let me know if I posted this question in the wrong place or something. Thanks.

So, I recently reinstalled the Java SDK and TextPad after deciding that I wanted to get back into Java programming.

I compiled and ran a test Java code to see if everything got installed correctly. All seemed well until I happened to take a look at the folder containing my .java and .class files. I noticed that a bunch of batch files had populated that folder while I was messing around with my test code. I don't recall these appearing back when I was learning Java and using an older version of TextPad.

TextPad Batch File Spam

Is this something that TextPad does now? Is there a way to prevent this from happening? Or, I suppose a better question would be, does this happen to anyone else or is this only happening to me? If it's only happening to me, then what did I do wrong during my installation of the Java SDK and TextPad to cause this to happen?

I mean, once I exit out of TextPad, the batch files get deleted, so, it seems that they're temporary files. However, like I previously mentioned, I don't recall this happening back when I was learning Java and using an older version of TextPad, so, I would like some insight into preventing these batch files from being created every time I run a compiled Java code through TextPad, if possible. They're kind of annoying, in my opinion.


TextPad Info:

Version 6.1.3 (32-bit)

Java Info:

Version 1.7.0_09 (64-bit), Java(TM) SE Runtime Environment (build 1.7.0_09-b05), Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)

OS:

Windows 7 (64-bit)

Content of one of those batch files:

@ECHO OFF
C:
CD "\Users\<PATH of class file>"
"C:\Program Files\Java\jdk1.7.0_09\bin\java.exe" -classpath . test
PAUSE

Thanks in advance. :)

Community
  • 1
  • 1
Lunar Guy
  • 121
  • 4
  • 2
    It seems that TextPad is creating them as tools to help it execute your program from within the editor itself. – FThompson Dec 02 '12 at 00:26
  • 5
    What evil are you avoiding by using TextPad instead of Eclipse or Netbeans? – Dave Dec 02 '12 at 01:02
  • 1
    *"I don't recall these appearing back when I was learning Java and using an older version of TextPad."* I do. TextPad has always been like that, though it marks those files as temporary and gets rid of them later. But as alluded by @Dave Eclipse or Netbeans offer some huge advantages over TextPad. (I currently flit between Eclipse and TextPad - though only use TextPad for the simplest codes.) – Andrew Thompson Dec 02 '12 at 01:36
  • Actually according to the release notes of TextPad, the temporary file is deleted after 10 minutes since version 4.5 (it was 1 minute for the previous version) or when TextPad is terminated, http://www.textpad.com/pl/support/relnotes.html – RealHowTo Oct 29 '13 at 00:21

1 Answers1

0

You could create a local user that only has read permissions to the TextPad installation folder (or wherever the temp files are being created) and then run TextPad as that user.

Once you create your user, modify your TextPad shortcut target to the following:

runas /user:TextPadReadOnly "C:\path\to\TextPad.exe"

It's very possible that TextPad won't even run afterwards, but if it does it should do what you want... Short of reprogramming TextPad, I doubt there's any other way to fix it (if there's no setting to disable this behavior, which I'm assuming you've looked for).