English 中文(简体)
Windows Executable to run Java application deleted by anti virus scanner
原标题:

I built a Java application that is delivered on USB sticks. To ensure compatibility, I ship an appropriate JVM on the sticks. I made an EXE that simply invokes this JVM with the application jar.

Now the problem: some virus scanners act aggressively and just remove the executable!

I tried an exe made with a "Batch file to Executable" tool and one written myself in C (invoking ShellExecute); both versions are detected and eliminated by Norton SONAR but I can imagine other virus scanners might react similarly.

I initially opted for a windows shortcut but these don t seem to support relative paths. A batch file is not acceptable either since I don t want the command console to be shown.

最佳回答

You could try using one of the many configurable java launchers - they may be less likely to be picked up by AVs:

(full disclosure: i work on winrun4j)

问题回答

Use start/b java.exe ... in a batch file. There will be a short flicker but the window will quickly go away.

As for the virus scanner removing your file: Use a stick that has a hardware switch which can make it write protected. It s for your own safety: just because there is a virus scanner doesn t mean there is no virus. If no one can write to the stick, no one can mess with it.

If you launch your app using javaw.exe you shouldn t have an associated console window at all so that might get round the need to convert your bat file into an .exe.

You could also consider distributing your app as a Webstart app, whereby the associated jnlp file describes the minimum required version of the JVM.

Since the program won t have to change very often: Submit it as a false-positive to the AV vendors, then it will probably be white-listed quite rapidly. Or at least you might find out what it is that they find so objectionable.





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签