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. :)

4

1 回答 1

0

您可以创建一个仅对 TextPad 安装文件夹(或正在创建临时文件的位置)具有读取权限的本地用户,然后以该用户身份运行 TextPad。

创建用户后,将 TextPad 快捷方式目标修改为以下内容:

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

TextPad 很可能之后甚至不会运行,但如果它运行它应该做你想要的......除了重新编程 TextPad,我怀疑还有其他方法可以解决它(如果没有设置来禁用此行为,这我假设你已经寻找)。

于 2013-10-28T20:46:33.890 回答