If that's the case than why does my program run correctly when I compile
it and run it with javac/java but not when I compile it with
javac_g/java_g? And how do I get Runtime.trace*() to work. I just simply
want to know if those function work under the Linux JVM. They are not
required to be implemented according to the Java 1.2 API.
I don't want to debug the program, but I do want to add the feature of
being able to dynamically turn on the output of debugging information in
such a way that it doesn't hurt performance.
(i.e. Send an RMI message to the program and it automatigically starts
to output what functions its executes).
On Sat, 16 Oct 1999, Weiqi Gao wrote:
> Brandon Anderson wrote:
> >
> > OK, so I found out that not all the code is compiled with javac_g. Is
> > there any way to get around having to compile all the code with javac_g.
> > I'm connecting to a database via some jdbc drivers and they are not
> > compiled with javac_g and I don't/can't have the source to them.
>
> On a logical level, javac_g is the debug version of javac. As a
> consequence, javac_g works exactly the same as javac. Doing a "javac
> Foo.java" and a "javac_g Foo.java" will produce exactly the same
> output. Thus javac_g is useful to debug "javac the program" itself,
> which application developers don't usually do.
>
> To compile your Java source into a debuggable version of class files,
> use the -g switch, i.e., "java -g Foo.java". The resulting Foo.class
> file can then be debugged with jdb. You can either run "java -debug
> Foo" and then debug it over the network, or you can run "jdb Foo" to
> debug it locally.
>
> Contrary to the situation with C programs, line numbers of source code
> are always compiled into the class files, whether you use the -g switch
> or not. It's the other stuff (local variable names, etc.) that's added
> when you compile with the -g switch.
>
>
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]