jvm icon indicating copy to clipboard operation
jvm copied to clipboard

I can not run the demo.want your help.

Open magneter opened this issue 9 years ago • 4 comments

I do the steps as the file ordered. I just change the JAVA_7_HOME to JAVA_HOME ,so the comand file .sh could run under the java8 version.but it throws a Exception as follows "ERROR on thread 'main': No Native implementation for java/lang/Double.". How can I fix it ? thank you for your reading .

magneter avatar Feb 25 '17 07:02 magneter

Hi

Is that the full error message? I would expect there to be a method name after 'java/lang/Double'.

What os are you running on?

mcintyret avatar Feb 25 '17 13:02 mcintyret

Thank you very much for your help. yeah ,you are right. I will post the full messeage as soon as I get home. I use the macbook pro 2015,and the OS version is 10.11.5. I also try it with "javac -source 1.7 -target 1.7 " to compile the Demo.java. and when run it,I get the same Exception. I want to learn Jvm and the GC profile from code or some book in action。 But the resource is very rare。Could you give me some suggestion or idea ,or anything help ? your project is very very helpful to me. Thank you .

magneter avatar Feb 28 '17 02:02 magneter

all the StackTrace is here: No Native implementation for java/lang/Double.longBitsToDouble:(J)D Caused By: java/lang/Math.powerOfTwoD:(I)D java/lang/Math.:()V java/util/Hashtable.:(IF)V java/util/Hashtable.:()V java/util/Properties.:(Ljava/util/Properties;)V java/util/Properties.:()V java/lang/System.initializeSystemClass:()V ERROR on thread 'main': No Native implementation for java/lang/Double.longBitsToDouble:(J)D

xception in thread "main" java.lang.IllegalStateException: No Native implementation for java/lang/Double.longBitsToDouble:(J)D at com.mcintyret.jvm.core.opcode.invoke.Invoke.invokeNativeMethod(Invoke.java:85) at com.mcintyret.jvm.core.opcode.invoke.Invoke.execute(Invoke.java:47) at com.mcintyret.jvm.core.exec.Execution.executeNextInstruction(Execution.java:78) at com.mcintyret.jvm.core.exec.ExecutionStack.execute(ExecutionStack.java:25) at com.mcintyret.jvm.core.exec.Thread.doExecute(Thread.java:121) at com.mcintyret.jvm.core.exec.Thread.execute(Thread.java:89) at com.mcintyret.jvm.core.util.Utils.executeMethodAndThrow(Utils.java:107) at com.mcintyret.jvm.load.ClassLoader.executeStaticInitMethod(ClassLoader.java:374) at com.mcintyret.jvm.load.ClassLoader.getClassObject(ClassLoader.java:141) at com.mcintyret.jvm.load.ClassLoader.findClassObject(ClassLoader.java:535) at com.mcintyret.jvm.load.ClassLoader.translate(ClassLoader.java:481) at com.mcintyret.jvm.core.constantpool.ConstantPool.getMethod(ConstantPool.java:60) at com.mcintyret.jvm.core.opcode.invoke.Invoke.execute(Invoke.java:29) at com.mcintyret.jvm.core.exec.Execution.executeNextInstruction(Execution.java:78) at com.mcintyret.jvm.core.exec.ExecutionStack.execute(ExecutionStack.java:25) at com.mcintyret.jvm.core.exec.Thread.doExecute(Thread.java:121) at com.mcintyret.jvm.core.exec.Thread.execute(Thread.java:89) at com.mcintyret.jvm.core.util.Utils.executeMethodAndThrow(Utils.java:107) at com.mcintyret.jvm.load.ClassLoader.afterInitialLoad(ClassLoader.java:101) at com.mcintyret.jvm.load.Runner.run(Runner.java:38) at com.mcintyret.jvm.Jvm.main(Jvm.java:55) Still need your help.Thank you

magneter avatar Feb 28 '17 14:02 magneter

Thanks

What's the exact version of java7 you are using?

The error is correct that there is no implementation of java/lang/Double.longBitsToDouble - the reason for this is that it simply wasn't needed for the version of java7 I was compiling against. Let me know what version you're using and I'll try to get it working :-) (might not happen for a week or two though!)

mcintyret avatar Mar 01 '17 00:03 mcintyret