From: <ddk...@ki...> - 2005-05-31 22:42:05
|
You need a trailing "m" to specify megabytes, but you can't just specify this option. You need additional parameters (like -version): $ java -Xmx512m -version java version "1.4.2_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03) Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode) Note what happens if you add a space: $ java -Xmx 256m -version Invalid maximum heap size: -Xmx Could not create the Java virtual machine. Dave On Tue, May 31, 2005 at 02:31:28PM -0700, Dantes, Ed wrote: > Hi, > Thanks David for that answer, Im sure modifying the jvm is the > answer, though I tried typing at the command line %java -Xmx512, but > does not accept, am I doing this > wrong? > > Thanks > Ed > > -----Original Message----- > From: htm...@li... > [mailto:htm...@li...] On Behalf Of David D. > Kilzer > Sent: Tuesday, May 24, 2005 6:34 AM > To: htm...@li... > Subject: Re: [Htmlunit-user] Specifying which UserProfile on Netscape > and Mozilla > > First, I'll assume that you're switching back to a "real" browser > (Netscape/Mozilla) rather than using HtmlUnit because of the memory > errors. The user profiles in Netscape/Mozilla have absolutely nothing > to do with HtmlUnit. > > If you want to hit the same web site and log in multiple times on the > same PC, you'll need to use different browsers, such as: Mozilla Suite, > Firefox, Opera, MSIE 6, and Netscape (which just released version 8). > Each of these, running as a different executable, should allow you to > log in as five different users into your web application. (I suppose > you could also set up multiple proxy servers with different hostnames so > that you could log into one application multiple times with a single > browser, too.) > > How much memory does your PC have? At work, we give all of the > developers 1 GB so that they can run Tomcat (or JBoss), the IntelliJ > IDEA, a Fitnesse server, multiple web browsers and the application > they're working on all at the same time (as well as Windows apps like > Outlook). > > Did you try to determine why you're running out of memory in your tests? > Have you tried modifying the max size of the JVM heap when running the > tests (-Xmx=256m)? We found we had to do that when running our hundreds > or HtmlUnit-based tests within IntelliJ IDEA 4.5 or it would run out of > memory. > > Finally, what version of HtmlUnit are you using? Before 1.3 (or 1.4?), > there was a bug where memory would be consumed and not released until > the test process exited. (This was the primary reason we had to > increase the heap size to 256MB, if I remember correctly.) > > Dave > > > On May 23, 2005, at 4:55 PM, Dantes, Ed wrote: > > Hi, > > I was just wondering if there was a field where you can specify > > which the particular UserProfile box that comes up, when you use > > Netscape and Mozilla. There probably isnt a way to do this, but > > perhaps I should rephrase this another way. > > > > I am trying to load test my javascript application using HtmlUnit, > > JUnit and JUnitPerf. The web application requires you to login > > correctly prior to gaining access. Thus I have several users in > > tow: testuser1, testuser2, etc... all of which I am trying to emulate > > simultaneously. Basically each user has its own TestClass in which I > > add all the tests to the TestSuite. One or two users, work fine, but > > testing more users gives major problems, out of memory error to be > > exact. This all leads back to the UserProfile, because netscape will > > not allow you to log on as a different user after two...any responses > > on how I can do this? > > > > Thanks > > Ed > > > |