Wouldn't it be better for you to use the main "Launcher" class, whose function is to simply send calls to the actual controller classes and use the link file as the final wrapper instead of messing with the -cp wm option?
In windows, this is surprisingly easy to do.
The "main class" does not have to be something complicated, something like
public class Launcher { public static void main(String[] args) throws Exception { if (args != null && args.length > 0) { String option= args[0]; String[] args2=new String[0]; if( args.length>1){ args2= new String[args.length-1]; System.arraycopy(args, 1, args2, 0, args2.length); } if(option.equals("a")); new ClassA().exec(args2); else if(option.equals("b")); new ClassB().exec(args2); } } }
On the side of the window of things, something like creating a link of this type is enough
javaw.exe -jar "jarfile" "a"
This is very useful for placing a link in the sendTo folder ... one bank, hidden, caused by many links that activate one of its aspects, simplifies the deployment of jar logic updates.
The actual selected files are passed as a list of lines after the parameters in the link definition.
Thus, you should not worry about the problems of the whole class.
DBZ Oct 23 '14 at 16:27 2014-10-23 16:27
source share