/**
 * Copyright (C) 2013-2015 Vasilis Vryniotis <bbriniotis@datumbox.com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.datumbox;

import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.jar.Manifest;

/**
 *
 * @author Vasilis Vryniotis <bbriniotis@datumbox.com>
 */
public class Datumbox {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        String[] versionInfo = getVersionBuild();
        System.out.println("Datumbox Machine Learning Framework "+versionInfo[0]+" "+versionInfo[1]);
    }
    
    private static String[] getVersionBuild() {
        String version;
        String build;
        
        URLClassLoader cl = (URLClassLoader) Datumbox.class.getClassLoader();
        URL url = cl.findResource("META-INF/MANIFEST.MF");
        try (InputStream in = url.openStream()) {
            Manifest manifest = new Manifest(in);
            version = manifest.getMainAttributes().getValue("Implementation-Version");
            build = manifest.getMainAttributes().getValue("Implementation-Build");
        } 
        catch (IOException ex) {
            throw new RuntimeException(ex);
        }
        
        return new String[]{version, build};
    }
}
@@ -1225,16 +1225,23 @@
  version
+ = null
 ;%0A      
@@ -1254,16 +1254,23 @@
 ng build
+ = null
 ;%0A      
@@ -1405,24 +1405,53 @@
 IFEST.MF%22);%0A
+        if (url!=null) %7B%0A    
         try 
@@ -1500,16 +1500,20 @@
         
+    
 Manifest
@@ -1542,16 +1542,20 @@
 st(in);%0A
+    
         
@@ -1645,16 +1645,20 @@
         
+    
 build = 
@@ -1732,11 +1732,19 @@
     
+   
+ 
 %7D %0A
+    
     
@@ -1784,16 +1784,20 @@
         
+  
+  
 throw ne
@@ -1824,24 +1824,28 @@
 x);%0A        
+    
 %7D%0A        %0A 
@@ -1834,32 +1834,33 @@
       %7D%0A        
+%7D
 %0A        return 

fix null exception in main