import java.io.*;
import java.util.Scanner;

public class jbin
{
	public static void jarToBinary(String jar, String binary) throws IOException
	{
		try {
			File binaryFile = new File(binary);

			// Deletes file if exists.
			binaryFile.delete();

			// Creates blank file.
			binaryFile.createNewFile();
		} catch (FileNotFoundException e) {

		} catch (IOException e) {
			System.out.println("Error reading file '" + binary + "'.");
		}

		// Creates executable binary.
		try {
			byte[] buffer = new byte[(int) (new File(jar)).length()];

			FileInputStream shebangInputStream = new FileInputStream("shebang.txt");
			FileInputStream jarInputStream = new FileInputStream(jar);

			int shebangRead = 0;
			int jarRead = 0;

			while((jarRead = jarInputStream.read(buffer)) != -1 && (shebangRead = shebangInputStream.read(buffer)) != -1) {
				FileOutputStream outputStream = new FileOutputStream(binary);

        outputStream.write(buffer);
        outputStream.close();
			}

			shebangInputStream.close();
			jarInputStream.close();
		} catch (FileNotFoundException e) {
			System.out.println("Unable to open file '" + jar + "'.");
		} catch (IOException e) {
			System.out.println("Error reading file '" + jar + "'.");
		}

		// Allow execution.
		try {
			File binaryFile = new File(binary);

			binaryFile.setExecutable(true);
		} catch (SecurityException e) { // If permissions are not sufficient.
			System.out.println("Unable to set '" + binary + "' to executable.");
			System.out.println("Do this manually with: chmod +x " + binary);
		}
	}

	public static void sourceToJAR(String main)
	{

	}

	public static void main(String[] args) throws IOException, InterruptedException {
		if (args.length == 2) {
			jbin.jarToBinary(args[0], args[1]);
		}
	}
}

@@ -1596,13 +1596,780 @@
 main
-)%0A%09%7B%0A
+, String%5B%5D additional, String binary) throws IOException, InterruptedException%0A%09%7B%0A%09%09// Create JAR...%0A%0A%09%09// Create META-INF/MANIFEST.MF if it doesn't exist.%0A%09%09try %7B%0A%09%09%09File manifest = new File(%22META-INF/MANIFEST.MF%22);%0A%0A%09%09%09if (!manifest.exists()) %7B // If it doesn't exist...%0A%09%09%09%09manifest.createNewFile(); // ...create it.%0A%0A%09%09%09%09OutputStream manifestOutput = new FileOutputStream(manifest);%0A%09%09%09%09String manifestContent = %22Main-Class: %22 + main.substring(-1, 4);%0A%0A%09%09%09%09manifestOutput.write(manifestContent.getBytes());%0A%09%09%09%09manifestOutput.flush();%0A%09%09%09%09manifestOutput.close();%0A%09%09%09%7D%0A%09%09%7D catch (IOException e) %7B%0A%09%09%09System.out.println(%22Could not create manifest file for JAR.%22);%0A%09%09%7D%0A%0A%09%09try %7B%0A%09%09%09Process createJAR = Runtime.getRuntime().exec();%0A%09%09%7D catch (InterruptedException e) %7B%0A%0A%09%09%7D
 %0A%09%7D%0A

Create META-INF/MANIFEST.MF automagically.