[Q] Command line session/ Java debugging

PhiHo Hoang phiho.hoang at rogers.com
Sat Feb 9 19:53:56 UTC 2002


Hi Hannes,

	I guess WinExec/CreateProcess and FFI would do what you want.
Caveat, I have not tried it myself.

	Cheers,

	PhiHo.

WinExec
The WinExec function runs the specified application. 

Note  This function is provided only for compatibility with 16-bit
Windows. Win32-based applications should use the CreateProcess function.


UINT WinExec(
  LPCSTR lpCmdLine,  // command line
  UINT uCmdShow      // window style
);


CreateProcess
The CreateProcess function creates a new process and its primary thread.
The new process runs the specified executable file. 

To create a process that runs in a different security context, use the
CreateProcessAsUser or CreateProcessWithLogonW function. 

BOOL CreateProcess(
  LPCTSTR lpApplicationName,                 // name of executable
module
  LPTSTR lpCommandLine,                      // command line string
  LPSECURITY_ATTRIBUTES lpProcessAttributes, // SD
  LPSECURITY_ATTRIBUTES lpThreadAttributes,  // SD
  BOOL bInheritHandles,                      // handle inheritance
option
  DWORD dwCreationFlags,                     // creation flags
  LPVOID lpEnvironment,                      // new environment block
  LPCTSTR lpCurrentDirectory,                // current directory name
  LPSTARTUPINFO lpStartupInfo,               // startup information
  LPPROCESS_INFORMATION lpProcessInformation // process information
);

-----Original Message-----
From: squeak-dev-admin at lists.squeakfoundation.org
[mailto:squeak-dev-admin at lists.squeakfoundation.org] On Behalf Of Hannes
Hirzel
Sent: Saturday, February 09, 2002 7:22 AM
To: squeak-dev at lists.squeakfoundation.org
Subject: [Q] Command line session/ Java debugging


Hi

Is there something like OSProcesses or some code with FFI that I can
open a DOS-box under Windows and open a session with a command line tool
like a Java debugger.

I'm asking this because I'd like to check if something like debugging
Java programs from within Squeak is possible. 

What I'm looking for are the implementation possibilites for the
following:

- edit Java programs from within Squeak (an editor could easily be
  based on a Workspace; I can build nice browsing possibilities)
- run javac
- run a debugging session: set breakpoints and collect information 
  on running Java programs.

Does anybody have some ideas (even partial thoughts)?

Note: Why Windows? Answer: Because many people use it and it is not
feasable to install Linux everywhere. However a Linux-only solution
would be fine as well for the moment.


Thanks for your suggestions in advance.

Hannes Hirzel





More information about the Squeak-dev mailing list