osmosis OutOfMemory: Java heap space

Hi,

I am trying to import a large area from europe.osm. To do that I executed the following command:
*“C:\Program Files (x86)\osmosis\bin\osmosis.bat” --read-xml file=“G:\Restricted\Radu\Facultate\2012-2013\Licenta\europe.osm” --bounding-box left=12.04 top=55.44 right=30.19 bottom=43.51 --write-pgsql host=“localhost” database=“eastern_europe” user=“postgres” password=“parola”
*

After almost a day of executing the following error dropped:
OutOfMemmory: Java heap space

From what I’ve seen on http://wiki.openstreetmap.org/wiki/Osmosis/Tuning a quick fix for this error is to set JAVACMD_OPTIONS to change the amount of memmory allocated (JAVACMD_OPTIONS=-Xmx2G will allocate 2 GB).

First of all I would like to know where do I have to set JAVACMD_OPTIONS. I am a Windows user. Do I have to edit osmosis.bat in bin directory?
Also setting JAVACMD_OPTIONS to 2GB will be enough for osmosis to not crush again or do I have to set other variables? I want to be sure before executing the process again because I have to wait almost a day to see any results and I will loose a lot of time if it crashes again.

Thank you,
Radu-Stefan

I cannot give yo an exact answer … and you also asked at help.osm.org

but what about googling for osmosis xmx … I got several hits where this problem is topic, and I believe someone has a solution for you.

I think no one can surely predict whethet your process will run or not …