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: 
I made a library to create Numpy `.npy` files that are larger than the main memory of the machine by appending on the zero axis. The file can then be read with `mmap_mode="r"`.

<https://pypi.org/project/npy-append-array>

Installation
============

`conda install -c conda-forge npy-append-array`

or

`pip install npy-append-array`

Example
=======

```py
from npy_append_array import NpyAppendArray
import numpy as np

arr1 = np.array([[1,2],[3,4]])
arr2 = np.array([[1,2],[3,4],[5,6]])

filename = 'out.npy'

with NpyAppendArray(filename) as npaa:
    npaa.append(arr1)
    npaa.append(arr2)
    npaa.append(arr2)

data = np.load(filename, mmap_mode="r")

print(data)

```

Implementation Details
======================

Appending to an array created by np.save might be possible under certain circumstances, since the .npy total header byte count is required to be evenly divisible by 64. Thus, there might be some spare space to grow the shape entry in the array descriptor. However, this is not guaranteed and might randomly fail. Initialize the array with NpyAppendArray(filename) directly (see above) so the header will be created with 64 byte of spare header space for growth.

Will 64 byte extra header space cover my needs?
-----------------------------------------------

It allows for up to 10^64 >= 2^212 array entries or data bits. Indeed, this is less than the number of atoms in the universe. However, fully populating such an array, due to limits imposed by quantum mechanics, would require more energy than would be needed to boil the oceans, compare

<https://hbfs.wordpress.com/2009/02/10/to-boil-the-oceans>

Therefore, a wide range of use cases should be coverable with this approach.
you can try something like reading the file then add new data 

```
import numpy as np
import os.path

x = np.arange(10) #[0 1 2 3 4 5 6 7 8 9]

y = np.load("save.npy") if os.path.isfile("save.npy") else [] #get data if exist
np.save("save.npy",np.append(y,x)) #save the new

```

after 2 operation:

```
print(np.load("save.npy")) #[0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9]

```