WinRun4J でラップされた jar を実行すると、次のエラーが発生します。
[info] Module Name: C:\Users\User\Documents\NetBeansProjects\NETBEANS 6.9.1\Desktop_apps\Test2\src\com\service\wrapper\ServiceWrapper.exe
[info] Module INI: C:\Users\User\Documents\NetBeansProjects\NETBEANS 6.9.1\Desktop_apps\Test2\src\com\service\wrapper\ServiceWrapper.ini
[info] Module Dir: C:\Users\User\Documents\NetBeansProjects\NETBEANS 6.9.1\Desktop_apps\Test2\src\com\service\wrapper\
[info] INI Dir: C:\Users\User\Documents\NetBeansProjects\NETBEANS 6.9.1\Desktop_apps\Test2\src\com\service\wrapper\
[info] Working directory set to: C:\Users\User\Documents\NetBeansProjects\NETBEANS 6.9.1\Desktop_apps\Test2\src\com\service\wrapper
[info] Configured vm.location:
[info] Found VM: C:\Program Files (x86)\Java\jre7\bin\client\jvm.dll
[info] Expanding Classpath: C:\Users\User\Documents\NetBeansProjects\NETBEANS 6.9.1\Desktop_apps\Test2\build\classes\
[info] Expanding Classpath: C:\Users\User\Documents\NetBeansProjects\NETBEANS 6.9.1\Desktop_apps\Test2\dist\lib\WinRun4J.jar
[info] Generated Classpath: C:\Users\User\Documents\NetBeansProjects\NETBEANS 6.9.1\Desktop_apps\Test2\dist\lib\WinRun4J.jar
[info] VM Args:
[info] vmarg.0=-Djava.class.path=C:\Users\User\Documents\NetBeansProjects\NETBEANS
6.9.1\Desktop_apps\Test2\dist\lib\WinRun4J.jar
[info] Registering natives for Native class
[info] Registering natives for FFI class
[err] Could not find service class
[err] Failed to initialise service: 1
java.lang.NoClassDefFoundError: com/service/wrapper/ServiceWrapper/class
Caused by: java.lang.ClassNotFoundException: com.service.wrapper.ServiceWrapper.
class
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
これはservice.ini
私がこのラッパーのために書いたものです...
service.class=com.service.wrapper.ServiceWrapper
service.id=Service_Simulation
service.name=Windows_Java_Wrapped_Service
service.description=This is an Example for Java Service
service.startup="boot"
main.class=com.service.wrapper.ServiceWrapper
classpath.1=C:\Users\User\Documents\NetBeansProjects\NETBEANS 6.9.1\Desktop_apps\Test2\build\classes\
classpath.2=C:\Users\User\Documents\NetBeansProjects\NETBEANS 6.9.1\Desktop_apps\Test2\dist\lib\WinRun4J.jar
私は何を取りこぼしたか?