Code: Select all
I can get jdb HelloWorld to work from the dos box but not as a TP command (customized tool).
In the XP SP2 dos box,
E:\>java -version
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
E:\>cd E:\javaPackages\FoxInfoServer
E:\javaPackages\FoxInfoServer>javac HelloWorldApp.java
E:\javaPackages\FoxInfoServer>jdb HelloWorldApp
Initializing jdb ...
> run
run HelloWorldApp
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
>
VM Started: Hello World!
"The application exited"
Interestingly, a previous test ended instead with:
"The application has been disconnected"
This was run from: C:\j2sdk1.4.2\bin\jdb.exe HelloWorldApp
but I can't swear whether it used javac or jikes (I thought it was javac).
At present, the two compiler outputs run identically in TP.
The PATH environ. var. seems to give C:\j2sdk1.4.2\bin\ priority:
.;
c:\PROGRA~1\jikes-1.22\bin;
C:\WINDOWS;C:\WINDOWS\System32\Wbem;
C:\SDCC\BIN;
C:\PROGRA~1\Microsoft Visual Studio\Common\Tools\WinNT;
C:\PROGRA~1\Microsoft Visual Studio\Common\MSDev98\Bin;
C:\PROGRA~1\Microsoft Visual Studio\Common\Tools;
C:\PROGRA~1\Microsoft Visual Studio\VC98\bin;
C:\j2sdk1.4.2\bin;
C:\PROGRA~1\Java\jre1.5.0_06\bin;
...
Whereas in a TP tools dialog:
Command: C:\j2sdk1.4.2\bin\jdb.exe
OR jdb
Parameters: $BaseName
Initial Folder: $FileDir
Initializing jdb ...
> Internal exception:
java.io.IOException: The handle is invalid
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(FileInputStream.java:194)
...
Tool completed successfully
Here's the code (formatting and comment NOT mine):
class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!"); // Display the string.
}
}