Hello again everyone! I've got myself a problem trying to run a java application (with calls to Windows native libraries) on Wine 1.2. That aside, the problem is explained with this little example: Code: $ wine java -version java version "1.6.0_20" Java(TM) SE Runtime Environment (build 1.6.0_20-b02) Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode) $ wine java -xmx1024 -version Unrecognized option: -xmx1024 Could not create the Java virtual machine. A question : How does Wine report the free ram and virtual memory?? Any suggestions??? Thanks in advance. java version "1.6.0_20" Wine 1.2~rc6~0ubuntu1~karmicppa1 Linux Ubuntu 9.10 Karmic Koala 2GB ran ddr 4GB Swap space Intel Pentium 4 2.8GHz Ext4 Disk partition
Sorry i post the wrong example in there, so this is the real one: Code: $ wine java helloworld hello world $ wine java -Xmx500M helloworld Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine.
On Fri, 2010-07-23 at 15:45 -0500, chamanx64 wrote:> Sorry i post the wrong example in there, so this is the real one: > > > Code: > $ wine java helloworld > hello world > $ wine java -Xmx500M helloworld > Error occurred during initialization of VM > Could not reserve enough space for object heap > Could not create the Java virtual machine. >What version of Java (show the output from "java -version") and is this Java for Windows or your native OS? What OS are you using? How much RAM is installed? How big is your swap space? This is what my system shows with my Java hello world program: - $ java -Xmx500M Hello Hello from Java - $ java -version java version "1.6.0_17" Java(TM) SE Runtime Environment (build 1.6.0_17-b04) Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing) - $ cat /proc/version Linux version 2.6.32.16-141.fc12.i686.PAE (mockbuild at x86-17.phx2.fedoraproject.org) (gcc version 4.4.4 20100630 (Red Hat 4.4.4-10) (GCC) ) #1 SMP Wed Jul 7 04:41:17 UTC 2010 - $ cat /proc/meminfo MemTotal: 1017560 kB ... SwapTotal: 2048752 kB As you can see, your command works on my laptop, a Thinkpad R61i with 1GB RAM and 2GB swap space running Fedora 12 and Sun Java SE 6. Martin
On Sat, 2010-07-24 at 08:49 +0200, Fr?d?ric Delanoy wrote:> On Sat, Jul 24, 2010 at 01:22, Martin Gregorie <martin at gregorie.org> wrote: > > On Fri, 2010-07-23 at 15:45 -0500, chamanx64 wrote: > >> Code: > >> $ wine java helloworld > >> hello world > >> $ wine java -Xmx500M helloworld > >> Error occurred during initialization of VM > >> Could not reserve enough space for object heap > >> Could not create the Java virtual machine. > >> > > > > What version of Java (show the output from "java -version") and is this > > Java for Windows or your native OS? > > Since he uses wine to run java, it's obviously the windows version. >Some people persist in running really old Java releases (Sun SE versions from 1.4 to 1.6 are all still common) and there *are* a number of sources other than Sun/Oracle, you know. OpenJava and the IBM version, for instance. Sun/Oracle supports a bare JRE, not to mention the SE, EE and ME JDKs. On top of that there are 32 bit and 64 bit JVMs. Last but not yet forgotten, there are still people trying to use the broken MS Java 1.1. It may be obvious that the OP is using Windows, but we need to know which JDK he's using and why he thinks its necessary to run a Windows JVM rather than a native one.> He tries to run wine32 java under wine, not native linux version. >Your supposition. The OP didn't say which JVM he was using or show us the actual error message, just the failing command line. We don't even know how much RAM his machine has or how much swap space he allocated. He may simply have a small RAM with no swap space and, by requesting 500MB of heap for an apparently tiny program he may have oversubscribed memory. Martin
Reasonably Related Threads
- Benchmark - Thanks Dave for making this gnawer this FAST!!
- [LLVMdev] debugging LLVM generated executables???
- [LLVMdev] debugging LLVM generated executables???
- lld write wrong symbol value in .data section if enable -pie
- [LLVMdev] debugging LLVM generated executables???