java - native library for attach API not available in this JRE -
i attempting build new project gradle, junit, , jmock. when run build, stack trace:
com.heavyweightsoftware.daybook.ws.typecodewstest standard_error java.lang.illegalstateexception: native library attach api not available in jre @ org.gradle.api.internal.tasks.testing.junit.junittestclassexecuter.ru ntestclass(junittestclassexecuter.java:80) @ org.gradle.api.internal.tasks.testing.junit.junittestclassexecuter.ex ecute(junittestclassexecuter.java:49) @ org.gradle.api.internal.tasks.testing.junit.junittestclassprocessor.p rocesstestclass(junittestclassprocessor.java:64) @ org.gradle.api.internal.tasks.testing.suitetestclassprocessor.process testclass(suitetestclassprocessor.java:50) @ org.gradle.messaging.dispatch.reflectiondispatch.dispatch(reflectiond ispatch.java:35) @ org.gradle.messaging.dispatch.reflectiondispatch.dispatch(reflectiond ispatch.java:24) @ org.gradle.messaging.dispatch.contextclassloaderdispatch.dispatch(con textclassloaderdispatch.java:32) @ org.gradle.messaging.dispatch.proxydispatchadapter$dispatchinginvocat ionhandler.invoke(proxydispatchadapter.java:93) @ org.gradle.api.internal.tasks.testing.worker.testworker.processtestcl ass(testworker.java:106) @ org.gradle.messaging.dispatch.reflectiondispatch.dispatch(reflectiond ispatch.java:35) @ org.gradle.messaging.dispatch.reflectiondispatch.dispatch(reflectiond ispatch.java:24) @ org.gradle.messaging.remote.internal.hub.messagehub$handler.run(messa gehub.java:360) @ org.gradle.internal.concurrent.executorpolicy$catchandrecordfailures. onexecute(executorpolicy.java:54) @ org.gradle.internal.concurrent.stoppableexecutorimpl$1.run(stoppablee xecutorimpl.java:40) caused by: java.lang.unsatisfiedlinkerror: no attach in java.library.path ... 14 more gradle test executor 1 finished executing tests. com.heavyweightsoftware.daybook.ws.typecodewstest > testgettypecodes failed java.lang.exceptionininitializererror @ com.heavyweightsoftware.daybook.ws.typecodewstest.testgettypecodes(ty pecodewstest.java:40) caused by: java.lang.illegalstateexception: native library attach api not avail able in jre @ mockit.internal.startup.agentloader.getvirtualmachineimplementati onfromembeddedones(agentloader.java:78) @ mockit.internal.startup.agentloader.loadagent(agentloader.java:46 ) @ mockit.internal.startup.startup.verifyinitialization(startup.java :172) @ mockit.invocations.<clinit>(invocations.java:26) ... 1 more caused by: java.lang.noclassdeffounderror: not initialize class sun.tools .attach.windowsvirtualmachine @ sun.reflect.nativeconstructoraccessorimpl.newinstance0(native method) @ sun.reflect.nativeconstructoraccessorimpl.newinstance(unknown source) @ sun.reflect.delegatingconstructoraccessorimpl.newinstance(unk nown source) @ java.lang.reflect.constructor.newinstance(unknown source) @ mockit.internal.startup.agentloader.getvirtualmachineimplemen tationfromembeddedones(agentloader.java:70) ... 4 more
so looked , found these questions: jmockit error - native library attach api not available in jre , jmockit: native library attach api not available in jre error
and i've made changes in eclipse, error happens when running outside of eclipse , it's not eclipse settings.
here's output of java -version command prompt:
c:\users\thom\git\daybook\webservices>java -version java version "1.8.0_45" java(tm) se runtime environment (build 1.8.0_45-b15) java hotspot(tm) 64-bit server vm (build 25.45-b02, mixed mode)
this part of gradle build --info:
executing task ':test' (up-to-date check took 0.193 secs) due to: value of input property 'candidateclassfiles' has changed task ':test' starting process 'gradle test executor 1'. working directory: c:\users\thom\git\ daybook\webservices command: c:\java\bin\java.exe -djava.security.manager=jarjar .org.gradle.process.internal.child.bootstrapsecuritymanager -dfile.encoding=wind ows-1252 -duser.country=us -duser.language=en -duser.variant -ea -cp c:\users\th om\.gradle\caches\2.4\workermain\gradle-worker.jar jarjar.org.gradle.process.int ernal.launcher.gradleworkermain 'gradle test executor 1' started process 'gradle test executor 1' gradle test executor 1 started executing tests.
which tells me it's running java c:\java\bin right install. looked , directer has javac in it, think confirms it's jdk , not jre.
any input, oh wise above wise?
i added c:\java\jre\bin path , build started working again.
Comments
Post a Comment