JavaSvc Released – December 3, 2011

JavaSvc is a native C++ Windows service for hosting a Java class/application in a Windows service context.  JavaSvc uses JNI to host a Java VM and to provide the Windows service context for the Java application.   JavaSvc is completely configurable via a .INI file to provide drag/drop installation.   Sample .INI configurations for Minecraft and CraftBukkit are provided.

Changes for

Added additional support for separate class for a shutdown plugin, required for
Bukkit plugins with Minecraft.

Added support for context class loaders — and will enumerate threads looking for
the specified class if the global FindClass() fails. MD5: 22fbae2a2f0339e33095e7c45c02f972

5 thoughts on “JavaSvc Released

  1. This works great except when I reboot my Machine. The service starts, but the server does not start on system reboot. I have to manually stop the service, then restart it and it works fine.

    I look at the error log for JavaSvc and it had this:

    Entering JavaShutdown
    Shutdown method was not found for net/minecraft/server/MinecraftServer, terminating thread (not a clean shutdown)
    Exiting JavaShutdown
    Entering JavaMain

    Any help would be appreciated

  2. Hi, I managed to get this working easily on Windows 2008 R2, both for a MineCraft and a CraftBukkit server. I really like the functionality – a really neat way to run a Java prog as a service!

    The only issues I have are:

    1. When I stop the service it doesn’t shut down either MineCraft or CraftBucket cleanly, reporting “Shutdown method (shutdown) was not found for org/bukkit/craftbukkit/Main, terminating thread (not a clean shutdown)” in the JavaSvc.log file. Does anyone know which class and method I should call for shutdown?

    2. I have added some mods to the CraftBukkit server. I see this latest build has the ability to call a shutdown plugin. Would anyone know where I can get one? (admin, did you roll youir own?)

    Many thanks


  3. Your org.woodruffs.CraftBukkit.ShutdownServer-1.0.0.jar did not compile properly.

    Additionally, I saw your code up on github… you should be coding against Bukkit, not CraftBukkit. You can call Bukkit.getServer().shutdown(); Was there a reason you targeted CraftServer directly?

    Also, can you not send “stop” text to the console through the standard input stream somehow?

    Lastly, do you plan on releasing the JavaSrc.exe code openly? It’d be really nice to assure myself nothing shifty is going on in there.

    Thanks for the support!

  4. I have tried using our solution for a minecraft service on the old Windows Home Server and I can’t get it to work. The service starts and stops every time without any indication of what went wrong. Is there some kind of log I can turn on? I have tried starting the minecraft_server.jar in a bat file with the same options as the service and it works just fine.
    Please help


    • Where did you copy the JavaSvc.exe file to? The JavaSvc.ini should also be in the same directory as JavaSvc.exe when you run “JavaSvc /register”. After registering, the JavaSvc.log file will be found in the specified working directory in JavaSvc.ini such as “C:\MineCraft”.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="">