TravaOpenJDK / trava-jdk-11-dcevm

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

Error when use "jar" in command line #4

Closed ming871 closed 5 years ago

ming871 commented 5 years ago

Starting HotswapAgent '/Library/Java/JavaVirtualMachines/dcevm-11.0.1.6/Contents/Home/lib/hotswap/hotswap-agent.jar' java.lang.instrument ASSERTION FAILED : "!errorOutstanding" with message find class on InstrumentationImpl failed at line: 493 java.lang.instrument ASSERTION FAILED : "result" at line: 402 FATAL ERROR in native method: processing of -javaagent failed

skybber commented 5 years ago

Does the /Library/Java/JavaVirtualMachines/dcevm-11.0.1.6/Contents/Home/lib/hotswap/hotswap-agent.jar exist?

ming871 commented 5 years ago

Yes

devdeiMac-Pro:bin dev$ ls -la /Library/Java/JavaVirtualMachines/dcevm-11.0.1.6/Contents/Home/lib/hotswap/hotswap-agent.jar -rw-r--r--@ 1 dev staff 1591365 12 7 00:45 /Library/Java/JavaVirtualMachines/dcevm-11.0.1.6/Contents/Home/lib/hotswap/hotswap-agent.jar

skybber commented 5 years ago

I've tested java -jar xyz.jar and it is working for me on linux. So it is failing on OSX? What about removing hotswap-agent.jar from lib/hotswap ?

ming871 commented 5 years ago

sorry, my mistake. I mean the "jar" command to create ".jar" archive file, like "jar cvf file.jar -C fatjar/ .", not "java -jar" to run a java app from/in one jar file.

skybber commented 5 years ago

OK, you are using jdk11-dcevm as a system JDK? I do not recommend it, since it has limitations like default Serial GC (despite you can use CMS). It is intended as an alternative JDK for debugging and development. However I will try to check and fix the problem ...

ming871 commented 5 years ago

Yeah, I add it to system PATH, I guess It's also not recommended for production environments, right? thank you very much.

skybber commented 5 years ago

Its not recommended, but if you can, you can try it with -XX:+UseConcMarkSweepGC - it should work quite OK, but not fully tested yet.

ming871 commented 5 years ago

Ok, Thank you! I will try it.