Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

OpenVMS Java Debugging

circepb
Occasional Visitor

OpenVMS Java Debugging

Can anyone tell me how to do a java debugging session under OpenVMS? I am using OpenVMS V7.3-2 Java 1.42. I can compile (javac) and run it java "HelloWorld" but don't know how to bring up the debugging session. java_dbg "HelloWorld" does not bring up the java source code from the current directory.

David
4 REPLIES
H.Becker
Honored Contributor

Re: OpenVMS Java Debugging

Do you mean running jdb?

$ @sys$startup:java$142_setup classic
$ type hello.java
import java.io.*;
public class Hello {

public static void main(String argv[]) {
System.out.println("Hello");
}
}
$ javac -g hello.java
$ jdb "Hello
Initializing jdb ...
> stop in Hello.main
Deferring breakpoint Hello.main.
It will be set after the class is loaded.
> run "Hello
run "Hello
>
VM Started: Set deferred breakpoint Hello.main

Breakpoint hit: "thread=main", Hello.main(), line=5 bci=0
5 System.out.println("Hello");

main[1]
Willem Grooters
Honored Contributor

Re: OpenVMS Java Debugging

Due to the nature of the beast, Java cannot be debugged using the VMS debugger, which deals with native code only; AFAIK, the VM has no facilities for any other debugger than it's own. So you'll have to rely on the debugger facilities of the VM, and I doubt it would be different than running Java on other platforms.
The VMS debugger is only feasable if you want to debug the VM itself, which may be possibble if you had the source code, or at least (machine-code) listings and mapfile. But that is, I think, not what you're after.
Willem Grooters
OpenVMS Developer & System Manager
Hoff
Honored Contributor

Re: OpenVMS Java Debugging

The OpenVMS debugger (presently?) has no capabilities with interpreted code. This whether the code is Javac-compiled into JVM byte code interpreter code, JIT code, or a more classic and traditional interpreter.

This means that Java, Ruby, Lua, php, perl, python and the other modern languages are not supported by the OpenVMS debugger. A few classic languages are also left out here, too. Well, other than debugging the interpreter itself.
circepb
Occasional Visitor

Re: OpenVMS Java Debugging

I have the answer from the replies through the forums.