Hello Gary,
thank you for providing this question.
I am a seasoned Windows expert with almost a decade in usage and support experience and hope to resolve your problems quickly.
That depends a bit on how you are running java, if it is preinstalled or comes with some other package and if its jdk/jre.
Usually all it needs is to add an option when you run java.
For the standard environment its something like java -Xmx2048m
So the -Xmx parameter indicates a size and 2048m are 2gb of memory allocated to java.
Please check out the in depth guide by oracle:
https://superuser.com/questions/1400483/how-to-...
If you consider your problem solved it would be very good if you marked the answer which helped you so others can find and use this thread.
If this didn't solve your problem or you need further assistance please answer in this thread and i would be happy to help.
kind regards
F. Grobusch