You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Bulent Erdemir <bu...@gmail.com> on 2004/11/05 15:27:03 UTC

shared class libraries in Maven -Xshare:on

Hi, I want to take advantage of JDK 1.5.0's shared class libraries
feature by specifying the -Xshare:on option in the java command line.
To do this I first create the shared class library, then set
MAVEN_OPTS to -Xshare:on and run maven. It fails.
However, if I run a regular java application with sharing turned on, it works. 

Anybody have an idea ? 

Following is my screen dump:

C:\dev\projects\falez-onlineservers-core>java -Xshare:dump
Loading classes to share ... done.
Rewriting and unlinking classes ... done.
Calculating hash values for String objects .. done.
Calculating fingerprints ... done.
Removing unshareable information ... done.
Moving most read-only objects to shared space at 0x2c020000 ... done.
Moving common symbols to shared space at 0x2c37e848 ... done.
Moving remaining symbols to shared space at 0x2c4a1148 ... done.
Moving string char arrays to shared space at 0x2c4a1bd8 ... done.
Moving additional symbols to shared space at 0x2c522ef0 ... done.
Read-only space ends at 0x2c577960, 5601632 bytes.
Moving read-write objects to shared space at 0x2c820000 ... done.
Moving String objects to shared space at 0x2cd75be8 ... done.
Read-write space ends at 0x2cdb43a8, 5850024 bytes.
Updating references to shared objects ... done.

C:\dev\projects\falez-onlineservers-core>set MAVEN_OPTS=-Xshare:on

C:\dev\projects\falez-onlineservers-core>maven
An error has occured while processing the shared archive file.
A jar file is not the one used while building the shared archive file.
Error occurred during initialization of VM
Unable to use shared archive.

C:\dev\projects\falez-onlineservers-core>

C:\dev\projects\falez-onlineservers-core>java -Xshare:on -jar c:\java\jdk1.5.0\d
emo\jfc\java2d\Java2Demo.jar

C:\dev\projects\falez-onlineservers-core>   <Java2Demo.jar is a swing
application and it launches at this point>


Thank for your time,
Bulent Erdemir

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org