Question: I have built a simple GUI that takes in unorganized HTML code and organizes it...now that I have it working finally I need to learn how to distribute it. I managed to create my .jar file but when I try to run it I get "Error: could not find or failed to load main class HTMLFormatter.class"

Here's what I did:

First, I went to my "bin" folder in my project directory and copied all the applicable class files into another separate folder (cause i didn't want to accidentally mess up my original class files). In that separate folder I also created manifest.txt which contains:

```
Manifest-Version: 1.0
Main-Class: HTMLFormatter.class
Class-Path: .

```

Then I ran this command from that directory: 

```
jar cfm HTMLFormatter.jar manifest.txt ./*.class

```

This created the JAR just fine, I used winrar to peek inside and it contained all the proper class files and the manifest was in META-INF directory. Then I tried to run it, first by double clicking, though I'm not even sure if that is SUPPOSED to work...Then I tried running it via command line using this command:

```
java -jar HTMLFormatter.jar

```

Which is when I got the error message. Then I read a post from this site that implied windows sometimes uses javaw instead... so i used the same command above with javaw and it didn't give me an error, but it still didn't produce my GUI.

So, what am I missing? also when I finally figure this out, should I be able to just double-click the jar file? (windows 8.1 64bit in case it matters)

Answer: 
This is an expansion on Mohit Pandey's answer showing a full save / load example. It was tested using Python 3.6 and Numpy 1.11.3.

```
from pathlib import Path
import numpy as np
import os

p = Path('temp.npy')
with p.open('ab') as f:
    np.save(f, np.zeros(2))
    np.save(f, np.ones(2))

with p.open('rb') as f:
    fsz = os.fstat(f.fileno()).st_size
    out = np.load(f)
    while f.tell() < fsz:
        out = np.vstack((out, np.load(f)))

```

> 
> out = array([[ 0., 0.], [ 1., 1.]])
> 
> 
>
For appending data to an already existing file using numpy.save, we should use:

```
f_handle = file(filename, 'a')
numpy.save(f_handle, arr)
f_handle.close()

```

I have checked that it works in python 2.7 and numpy 1.10.4

I have adapted the code from [here](https://mail.scipy.org/pipermail/numpy-discussion/2007-November/030099.html), which talks about savetxt method.