Brooks said:
I know of two off the top of my head not written by Sun. Workbrain is a
payroll system my employer is currently implementing which is written in
Java. "Chrome" is a FPS game written in Java. And there is LimeWire
which claims to be the fastest file sharing program available.
And if you count applications written by Sun, "StarOffice" isn't all
that bad.
Sun didn't write StarOffice, nor is it written in Java:
#ifdef PRODUCT
#error Wer fummelt denn an den makefiles rum?
#endif
#pragma hdrstop
#include "dbg_lay.hxx"
#ifndef _STREAM_HXX //autogen
#include <tools/stream.hxx>
#endif
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_USHORTS
#define _SVSTDARR_USHORTSSORT
#define _SVSTDARR_LONGS
#include <svtools/svstdarr.hxx>
#endif
#include <stdio.h>
#include "frame.hxx"
#include "layfrm.hxx"
#include "flyfrm.hxx"
#include "txtfrm.hxx"
#include "ndtxt.hxx"
#include "dflyobj.hxx"
#ifndef _FNTCACHE_HXX
#include <fntcache.hxx>
#endif
// OD 2004-05-24 #i28701#
#ifndef _SORTEDOBJS_HXX
#include <sortedobjs.hxx>
#endif
ULONG SwProtocol::nRecord = 0;
SwImplProtocol* SwProtocol:

Impl = NULL;
ULONG lcl_GetFrameId( const SwFrm* pFrm )
{
#ifndef PRODUCT
static BOOL bFrameId = FALSE;
if( bFrameId )
return pFrm->GetFrmId();
#endif
if( pFrm && pFrm->IsTxtFrm() )
return ((SwTxtFrm*)pFrm)->GetTxtNode()->GetIndex();
return 0;
}
class SwImplProtocol
{
SvFileStream *pStream; // Ausgabestream
SvUShortsSort *pFrmIds; // welche FrmIds sollen aufgezeichnet werden
( NULL == alle )
SvLongs *pVar; // Variables
ByteString aLayer; // Einrueckung der Ausgabe (" " pro
Start/End)
USHORT nTypes; // welche Typen sollen aufgezeichnet werden
USHORT nLineCount; // Ausgegebene Zeilen
USHORT nMaxLines; // Maximal auszugebende Zeilen
BYTE nInitFile; // Bereich (FrmId,FrmType,Record) beim Einlesen der
INI-Datei
BYTE nTestMode; // Special fuer Testformatierung, es wird ggf. nur
// innerhalb einer Testformatierung aufgezeichnet.
void _Record( const SwFrm* pFrm, ULONG nFunction, ULONG nAct, void*
pParam );
BOOL NewStream();
void CheckLine( ByteString& rLine );
void SectFunc( ByteString &rOut, const SwFrm* pFrm, ULONG nAct, void*
pParam );
public:
SwImplProtocol();
~SwImplProtocol();
// Aufzeichnen
void Record( const SwFrm* pFrm, ULONG nFunction, ULONG nAct, void* pParam )
{ if( pStream ) _Record( pFrm, nFunction, nAct, pParam ); }
BOOL InsertFrm( USHORT nFrmId ); // FrmId aufnehmen zum Aufzeichnen
BOOL DeleteFrm( USHORT nFrmId ); // FrmId entfernen, diesen nicht mehr
Aufzeichnen
void FileInit(); // Auslesen der INI-Datei
void ChkStream() { if( !pStream ) NewStream(); }
void SnapShot( const SwFrm* pFrm, ULONG nFlags );
void GetVar( const USHORT nNo, long& rVar )
{ if( pVar && nNo < pVar->Count() ) rVar = (*pVar)[ nNo ]; }
};
/* -----------------11.01.99 10:43-------------------
* Durch das PROTOCOL_ENTER-Makro wird ein SwEnterLeave-Objekt erzeugt,
* wenn die aktuelle Funktion aufgezeichnet werden soll, wird ein
* SwImplEnterLeave-Objekt angelegt. Der Witz dabei ist, das der Ctor
* des Impl-Objekt am Anfang der Funktion und automatisch der Dtor beim
* Verlassen der Funktion gerufen wird. In der Basis-Implementierung ruft
* der Ctor lediglich ein PROTOCOL(..) mit ACT_START und im Dtor ein
* PROTOCOL(..) mit ACT_END.
* Es lassen sich Ableitungen der Klasse bilden, um z.B. beim Verlassen
* einer Funktion Groessenaenderungen des Frames zu dokumentieren u.v.a.m.
* Dazu braucht dann nur noch in SwEnterLeave::Ctor(...) die gewuenschte
* SwImplEnterLeave-Klasse angelegt zu werden.
*
* --------------------------------------------------*/
class SwImplEnterLeave
{
protected:
const SwFrm* pFrm; // Der Frame,
ULONG nFunction, nAction; // die Funktion, ggf. die Aktion
void* pParam; // und weitere Parameter
public:
SwImplEnterLeave( const SwFrm* pF, ULONG nFunct, ULONG nAct, void* pPar )
: pFrm( pF ), nFunction( nFunct ), nAction( nAct ), pParam( pPar ) {}
virtual void Enter(); // Ausgabe beim Eintritt
virtual void Leave(); // Ausgabe beim Verlassen
};
class SwSizeEnterLeave : public SwImplEnterLeave
{
long nFrmHeight;
public:
SwSizeEnterLeave( const SwFrm* pF, ULONG nFunct, ULONG nAct, void* pPar )
: SwImplEnterLeave( pF, nFunct, nAct, pPar ),
nFrmHeight( pF->Frm().Height() ) {}
virtual void Leave(); // Ausgabe der Groessenaenderung
};
class SwUpperEnterLeave : public SwImplEnterLeave
{
USHORT nFrmId;
public:
SwUpperEnterLeave( const SwFrm* pF, ULONG nFunct, ULONG nAct, void* pPar )
: SwImplEnterLeave( pF, nFunct, nAct, pPar ), nFrmId( 0 ) {}
virtual void Enter(); // Ausgabe
virtual void Leave(); // Ausgabe der FrmId des Uppers
};
class SwFrmChangesLeave : public SwImplEnterLeave
{
SwRect aFrm;
public:
SwFrmChangesLeave( const SwFrm* pF, ULONG nFunct, ULONG nAct, void* pPar )
: SwImplEnterLeave( pF, nFunct, nAct, pPar ), aFrm( pF->Frm() ) {}
virtual void Enter(); // keine Ausgabe
virtual void Leave(); // Ausgabe bei Aenderung der Frm-Area
};
void SwProtocol::Record( const SwFrm* pFrm, ULONG nFunction, ULONG nAct,
void* pParam )
{
if( Start() )
{ // Hier landen wir, wenn im Debugger SwProtocol::nRecord mit
PROT_INIT(0x1) oderiert wurde
BOOL bFinit = FALSE; // Dies bietet im Debugger die Moeglichkeit,
if( bFinit ) // die Aufzeichnung dieser Action zu beenden
{
nRecord &= ~nFunction; // Diese Funktion nicht mehr aufzeichnen
nRecord &= ~PROT_INIT; // PROT_INIT stets zuruecksetzen
return;
}
nRecord |= nFunction; // Aufzeichnung dieser Funktion freischalten
nRecord &= ~PROT_INIT; // PROT_INIT stets zuruecksetzen
if( pImpl )
pImpl->ChkStream();
}
if( !pImpl ) // Impl-Object anlegen, wenn noetig
pImpl = new SwImplProtocol();
pImpl->Record( pFrm, nFunction, nAct, pParam ); // ...und Aufzeichnen
}
// Die folgende Funktion wird beim Anziehen der Writer-DLL durch TxtInit(..)
aufgerufen
// und ermoeglicht dem Debuggenden Funktionen und/oder FrmIds freizuschalten
OTOH:
BEA WebLogic is written in Java, and is used by a great many DoD sites.
http://www.bea.com/framework.jsp?CNT=index.htm&FP=/content/products