I have a java application I am trying to start using YAJSW. It is just a simple “Hello World” application and I follow the instructions here: http://yajsw.sourceforge.net/#mozTocId527639
I have done the following:
-
exported my project from eclipse as a runnable JAR file.
-
I ran genconfig – no problems
-
I editted wrapper.conf and added the location of the jar file
-
ran runConsole.bat and I get this error:
java.lang.IllegalAccessException: class org.rzo.yajsw.app.WrapperJVMMain can not access a member of class xxxx with modifiers “public static”
The class it refers to is the main class, which must be public static. I am stuck! Anyone out there with advice?
I had the same problem, (running yajsw-stable-11.0 on Java 1.6.0_30-b12, Win XP Pro v 2002 SP3):
In my case the class containing the static public main method was not declared public, so it was package-private which is the default.
Public methods of package private classes are not visible by classes belonging to a different package, so this was the problem in my case. See for example https://stackoverflow.com/questions/5260467/public-methods-in-package-private-classes.
Declaring the class public as above solved the problem for me. Maybe you could post some more details about the whole problem and somebody will post a solution.
Regards
-GF