Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Any help for JView problems

0 views
Skip to first unread message

Haresh Gujarathi

unread,
Apr 17, 1997, 3:00:00 AM4/17/97
to

My System
Windows95, MSJ++ 1.1
JVIEW.EXE MS commandline loader for JAVA, Version 4.79.1515

Problem 1.
I have written Java application, compiled with MSJ++1.1
I have to launch this application (lest call it MyApp.class) from a Win32
application.
So I do following
spawnl(P_WAIT, command line and arguments etc...);
The command line constructed is as follows
"c:\windows\JVIEW Myapp"

The JView interpreter launches MyApp class and works fine.
But while launching the applciation-class, it also displays a MS-DOS
console window.
HOW DO I SUPPRESS THIS CONSOLE WINDOW?
(Note I am using JVIEW.exe of Microsoft instead of JAVA.exe from Sun)

========================================================================

Problem 2.
To solve above proble I also tried to use 'CreateProcess()' function from
Win32.
-------------------------------------------------------
STARTUPINFO StartupInfo = {0};
StartupInfo.cb = sizeof(STARTUPINFO);
PROCESS_INFORMATION ProcessInfo;
// d:\\sunjava\\jdk1.1.1\\bin\\java.exe MyApp
if(CreateProcess("d:\\sunjava\\jdk1.1.1\\bin\\JVIEW.exe",
lpCommandLine, // "MyApp" // cmd lien args for jview.exe
NULL, // pointer to process security attributes
NULL, // pointer to thread security attributes
FALSE, // handle inheritance flag
0, // creation flags
NULL, //pointer to new environment block
NULL, // pointer to current directory name
&StartupInfo, &ProcessInfo))
{
WaitForSingleObject(ProcessInfo.hProcess, INFINITE);
/* Process has terminated */
}
else
{
/* Process could not be started */
}
-------------------------------------------------------
The CreateProcess() launches JVIEW.exe, but before executing MyApp class
there is GPF in JVIEW.exe
What is the proble?
(Note I am using JVIEW.exe of Microsoft instead of JAVA.exe from Sun)

========================================================================
Problem 3.

I have created a dialog class in my application.
class JavaMyDialogBox extends Dialog .
It has its event handling mechanism

public boolean action(Event event, Object obj)
{
if(event.target == Ok)
{
hide();
dispose();
return true;
}
return false;
}

Following behaviour is expected
Some piece of code instanciates this JavaMyDialogBox(Modal). It displays
dialog on screen.
When user press Ok button dialog box should close. And after that it
should execute further code.
code statement 1;
code statement 2;
.
.
dlg1 = new JavaMyDialogBox(); // create modal dialog
dlg1.show();
code statement 3;
code statement 4;
What happens is .....
A) If I am using Sun's Java.exe interpreter
Everything works fine.
B) If I am using Microsoft's JView.exe interpreter
The code displays dialogbox. Before waiting for user to interact with
dialog, i.e. close down the dialog,
it executes newxt piece of code, i.e.
code statement 3;
code statement 4; and so on.
So the Modal behaviour is not happening?

Any Help??????

Chris Cawsey

unread,
Apr 26, 1997, 3:00:00 AM4/26/97
to

HI comp.lang.java.machine

I think WJVIEW.EXE (shipped with ms JDK in your bin directory) should sort
you out.

Cheers

Chris Cawsey
c...@dlinkgrp.com


0 new messages