Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » No local variables when debugging java.lang.Integer
No local variables when debugging java.lang.Integer [message #157088] Mon, 03 May 2004 18:35 Go to next message
Eclipse UserFriend
Hello Experts,

I have Eclipse and JDT 2.1.3 on WinXP, and using JDK 1.4.1. I have a
simple test program that calls java.lang.Integer.toString(int). I set a
breakpoint in my test program before this method call. I launch the test
program in JDT debugger. Then I step into the
java.lang.Integer.toString(int) method (JDK source is available.) When
inside the java.lang.Integer.toString(int) method, however, the
"Variables" view tab in the Debug perspective is empty. How can I see the
local variables when stepping into such "standard" Java source files?

Thanks.
Re: No local variables when debugging java.lang.Integer [message #157096 is a reply to message #157088] Mon, 03 May 2004 18:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

You really can't because the standard rt.jar is not compiled with local
variables turned on.

In the latest 3.0, you can at least see the parameter variables, but
even there you can't see the local variables.

You could try recompiling rt.jar using the src.jar but I've had problems
with that because I've had cases where the src.jar actually is different
than the rt.jar and things didn't match and you got a different output
because of it.


--
Thanks, Rich Kulp

Re: No local variables when debugging java.lang.Integer [message #157111 is a reply to message #157096] Tue, 04 May 2004 01:15 Go to previous messageGo to next message
Eclipse UserFriend
This is a multi-part message in MIME format.
--------------050601040704020003070604
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

use this ant build file
And you should be OK.
I use it all the time (now on 1.4.2_04)

johan


Rich Kulp wrote:
> You really can't because the standard rt.jar is not compiled with local
> variables turned on.
>
> In the latest 3.0, you can at least see the parameter variables, but
> even there you can't see the local variables.
>
> You could try recompiling rt.jar using the src.jar but I've had problems
> with that because I've had cases where the src.jar actually is different
> than the rt.jar and things didn't match and you got a different output
> because of it.
>
>

--------------050601040704020003070604
Content-Type: text/xml;
name="build.xml"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="build.xml"

<?xml version="1.0"?>

<project name="rt_build" default="default" basedir=".">
<description>
Builds debug version of the JDK runtime jar library, rt.jar, using the
sources supplied in the src.zip file. Class files in rt.jar for which
there are no java sources, as well as other non-source files are obtained
from the rt.jar library currently in the JDK's JRE lib directory.
</description>

<property name="builddir" value="${basedir}/rt_build"/>
<property name="libfile" value="${basedir}/jre/lib/rt.jar"/>
<property name="srcdir" value="${builddir}/src"/>
<property name="dstdir" value="${builddir}/dst"/>
<property name="libdir" value="${builddir}/lib"/>
<property name="srcfile" value="${basedir}/src.zip"/>
<property name="dstfile" value="${builddir}/rt.jar"/>
<property name="manfile" value="${libdir}/meta-inf/manifest.mf"/>

<target name="clean" description="clean up build directory">
<delete dir="${builddir}"/>
</target>

<target name="init" depends="clean" description="prepare build directory">
<mkdir dir="${dstdir}"/>
<unjar src="${libfile}" dest="${libdir}"/>
<unzip src="${srcfile}" dest="${srcdir}"/>
</target>

<target name="compile" depends="init" description="compile sources">
<javac destdir="${dstdir}" srcdir="${srcdir}/com/" debug="on" debuglevel="lines,vars,source"
compiler="javac1.4" source="1.4" target="1.4" failonerror="false"/>
<javac destdir="${dstdir}" srcdir="${srcdir}/java/" debug="on" debuglevel="lines,vars,source"
compiler="javac1.4" source="1.4" target="1.4" failonerror="false"/>
<javac destdir="${dstdir}" srcdir="${srcdir}/javax/" debug="on" debuglevel="lines,vars,source"
compiler="javac1.4" source="1.4" target="1.4" failonerror="false"/>
<javac destdir="${dstdir}" srcdir="${srcdir}/org/apache" debug="on" debuglevel="lines,vars,source"
compiler="javac1.4" source="1.4" target="1.4" failonerror="false"/>
<javac destdir="${dstdir}" srcdir="${srcdir}/org/ietf" debug="on" debuglevel="lines,vars,source"
compiler="javac1.4" source="1.4" target="1.4" failonerror="false"/>
<javac destdir="${dstdir}" srcdir="${srcdir}/org/omg" debug="on" debuglevel="lines,vars,source"
compiler="javac1.4" source="1.4" target="1.4" failonerror="false"/>
<javac destdir="${dstdir}" srcdir="${srcdir}/org/w3c" debug="on" debuglevel="lines,vars,source"
compiler="javac1.4" source="1.4" target="1.4" failonerror="false"/>
<javac destdir="${dstdir}" srcdir="${srcdir}/org/xml" debug="on" debuglevel="lines,vars,source"
compiler="javac1.4" source="1.4" target="1.4" failonerror="false"/>
<javac destdir="${dstdir}" srcdir="${srcdir}/sunw/" debug="on" debuglevel="lines,vars,source"
compiler="javac1.4" source="1.4" target="1.4" failonerror="false"/>
</target>

<target name="copy" description="copy compiled class files to library directory">
<copy todir="${libdir}" overwrite="true">
<fileset dir="${dstdir}"/>
</copy>
</target>

<target name="jar" description="generate jar file">
<jar jarfile="${dstfile}" basedir="${libdir}" compress="false" manifest="${manfile}"/>
</target>

<target name="default" depends="compile,copy,jar"/>

</project>

--------------050601040704020003070604--
Re: No local variables when debugging java.lang.Integer [message #157254 is a reply to message #157111] Tue, 04 May 2004 17:46 Go to previous message
Eclipse UserFriend
Hi,

Thanks for all the responses. Clicking on the build.xml attachment gives
'Object not found'/'Error 404'. Can you please re-post the build.xml or
email it to me?

Johan Compagner wrote:

> use this ant build file
> And you should be OK.
> I use it all the time (now on 1.4.2_04)

> johan


> Rich Kulp wrote:
> > You really can't because the standard rt.jar is not compiled with local
> > variables turned on.
> >
> > In the latest 3.0, you can at least see the parameter variables, but
> > even there you can't see the local variables.
> >
> > You could try recompiling rt.jar using the src.jar but I've had problems
> > with that because I've had cases where the src.jar actually is different
> > than the rt.jar and things didn't match and you got a different output
> > because of it.
> >
> >
Previous Topic:Disappearing JRE
Next Topic:JUnit not working in 3M7
Goto Forum:
  


Current Time: Fri Apr 25 23:52:23 EDT 2025

Powered by FUDForum. Page generated in 0.02585 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top