.Bat and Vista x64

Articles on how to do things in MapTool (answers only here -- questions should stay in the main MT forum)

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

Forum rules
Please discuss all HOWTO topics in the main forum. They will be moved here by a moderator when appropriate.
dorpond
RPTools Team
Posts: 5534
Joined: Thu Jun 01, 2006 2:05 pm
Location: Buffalo, NY

Post by dorpond »

Cweord wrote:
CJack42 wrote:Copy (not drag) the javaw.exe file into the maptools program directory (what I did). The .bat file should run as normal.
That worked, I'm annoyed I didn't think of it my self . . . .
I don't think that is a good solution at all. It is obvious that your Java path is screwed up.

You never did the most important test: "Also, go to a command prompt - type in Java -version" but before you should do this, you need to get rid of the copied Javaw in your maptool folder (basically put it all back to normal before doing the test).

You should also look where your latest Java is installed - is it in the x86 program files folder? Is that where the path is pointing? That is where it should be pointing and should reside. YOu may want to try to uninstall previous versions of Java and reinstall the latest - maybe the older versions put Java in Program Files instead of the X86 sesction where it should be.
How to use my bundled artwork (MT1.3B60+): http://forums.rptools.net/viewtopic.php?f=8&t=11759

Cweord
Great Wyrm
Posts: 1343
Joined: Sun Aug 12, 2007 10:49 am
Location: Midsomer Norton, (Near Bath), UK
Contact:

Post by Cweord »

Java is in the x86 folder, Has been added to the main path, and location has been checked in the ClassPath and QTJAVA settings in environmental variables

Though when I took the path back to basics and re-entered the new path it took (and there wasn't a typo, as it was a direct copy of the original)

But it works with out the copied file now, oh the joys of Vista 64

Thank you all for your assistance.
Cweord

This message has been spell checked by Freudcheck - any mistakes are purley a figment of your imagination.
-------
My Tokens Directory
http://gallery.rptools.net/v/contrib/Cw ... er_Tokens/

dorpond
RPTools Team
Posts: 5534
Joined: Thu Jun 01, 2006 2:05 pm
Location: Buffalo, NY

Post by dorpond »

Cool! :)

Actually, I just started over with my laptop. I am installing Vista x32 now to see if I have better luck with my other applications. RPGSoundmixer wouldn't work correctly with X64 and I definately need that for my gaming sessions. ;)

Only problem though is that I loose 1gig of memory going to X32 since X64 is the only version that works with 4gig.

I'll test to see if Java works better with X32 and report back my findings.
How to use my bundled artwork (MT1.3B60+): http://forums.rptools.net/viewtopic.php?f=8&t=11759

Cweord
Great Wyrm
Posts: 1343
Joined: Sun Aug 12, 2007 10:49 am
Location: Midsomer Norton, (Near Bath), UK
Contact:

Post by Cweord »

Lol,

that's one of the reasons I went 64 bit, wanted extra memory for rendering (and when it comes down to a sensible price I will update to 2 gig simms, Mmm 8 GB memory)

I am gradually trying to switch to vista over xp, though there are one or 2 things that require xp
Cweord

This message has been spell checked by Freudcheck - any mistakes are purley a figment of your imagination.
-------
My Tokens Directory
http://gallery.rptools.net/v/contrib/Cw ... er_Tokens/

dorpond
RPTools Team
Posts: 5534
Joined: Thu Jun 01, 2006 2:05 pm
Location: Buffalo, NY

Post by dorpond »

Eventually I am going to install Microsoft Vitrual PC on my Vista box and then install XP. I want to see if I can run all my gaming apps in a virtual PC and see how it performs overall.

If that doesn't work, I set up dual boot; one for Vista, the other for XP.
How to use my bundled artwork (MT1.3B60+): http://forums.rptools.net/viewtopic.php?f=8&t=11759

dorpond
RPTools Team
Posts: 5534
Joined: Thu Jun 01, 2006 2:05 pm
Location: Buffalo, NY

Post by dorpond »

Update:

OK, now that I have Vista X32 installed, I noticed a couple things:

1. Even after installing Java, Java did not put any path statements pointing to Java in the System Variables.

2. However, when I do Java -version it works this time unlike Vista X64.

3. Maptool works like champ without any tweaking on my behalf.

Conclusion:
Vista X64 and Java must not be seeing eye to eye and if you are using Vista X64, you may have will have to add the path in your system variables if you want to use the Maptool Zip versions (I am using Java build 1.6.0_03-b05)

Note: Webstart always seemed to work fine with Vista X64 even when the Zips did not. Nice to know :)
How to use my bundled artwork (MT1.3B60+): http://forums.rptools.net/viewtopic.php?f=8&t=11759

User avatar
RPMiller
Demigod
Posts: 2555
Joined: Sun Jul 01, 2007 1:23 am

Post by RPMiller »

dorpond wrote:Conclusion:
Vista X64 and Java must not be seeing eye to eye and if you are using Vista X64, you may have will have to add the path in your system variables if you want to use the Maptool Zip versions (I am using Java build 1.6.0_03-b05)

Note: Webstart always seemed to work fine with Vista X64 even when the Zips did not. Nice to know :)
That was actually the security that I hinted at earlier. It isn't a permissions thing it is the way they have designed Vista to be more "secure". Unfortunately some of their settings aren't real conducive to applications getting along.
You're just jealous 'cause the voices only talk to me.

ImageImage

qbracken
Kobold
Posts: 3
Joined: Fri Mar 21, 2008 11:47 pm

Post by qbracken »

The missing control panel in Vista x64 is a known Java bug (#6641731) and you can see the details here:

http://bugs.sun.com/bugdatabase/view_bu ... id=6641731

Until that bug is fixed, you can launch the control panel by launching the javacpl.exe application in your Java installation. For my install, the path is C:\Program Files (x86)\Java\jre1.6.0_05\bin\javacpl.exe.

Your inability to launch Java from the MapTool batch file is not at all related to security. The path to the Java executable is simply missing from your Path environment variable. To illustrate this, launch a command prompt, type "set", and then look at the value of Path. You will see no reference to your Java installation.

This is also a known Java bug (#5086339) that exists for all 64-bit versions of Windows starting with XP 64-bit. This particular bug is almost 4 years old. A fix is currently targeted for Java 1.7 along with support for the 64-bit version of the Java plug-in. Again, you can see the details of the bug here:

http://bugs.sun.com/bugdatabase/view_bu ... id=5086339

To resolve this in the meantime, I suggest that you add the directory containing the java executable for the version of Java you wish to use to your Path environment variable. For my system, that path is "C:\Program Files (x86)\Java\jre1.6.0_05\bin".

To do this in Vista, click Start, right-click on Computer, and then select Properties. On the left-hand side under Tasks, select Advanced system settings. Near the bottom of the Advanced tab, click Environment Variables. Under System variables, select Path, and then click Edit. Add the path to your Java installation at the end. Be sure to first add a semicolon to deliminate the previous path entry with the one you are adding. After completing this, you can launch the MapTool batch files without any additional issues.

User avatar
Dracorat
Dragon
Posts: 953
Joined: Thu Sep 14, 2006 5:53 pm

Post by Dracorat »

So, I just spent forever troubleshooting why my Javaw wouldn't start.

I not only had to add the java path variable manually but....

you can't set Xmx2048M in a 32 bit OS without there being enough space left over for java itself.

=/

It needs a better error message than "Could not create virtual machine"

Now that those three hours are gone...

qbracken
Kobold
Posts: 3
Joined: Fri Mar 21, 2008 11:47 pm

Post by qbracken »

The virtual size of a process in 32-bit Windows is 2 GB. Windows allows you to boot the kernel with the /3GB flag which allows the virtual process space of a 32-bit process to grow to 3 GB.

However, when the Java virtual machine allocates memory, it requires a contiguous allocation of memory which the /3GB switch does not allow. The JVM requires contiguous memory because it has a number of side data structures that are indexed by scaled offsets from the start of the virtual memory address space of the process. This is an implementation choice by Sun.

In Windows, there are a number of libraries that are loaded before the JVM starts. Using the /3GB switch won't rebase those libraries, so the maximum amount of contiguous memory is still limited. On 32-bit Windows, Java can usually allocate between 1.3 and 1.5 GB of contiguous memory depending on the system configuration. Unfortunately, as you have painstakingly discovered, allocating 2 GB is not possible and you are left with a most unhelpful error message.

Moving to 64-bit Windows and the 64-bit JVM alleviates this issue as the process virtual address space increases from 2 GB to 8 TB. For example, when using the 64-bit JVM, I can launch MapTool with a 4 GB memory allocation (-Xmx4096M).

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Post by Azhrei »

Hmm, I didn't know that Java required the allocation to be contiguous within its virtual addressing space. That's good information; thanks.

There's another way to fix it that doesn't cost anything: upgrade to Linux. ;)

Just boot a 64-bit LiveCD (you might try the Bluewhite64 or "Kubuntu" live CDs) and run MT from there. If your live CD doesn't have Java already on it, you may need to install it. (It looks like Bluewhite64 has the 1.6 update 2 JRE.) Installing it should work, although the package will install into the ramdisk. The next time you boot the live CD you'll need to install it again as your changes to the ramdisk are lost when you reboot.



"The box that the application came in said, 'Windows XP or better' so I installed Linux."

carpens
Cave Troll
Posts: 79
Joined: Thu Dec 06, 2007 2:32 am
Location: Utah

Post by carpens »

Azhrei wrote: "The box that the application came in said, 'Windows XP or better' so I installed Linux."
[hushedbritishaccent]
This, ah, this is quite exciting- what you hear now is the plaintive mating call of the wild penguin. It is actually not as rare as some believe it to be, but in fora even tangientally related to gaming, this call most often goes ignored and unanswered.
[/hushedbritishaccent]

:P

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Post by Azhrei »

LOL! And right now I'm using a Mac. Go figure!

But at least it runs a real operating system. ;)

User avatar
Dracorat
Dragon
Posts: 953
Joined: Thu Sep 14, 2006 5:53 pm

Post by Dracorat »

Azhrei wrote:LOL! And right now I'm using a Mac. Go figure!

But at least it runs a real operating system. ;)
You can keep your real OS. My fake one operates better. =)

Cweord
Great Wyrm
Posts: 1343
Joined: Sun Aug 12, 2007 10:49 am
Location: Midsomer Norton, (Near Bath), UK
Contact:

Post by Cweord »

Funny - your real OS seems to have far more security vulnerability these days . . . . .

And the makers are far more concerned with fixing the PR than the problem.

But lets not start another PC / Mac war - though I don't believe we have had one yet this year.

Any way - the Linux crowd will just watch us battle it out, the move to victory over our still twitching corpses
Cweord

This message has been spell checked by Freudcheck - any mistakes are purley a figment of your imagination.
-------
My Tokens Directory
http://gallery.rptools.net/v/contrib/Cw ... er_Tokens/

Locked

Return to “How To”