Index: applications/editors/josm/plugins/smed/src/smed/Smed.java
===================================================================
--- applications/editors/josm/plugins/smed/src/smed/Smed.java	(revision 23236)
+++ applications/editors/josm/plugins/smed/src/smed/Smed.java	(revision 23244)
@@ -8,4 +8,5 @@
 import java.net.URL;
 import java.net.URLClassLoader;
+import java.util.Arrays;
 import java.util.Enumeration;
 import java.util.List;
@@ -23,4 +24,5 @@
 import smed.plug.SmedPluginApp;
 import smed.plug.ifc.SmedPluggable;
+import smed.plug.util.JARFileFilter;
 import smed.plug.util.SmedPluginLoader;
 import smed.tabs.SmedTabAction;
@@ -39,7 +41,10 @@
         File pluginDir = Main.pref.getPluginsDirectory();
         String pluginDirName = pluginDir.getAbsolutePath();
-        File splug = new File(pluginDirName + "/splug");
-        if(!splug.exists()) splug.mkdir();
+        SmedFile splugDir = new SmedFile(pluginDirName + "/splug");
+        
+        if(!splugDir.exists()) splugDir.mkdir();
 
+        File[] jars = splugDir.listFiles(new JARFileFilter());
+        
         // build smed_ifc.jar from smed.jar
         JarEntry e = null;
@@ -49,6 +54,4 @@
         int len;
 
-        System.out.println(new java.util.Date());
-        
         try {
             JarFile file = new JarFile(pluginDirName  + "/smed.jar");
@@ -57,5 +60,4 @@
             BufferedOutputStream oos = new BufferedOutputStream( jos);
             
-            /* nicht ohne Versionierung freigeben
             // extract *.jar to splug
             Enumeration<JarEntry> ent = file.entries();
@@ -64,19 +66,22 @@
             	eName = e.getName(); 
             	if(eName.endsWith(".jar")) {
-            		FileOutputStream pfos = new FileOutputStream(pluginDirName + "/splug/" + eName);
-            		BufferedOutputStream pos = new BufferedOutputStream(pfos);
-            		inp = new BufferedInputStream(file.getInputStream( e ));
+            		if(splugDir.needUpdate(jars,eName)) {
+            			FileOutputStream pfos = new FileOutputStream(pluginDirName + "/splug/" + eName);
+            			BufferedOutputStream pos = new BufferedOutputStream(pfos);
+            			inp = new BufferedInputStream(file.getInputStream( e ));
             		
-                    while ((len = inp.read(buffer)) > 0) {
-                        pos.write(buffer, 0, len);
-                    }
+            			while ((len = inp.read(buffer)) > 0) {
+            				pos.write(buffer, 0, len);
+            			}
             		
-            		pos.flush();
-            		pos.close();
-            		inp.close();
-            		pfos.close();
+            			pos.flush();
+            			pos.close();
+            			inp.close();
+            			pfos.close();
+            		}
             	}
             }
-            */
+            
+
             
             // write smed_ifc.jar to splug
Index: applications/editors/josm/plugins/smed/src/smed/SmedFile.java
===================================================================
--- applications/editors/josm/plugins/smed/src/smed/SmedFile.java	(revision 23244)
+++ applications/editors/josm/plugins/smed/src/smed/SmedFile.java	(revision 23244)
@@ -0,0 +1,37 @@
+package smed;
+
+import java.io.File;
+
+import smed.plug.util.JARFileFilter;
+
+public class SmedFile extends File{
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+
+	public SmedFile(String pathname) {
+		super(pathname);
+	}
+
+	public boolean needUpdate(File[] jars, String name) {
+		
+		for(File j : jars) {
+			String jName = j.getName();
+			
+			if(jName.length() > 15) { // < 16 isn'nt a SmedFile
+
+				if (jName.substring(16).equals(name.substring(16))) {
+					if(jName.substring(0, 15).compareTo(name.substring(0, 15)) < 0) { // obsolet
+						j.delete();
+						return true;			
+					} else return false;	// no update needed
+				}
+			}
+		}
+
+		// nothing found -> extract
+		return true;
+	}
+}
Index: applications/editors/josm/plugins/smed/src/smed/plug/ifc/SmedPluggable.java
===================================================================
--- applications/editors/josm/plugins/smed/src/smed/plug/ifc/SmedPluggable.java	(revision 23236)
+++ applications/editors/josm/plugins/smed/src/smed/plug/ifc/SmedPluggable.java	(revision 23244)
@@ -6,11 +6,11 @@
 public interface SmedPluggable {
 
-    boolean start();
-    boolean stop();
-    String getName();
-    String getInfo();
-    JComponent getComponent();
-    
-    void setPluginManager(SmedPluginManager manager);
+	boolean start();
+	boolean stop();
+	String getName();
+	String getInfo();
+	JComponent getComponent();
+	
+	void setPluginManager(SmedPluginManager manager);
 
 }
