1

Does anyone know how to get the WinRun4J service example (ServiceTest class that is distributed with the software) to run? I'm on a Windows 7 box, 64 bit, and have the Java 7 JDK and JRE installed.

I performed the following:

  1. Copied WinRun4J64c.exe to C:\test, renamed it service64.exe
  2. Copied service.ini to C:\test, renamed it service64.ini
  3. Finally, I copied WinRun4JTest.jar to C:\test.

First off, you have to run a command prompt as Administrator, otherwise you can't register the service. So in a command prompt, opened as Administrator, I entered the command:

C:\Test>service64.exe --WinRun4J:RegisterService

So far so good. But when I go to the Windows services panel to start the service, I get the error:

"Error 1053: service did not respond ... in a timely fashion"

Any ideas?

Thanks

Leigh
  • 28,765
  • 10
  • 55
  • 103
Steven Solomon
  • 301
  • 1
  • 3
  • 14

4 Answers4

5

I had the same problem. You need to also copy WinRun4j.jar to the directory as well or somewhere where it can be found in the classpath.

user1332177
  • 71
  • 1
  • 2
  • While true, that was [already mentioned .. over two months ago](http://stackoverflow.com/a/18186895/104223). No need to repost the same answer twice. When you gain sufficient reputation, you can [leave comments](http://stackoverflow.com/help/privileges/comment) beneath any post. – Leigh Oct 13 '13 at 23:15
  • 5
    He meant.. WinRun4J.jar not WinRun4JTest.jar.. so its a different and useful answer.. – VJ. Mar 25 '14 at 07:11
3

As far as I have understood that you may have forgotten to copy WinRun4JTest.jar to the C:\test.

Leigh
  • 28,765
  • 10
  • 55
  • 103
murat
  • 31
  • 2
0

You may also want to check that you have the appropriate java JRE installed for the 32 and/or 64 bit version of WinRun4J.

A quick way to find this out is to enable logging by adding the following to service.ini:

log=C:/log.txt log.overwrite=true

And the log should note if your issue is JVM related.

gps
  • 317
  • 5
  • 10
0

Did you set JAVA_HOME? I was having the same problem and that solved my issue.