/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package exploitpack;

import java.awt.Desktop;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;

/**
 *
 * @author jsacco
 */
public class ExploitPack {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Path path = Paths.get("./exploits/");
        if (System.getProperty("java.version").startsWith("1.8")) {
            if (Files.exists(path)) {
                SplashScreen.main(null);
            } else {
                JOptionPane.showMessageDialog(null, "Sorry. Could not found Exploit Folder\nTry from console: \"java -jar ExploitPack.jar\"", "Exploit Pack says:", JOptionPane.ERROR_MESSAGE);
            }
        } else {
            JOptionPane.showMessageDialog(null, "Sorry. Please update to JAVA 8", "Exploit Pack says:", JOptionPane.ERROR_MESSAGE);
            String url = "http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html";
            try {
                Desktop.getDesktop().browse(java.net.URI.create(url));
            } catch (IOException ex) {
                Logger.getLogger(MainFrame.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }
}
