Java error? Maptool error? I don't know.

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
User avatar
AlterForm
Giant
Posts: 118
Joined: Wed Jul 18, 2007 2:38 pm
Location: Colorado, US

Java error? Maptool error? I don't know.

Post by AlterForm »

Whenever I try to open MapToo via the .bat files in the rar, I get a "could not create java virtual machine" error. I've already tried un- then re-installing java. No idea on that. :?

However, weirder still, if I try to open MapTool (or any of the other tools) via the .jar files, I get this:

Image

Seriously. The only one I can get to work is TokenTool via an unpacked .jar.

Ideas?

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Post by Phergus »

They aren't rar files, they are zip files.

You have to extract/expand the zip files before trying to execute the batch files. You can't use the Explorer feature to browse inside a zip file and attempt to run it from there.
The only one I can get to work is TokenTool via an unpacked .jar.
You're not supposed to unpack the jars in any case.

User avatar
AlterForm
Giant
Posts: 118
Joined: Wed Jul 18, 2007 2:38 pm
Location: Colorado, US

Post by AlterForm »

Alright, let me clarify since I messed up the file extensions.

I downloaded the zip file listed as "1.3b18" under the zip archive from the downloads page.

I unpack the zip (with winrar, if it makes any difference), and open the folder that is just created.

I double-click one of the bat files and I get a "could not create virtual machine" error. I double-click the jar file, and I get my weird error message.

The only Tool I can get to work is an unzipped download of TokenTool, which has a tokentool jar file.

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Post by Phergus »

Have you run "java -version" from the command line to verify that you're getting the java version you think you're getting?

User avatar
trevor
Codeum Arcanum (RPTools Founder)
Posts: 11311
Joined: Mon Jan 09, 2006 4:16 pm
Location: Austin, Tx
Contact:

Post by trevor »

What information do you get when you click on the "Details" button on the error dialog
Dreaming of a 1.3 release

User avatar
AlterForm
Giant
Posts: 118
Joined: Wed Jul 18, 2007 2:38 pm
Location: Colorado, US

Post by AlterForm »

@ Phergus: Yes, I have.

@ Trevor: Let's see...I'll take a screencap.

Image

And the Wrapped Exception:

Image

Also, the jar in the unzipped folder seems to work fine now, but it does run MapTool with minimum memory. Bats still don't work. :cry:

PCGen runs off Java, right? 'Cause that seems to work fine actually... I'm truly perplexed, despite my usual handiness with computers and Google. :?

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Post by Phergus »

Try extracting the MT archive using the Windows native zip support instead of WinRAR.

User avatar
AlterForm
Giant
Posts: 118
Joined: Wed Jul 18, 2007 2:38 pm
Location: Colorado, US

Post by AlterForm »

Well, I might have led us a slight goose-chase by not checking them, but the .bats that aren't the 1GB boot option seem to work fine.

[EDIT]: Checked the bats in notepad. Identical, except for what I assume is the memory allocation switch/variable.

[EDIT2]: Creating a new bat file with the same stuff and setting the memory allocation to 1024 does not work. Setting it to 512 does. More testing shall be done until I find the threshold for failure.

[EDIT3]: Failure threshold is at 930M of allocation; increasing it to 931 fails to create the java virtual machine. Is there some obscure java or windows setting that could limit the maximum allowed memory for java and/or Maptool? I feel a little bad for not knowing how to fix this...then I realize now I'll know how to fix it for someone else. :D

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Post by Phergus »

How much physical memory do you have?

User avatar
AlterForm
Giant
Posts: 118
Joined: Wed Jul 18, 2007 2:38 pm
Location: Colorado, US

Post by AlterForm »

2 Gig.

User avatar
trevor
Codeum Arcanum (RPTools Founder)
Posts: 11311
Joined: Mon Jan 09, 2006 4:16 pm
Location: Austin, Tx
Contact:

Post by trevor »

curious. Well, at least you have 930m :)
Dreaming of a 1.3 release

User avatar
AlterForm
Giant
Posts: 118
Joined: Wed Jul 18, 2007 2:38 pm
Location: Colorado, US

Post by AlterForm »

trevor wrote:curious. Well, at least you have 930m :)
Indeed. :P

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Post by Phergus »

Assuming you have Java 1.6 installed try this:

javaw -XX:DefaultMaxRAMFraction=2 -XX:+UseParallelGC -jar maptool-*.jar run

User avatar
AlterForm
Giant
Posts: 118
Joined: Wed Jul 18, 2007 2:38 pm
Location: Colorado, US

Post by AlterForm »

Copy-paste exactly like that? Assuming so, it fails again.

Also, what's it doing? I'll admit I'm not that handy with most code. :P

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Post by Phergus »

That allocates 1/2 of your physical memory size but apparently there is something about your memory setup that doesn't allow Java to get 1GB of contiguous address space.

Curious.
Last edited by Phergus on Thu Jan 10, 2008 12:30 pm, edited 1 time in total.

Post Reply

Return to “MapTool”