TravaOpenJDK / trava-jdk-11-dcevm

dcevm-11 built on Travis
Apache License 2.0
403 stars 57 forks source link

DCEVM in existing jdk-11, on Windows #10

Closed electrotype closed 5 years ago

electrotype commented 5 years ago

What are the instructions to enable DCEVM in an existing JDK installation (jdk-11.0.2), on Windows? The libjvm.so lib of course doesn't exist.

I ask because I have an issue with the prebuilt version. I haven't been able to create a small/reproductible example yet, but the issue occures when using Guice and requestInjection(...). Some dependencies are not injected. Using plain jdk-11.0.2 works well.

skybber commented 5 years ago

Make dcevm direcotry inside lib/ andCopy server/libjvm.so (lib) to it.

electrotype commented 5 years ago

@skybber I don't understand! There is no lib/libjvm.so in the Windows distribution.

Should I take it from the Linux distribution? I don't think ".so" libraries will work on Windows, do they?

skybber commented 5 years ago

I see now, JVM is on different path on windows :

https://github.com/dcevm/dcevm/blob/master/installer/src/main/java/com/github/dcevm/installer/ConfigurationInfo.java#L62

the server VM is in /bin/server/ so dcevm VM could be in /bin/dcevm/

electrotype commented 5 years ago

I copied C:\java11-openjdk-dcevm-windows\bin\server\jvm.dll to C:\jdk-11.0.2\bin\server\jvm.dll

Nothing.

I also copied C:\java11-openjdk-dcevm-windows\lib\hotswap\hotswap-agent.jar to C:\jdk-11.0.2\lib\hotswap\hotswap-agent.jar

Nothing.

I then copied (overwrote) C:\java11-openjdk-dcevm-windows\bin\server\jvm.dll to C:\jdk-11.0.2\bin\server\jvm.dll

And now I get:

C:\something>java -version                                                                                                                                                                                                                
Starting HotswapAgent 'C:\jdk-11.0.2\lib\hotswap\hotswap-agent.jar'                                                                                                                                                                         
HOTSWAP AGENT: 13:06:37.206 INFO (org.hotswap.agent.HotswapAgent) - Loading Hotswap agent {1.3.1-SNAPSHOT} - unlimited runtime class redefinition.                                                                                          
HOTSWAP AGENT: 13:06:37.652 INFO (org.hotswap.agent.config.PluginRegistry) - Discovered plugins: [Hotswapper, JdkPlugin, WatchResources, ClassInitPlugin, AnonymousClassPatch, Hibernate, Hibernate3JPA, Hibernate3, Spring, Jersey1, Jersey2, Jetty, Tomcat, ZK, Logback, Log4j2, MyFaces, Mojarra, Omnifaces, Seam, ELResolver, WildFlyELResolver, OsgiEquinox, Owb, Proxy, WebObjects, Weld, JBossModules, ResteasyRegistry, Deltaspike, GlassFish, Vaadin, Wicket]                  
java version "11.0.2" 2019-01-15 LTS                                                                                                                                                                                                        
Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS)                                                                                                                                                                                   
Dynamic Code Evolution 64-Bit Server VM 18.9 (build 11.0.1.6+8-201902111848, mixed mode)      

Yeah!

But I still get the error with Guice, sadly....

Thanks for the help.

skybber commented 5 years ago

Juice plugin still missing in HA...