On Tuesday 06 March 2007 00:03 Armand Navabi wrote: > Pavel, > > Interesting. I am working on Ubuntu 6.06. If I am in the Harmony bin > directory and I try to run like this: > > ./java -agentpath:<path to simpleAgent build> HelloWorld > > I get the error I explained before. When I use Sun's java (java 5.0), it > works fine.
I looked at the agent source and I find some inconsistency in its code. It calls GetEnv with JVMTI_VERSION constant, but prints error message with JVMTI_VERIONS_1 constant. These constants are actually different. The JVMTI_VERSION_1 constant has 0 in MICRO version field while JVMTI_VERSION has the actual MICRO version for the JVMTI implementation in VM. Could you change the agent to always use JVMTI_VERSION_1? In this case you won't depend on the MICRO version of the JVMTI implementation of the header file from JDK that you've used to compile agent code. > -----Original Message----- > From: Pavel Pervov [mailto:[EMAIL PROTECTED] > Sent: Monday, March 05, 2007 5:33 AM > To: [email protected] > Subject: Re: [drlvm][jvmti] JVMTI support? > > Armand, > > I tried this simple agent on Windows and got it working perfectly. > > What platform you are working on? > > Pavel. > > On 3/5/07, Armand Navabi <[EMAIL PROTECTED]> wrote: > > Is there support for JVM Tool Interface from the JIT? The developers > > guide says that the JVMTI support component relies on support from > > execution engines. Section 3.3.2 mentions support for JVMTI in the > > interpreter, but I see no mention in the JIT section (Section 3.3.1). > > > > I am trying to use this simple agent > > ( > > http://wsjoung.wordpress.com/2006/11/17/the-java-virtual-machine-tool-inter >f ace-jvmti/ > > > ), > > but it causes the following error: > > > > ERROR: Unable to access JVMTI Version 1 (0x30010000), is your J2SE a 1.5 > > or newer version? JNIEnvs GetEnv() returned -3 > > > > I tried to use the agent with both the JIT and the interpreter, but both > > resulted in the above error. > > > > Thanks, > > Armand -- Gregory
