|
-
Aug 24th, 2000, 01:40 PM
#1
Thread Starter
Lively Member
Right, I am creating a Java Front end for use with Sun's JDK in VB, and I am having trouble getting debug info from the dos window.
First of all, I am creating a Batch file and shelling it to compile the java source file.
The following is the code i am using to create and execute the batch file.
[CODE]
'First create a bat file to compile the java source file.
Open "C:\Compiler.bat" For Output As #1
Print #1, "@echo off"
Print #1, "echo Now attempting to compile C:\HelloAgainApplet.java using Java Compiler..."
Print #1, "C:\jdk1.3\bin\javac.exe C:\Hello.java > C:\~Results.txt" 'Get the data in a text file
Close #1
h = Shell("C:\Command.com /c C:\Compiler.bat", vbHide)
'Wait 5 seconds for DOS window to finish
tTimeout = Timer
While (Timer - tTimeout) < 5
DoEvents
Wend
If Len(Dir("C:\~Results.txt")) Then
iFile = FreeFile
Open "C:\~Results.txt" For Input As iFile
rtfMain.Text = Input(LOF(iFile), iFile)
Close iFile
Else
rtfMain.Text = "Operation Timed Out."
End If
Now, usually with DOS based programs you can use the '>' character to port the data from the program into a text file, for example:
Code:
C:\Windows\Netstat.exe -a > C:\Netstat.log
Now, I have the code for getting the debug info from a text file that is created, but the problem is that the Java Compiler (Javac.exe) isnt giving any info away when i want it to port to a file! Bah.
I've looked all over Sun's Web Site for more information on this, but i cant find any info. If you can offer any help or links on where to find information about getting around this then please post. Thanks.
Later
REM
"Innovate, don't immitate."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|