I have just purchased a new computer with windows 7 and 4GByte RAM. I have installed java.jar version 6 (as directed by osm-instructions! I have installed josm-latest.jar to C:osm\ josm-latest.jar starts and runs without any problem: i.e. as expected! I have created a batch file josm.bat in C:osm to invoke the Xmx option but it does not work and I cannot figure out why. Whats wrong? For any advice I will be very grateful asked 19 Jan '12, 17:19 dcp |
I am using this: The whole starting script:
answered 19 Jan '12, 17:32 LM_1 Wow! This is a above my level of competance! I can´t even figure out what this batch file will do!
(19 Jan '12, 17:58)
dcp
It downloads (updates) the latest or tested version if it there is one available and starts JOSM. Plus it starts tracer server, but that is really useful only in the Czech Republic.
(20 Jan '12, 10:20)
LM_1
|
LM_1 has provided an interesting, if lengthy batch file. Mine, on 64 bit Windows 7, simply reads:
Which I think is "using the full path" as he suggested: answered 19 Jan '12, 17:44 EdLoach ♦ Are you suggesting that my batch-file should be moved to to: C:WindowsSysWOW64\
(19 Jan '12, 18:06)
dcp
1
No. When you run the command java it will look for the file java.exe or java.bat in the current directory and then in the list of directories in the PATH variable. If it can not find the file it will print an error message. If you run the command C:WindowsSysWOW64java it will look for the file in *C:WindowsSysWOW64*. LM_1 is sugesting that you run start java whitch uses a different PATH, while EdLoach sugests that you use the full path. It does not matter where the batch file is located. (Moving the batch file to *C:WindowsSysWOW64* would fix the problem.)
(19 Jan '12, 20:30)
Gnonthgol ♦
I changed my josm.bat file to : C:WindowsSysWOW64java -Xmx1024m -jar C:osmjosm-latest This is what was returned: Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine I then reduced the -Xmx requirements to 512 and this functioned. But this begs the question: Why, if I buy a new computer with 6GByte of RAM, can`t I get more than 512MByte allocated. -Xmx1024m functioned on my old computer with 2GByte of RAM. Could it be that my RAM is defect?
(20 Jan '12, 06:44)
dcp
|
answered 21 May '12, 12:46 nadi106 That covers sticking Java in the path (which was the original problem) but doesn't cover 32- vs 64-bit stuff though - have a look here for a question on that and here for more detailed information. A stackoverflow question about the "heap" message (unfortunately without an answer to the "but I have 6Gb" issue) is here.
(21 May '12, 13:23)
SomeoneElse ♦
|
In answer to this question: 'But this begs the question: Why, if I buy a new computer with 6GByte of RAM, can`t I get more than 512MByte allocated. -Xmx1024m functioned on my old computer with 2GByte of RAM. Could it be that my RAM is defect?' I suspect that you need to use the 64-bit Java.exe not the 32-bit one. On my (Windows 7, 4Gb) PC 32-bit Java fails to start JOSM with 1.4Gb max allocated, but 64-bit Java has not problem with 3Gb. Your 32-bit version of Java is probably installed in somewhere like:
Your 64-bit version of Java is probably installed in somewhere like:
Try using that to start JOSM instead. answered 21 May '12, 13:41 SomeoneElse ♦ |
What is the output when you type "java -version" ?
Do you have Win7 and Java as 32bit or 64bit version?
java -version does not pass the version but replies with the same text as above i.e. `java´ is not recognised.......... I don't know how to determine whether I have 32bit or 64bit versions. I am still looking. It seems that my batch file can´t find java. I just don´t know!