package org.helioviewer.jhv.launcher;

import java.awt.EventQueue;

import org.helioviewer.jhv.JavaHelioViewer;

/**
 * Class for launching jhv with several plugins added.
 *
 * @author Bram.Bourgoignie (Bram.Bourgoignie@oma.be)
 *
 */
public class SWHVLauncher {

    public static void main(String[] args) {
        System.out.println("================================================================");
        System.out.println("JHelioviewer developer version with external plugin compiled-in.");
        System.out.println("================================================================\n\n");

        //String[] args2 = Arrays.copyOf(args, args.length + 4);
        /*
         * args2[args2.length - 2] = "--deactivate-plugin"; args2[args2.length -
         * 1] = "SWEKPlugin.jar"; args2[args2.length - 4] =
         * "--deactivate-plugin"; args2[args2.length - 3] = "EVEPlugin.jar";
         */
        JavaHelioViewer.main(args);//, new SWEKPlugin(false));

        EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                //PluginManager.getSingletonInstance().addPlugin(EVEPlugin.class.getClassLoader(), new EVEPlugin(), null);
                //PluginManager.getSingletonInstance().addPlugin(SWHVHEKPlugin.class.getClassLoader(), new SWHVHEKPlugin(), null);
            }
        });
    }

}

@@ -104,16 +104,249 @@
 oViewer;
+%0Aimport org.helioviewer.jhv.plugins.swek.SWEKPlugin;%0Aimport org.helioviewer.jhv.plugins.swhvhekplugin.SWHVHEKPlugin;%0Aimport org.helioviewer.plugins.eveplugin.EVEPlugin;%0Aimport org.helioviewer.viewmodelplugin.controller.PluginManager;
 %0A%0A/**%0A *
@@ -837,18 +837,16 @@
         
-//
 String%5B%5D
@@ -858,90 +858,78 @@
 2 = 
-Arrays.copyOf(args, args.length + 4);%0A        /*%0A  
+new String%5B7%5D;%0A%0A        args2%5B0%5D = %22--remote-plugins%22;%0A
        
-*
  args2%5B
-args2.length - 2
+1
 %5D = 
@@ -954,39 +954,17 @@
 in%22;
- args2%5Bargs2.length -%0A 
+%0A
         
 * 1%5D
@@ -963,11 +963,15 @@
     
-* 1
+args2%5B2
 %5D = 
@@ -991,99 +991,156 @@
 ar%22;
- args2%5Bargs2.length - 4%5D =%0A         * %22--deactivate-plugin%22; args2%5Bargs2.length - 3%5D = %22EVE
+%0A        args2%5B3%5D = %22--deactivate-plugin%22;%0A        args2%5B4%5D = %22EVEPlugin.jar%22;%0A        args2%5B5%5D = %22--deactivate-plugin%22;%0A        args2%5B6%5D = %22SWHVHEK
 Plug
@@ -1152,19 +1152,8 @@
 r%22;%0A
-         */
 %0A   
@@ -1188,35 +1188,8 @@
 gs);
-//, new SWEKPlugin(false));
 %0A%0A  
@@ -1296,34 +1296,32 @@
                 
-//
 PluginManager.ge
@@ -1429,10 +1429,136 @@
     
-//
+PluginManager.getSingletonInstance().addPlugin(SWEKPlugin.class.getClassLoader(), new SWEKPlugin(false), null);%0A                
 Plug

Fix the launcher