Index: applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsidePlugin.java
===================================================================
--- applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsidePlugin.java	(revision 35978)
+++ applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsidePlugin.java	(revision 36065)
@@ -36,12 +36,4 @@
   private static final StreetsideWalkAction WALK_ACTION = new StreetsideWalkAction();
 
-  static {
-      MainMenu.add(MainApplication.getMenu().fileMenu, new StreetsideExportAction(), false, 14);
-      MainMenu.add(MainApplication.getMenu().imagerySubMenu, new StreetsideDownloadAction(), false);
-      MainMenu.add(MainApplication.getMenu().viewMenu, ZOOM_ACTION, false, 15);
-      MainMenu.add(MainApplication.getMenu().fileMenu, new StreetsideDownloadViewAction(), false, 14);
-      MainMenu.add(MainApplication.getMenu().moreToolsMenu, WALK_ACTION, false);
-  }
-
   /**
    * Main constructor.
@@ -56,4 +48,9 @@
       StreetsideUser.setTokenValid(false);
     }
+    MainMenu.add(MainApplication.getMenu().fileMenu, new StreetsideExportAction(), false, 14);
+    MainMenu.add(MainApplication.getMenu().imagerySubMenu, new StreetsideDownloadAction(), false);
+    MainMenu.add(MainApplication.getMenu().viewMenu, ZOOM_ACTION, false, 15);
+    MainMenu.add(MainApplication.getMenu().fileMenu, new StreetsideDownloadViewAction(), false, 14);
+    MainMenu.add(MainApplication.getMenu().moreToolsMenu, WALK_ACTION, false);
   }
 
Index: applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/cubemap/CubemapBuilder.java
===================================================================
--- applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/cubemap/CubemapBuilder.java	(revision 35978)
+++ applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/cubemap/CubemapBuilder.java	(revision 36065)
@@ -24,4 +24,5 @@
 import org.openstreetmap.josm.plugins.streetside.gui.StreetsideViewerDialog;
 import org.openstreetmap.josm.plugins.streetside.gui.imageinfo.StreetsideViewerPanel;
+import org.openstreetmap.josm.plugins.streetside.gui.imageinfo.ThreeSixtyDegreeViewerPanel;
 import org.openstreetmap.josm.plugins.streetside.utils.GraphicsUtils;
 import org.openstreetmap.josm.plugins.streetside.utils.StreetsideProperties;
@@ -115,8 +116,7 @@
 
 	public void downloadCubemapImages(String imageId) {
-    if(StreetsideViewerPanel.getThreeSixtyDegreeViewerPanel().getScene() != StreetsideViewerPanel.getThreeSixtyDegreeViewerPanel().getLoadingScene()) {
-      StreetsideViewerPanel.getThreeSixtyDegreeViewerPanel().setScene(
-  	      StreetsideViewerPanel.getThreeSixtyDegreeViewerPanel().getLoadingScene()
-  	  );
+      ThreeSixtyDegreeViewerPanel panel360 = StreetsideViewerPanel.getThreeSixtyDegreeViewerPanel();
+      if (panel360 != null && panel360.getScene() != panel360.getLoadingScene()) {
+        panel360.setScene(panel360.getLoadingScene());
 	  }
 
Index: applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/cubemap/CubemapUtils.java
===================================================================
--- applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/cubemap/CubemapUtils.java	(revision 35978)
+++ applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/cubemap/CubemapUtils.java	(revision 36065)
Index: applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/gui/imageinfo/StreetsideViewerPanel.java
===================================================================
--- applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/gui/imageinfo/StreetsideViewerPanel.java	(revision 35978)
+++ applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/gui/imageinfo/StreetsideViewerPanel.java	(revision 36065)
@@ -3,4 +3,5 @@
 
 import java.awt.BorderLayout;
+import java.awt.GraphicsEnvironment;
 import java.text.MessageFormat;
 
@@ -55,7 +56,7 @@
 		threeSixtyDegreeViewerPanel = new ThreeSixtyDegreeViewerPanel();
 
-		GraphicsUtils.PlatformHelper.run(() -> {
-	    	threeSixtyDegreeViewerPanel.initialize();
-		});
+    if (!GraphicsEnvironment.isHeadless()) {
+      GraphicsUtils.PlatformHelper.run(threeSixtyDegreeViewerPanel::initialize);
+    }
 
 		add(threeSixtyDegreeViewerPanel, BorderLayout.CENTER);
