Search code examples
javapythonshelljythonjython-music

How Can I Use sh jython.sh -i furElise.py with Creating my Heap with Java (Shell Based Java Issues)?


I am using a 2014 book on Jython-Java-Python in regards to music and computation.

...

I am trying to use a custom java command to handle a shell script with shell but all while telling java to handle the heap at a maximum size in MB.

I understand that the other previous contents of the heap management in java is stated well on this site. I do not need really a way to handle the heap but to handle the heap while handling shell scripts in java with a command like this:

java -Xms60m sh jython.sh furElise.py

The shell script is a wrapper for handling python and java, Jython, and I am trying to make this work on a 32-bit Linux SBC all while output as sound resonates. #JythonMusic


Solution

  • So, it is b/c of Elliott Frisch's answer that I have changed up the source in the .sh file called jython.sh to account for a smaller heap size.

    I have chosen 1024 so far and things are in working order. I would have had to play with the allocated 4096 heap size which is too large for the entirety of my system plus what other "add-ons" are allocated to the heap outside of calling java via the jython.sh script.

    Now, on my BeagleBone Black Wireless thus far, I can run a vncserver to account for the #JythonMusic source working which in the end leaves my command prompt in the jython interpreter.

    Once in the jython interpreter, one would simply leave it as though one was in the python interpreter, e.g. exit().