• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KHTML

Signals | Public Member Functions | Protected Slots | Protected Member Functions | List of all members
KJavaProcess Class Reference

#include <kjavaprocess.h>

Inheritance diagram for KJavaProcess:
Inheritance graph
[legend]

Signals

void exited (int status)
 
void received (const QByteArray &)
 

Public Member Functions

 KJavaProcess (QObject *parent=0)
 
virtual ~KJavaProcess ()
 
void flushBuffers ()
 
bool isRunning ()
 
void send (char cmd_code, const QStringList &args)
 
void send (char cmd_code, const QStringList &args, const QByteArray &data)
 
void setClassArgs (const QString &classArgs)
 
void setClasspath (const QString &classpath)
 
void setExtraArgs (const QString &args)
 
void setJVMPath (const QString &path)
 
void setMainClass (const QString &clazzName)
 
void setSystemProperty (const QString &name, const QString &value)
 
bool startJava ()
 
void stopJava ()
 
- Public Member Functions inherited from KProcess
 KProcess (QObject *parent=0)
 
virtual ~KProcess ()
 
void clearEnvironment ()
 
void clearProgram ()
 
int execute (int msecs=-1)
 
KProcess & operator<< (const QString &arg)
 
KProcess & operator<< (const QStringList &args)
 
OutputChannelMode outputChannelMode () const
 
int pid () const
 
QStringList program () const
 
void setEnv (const QString &name, const QString &value, bool overwrite=true)
 
void setNextOpenMode (QIODevice::OpenMode mode)
 
void setOutputChannelMode (OutputChannelMode mode)
 
void setProgram (const QString &exe, const QStringList &args=QStringList())
 
void setProgram (const QStringList &argv)
 
void setShellCommand (const QString &cmd)
 
void start ()
 
int startDetached ()
 
void unsetEnv (const QString &name)
 
- Public Member Functions inherited from QProcess
 QProcess (QObject *parent)
 
virtual  ~QProcess ()
 
virtual bool atEnd () const
 
virtual qint64 bytesAvailable () const
 
virtual qint64 bytesToWrite () const
 
virtual bool canReadLine () const
 
virtual void close ()
 
void closeReadChannel (ProcessChannel channel)
 
void closeWriteChannel ()
 
QStringList environment () const
 
void error (QProcess::ProcessError error)
 
QProcess::ProcessError error () const
 
int exitCode () const
 
QProcess::ExitStatus exitStatus () const
 
void finished (int exitCode, QProcess::ExitStatus exitStatus)
 
void finished (int exitCode)
 
virtual bool isSequential () const
 
void kill ()
 
QString nativeArguments () const
 
Q_PID pid () const
 
ProcessChannelMode processChannelMode () const
 
QProcessEnvironment processEnvironment () const
 
QByteArray readAllStandardError ()
 
QByteArray readAllStandardOutput ()
 
ProcessChannel readChannel () const
 
ProcessChannelMode readChannelMode () const
 
void readyReadStandardError ()
 
void readyReadStandardOutput ()
 
void setEnvironment (const QStringList &environment)
 
void setNativeArguments (const QString &arguments)
 
void setProcessChannelMode (ProcessChannelMode mode)
 
void setProcessEnvironment (const QProcessEnvironment &environment)
 
void setReadChannel (ProcessChannel channel)
 
void setReadChannelMode (ProcessChannelMode mode)
 
void setStandardErrorFile (const QString &fileName, QFlags< QIODevice::OpenModeFlag > mode)
 
void setStandardInputFile (const QString &fileName)
 
void setStandardOutputFile (const QString &fileName, QFlags< QIODevice::OpenModeFlag > mode)
 
void setStandardOutputProcess (QProcess *destination)
 
void setWorkingDirectory (const QString &dir)
 
void start (const QString &program, const QStringList &arguments, QFlags< QIODevice::OpenModeFlag > mode)
 
void start (const QString &program, QFlags< QIODevice::OpenModeFlag > mode)
 
void started ()
 
QProcess::ProcessState state () const
 
void stateChanged (QProcess::ProcessState newState)
 
void terminate ()
 
virtual bool waitForBytesWritten (int msecs)
 
bool waitForFinished (int msecs)
 
virtual bool waitForReadyRead (int msecs)
 
bool waitForStarted (int msecs)
 
QString workingDirectory () const
 
- Public Member Functions inherited from QIODevice
 QIODevice ()
 
 QIODevice (QObject *parent)
 
virtual  ~QIODevice ()
 
void aboutToClose ()
 
Offset at () const
 
bool at (Offset offset)
 
void bytesWritten (qint64 bytes)
 
QString errorString () const
 
int flags () const
 
int getch ()
 
bool getChar (char *c)
 
bool isAsynchronous () const
 
bool isBuffered () const
 
bool isCombinedAccess () const
 
bool isDirectAccess () const
 
bool isInactive () const
 
bool isOpen () const
 
bool isRaw () const
 
bool isReadable () const
 
bool isSequentialAccess () const
 
bool isSynchronous () const
 
bool isTextModeEnabled () const
 
bool isTranslated () const
 
bool isWritable () const
 
int mode () const
 
virtual bool open (QFlags< QIODevice::OpenModeFlag > mode)
 
OpenMode openMode () const
 
qint64 peek (char *data, qint64 maxSize)
 
QByteArray peek (qint64 maxSize)
 
virtual qint64 pos () const
 
int putch (int ch)
 
bool putChar (char c)
 
qint64 read (char *data, qint64 maxSize)
 
QByteArray read (qint64 maxSize)
 
QByteArray readAll ()
 
qint64 readBlock (char *data, quint64 size)
 
void readChannelFinished ()
 
QByteArray readLine (qint64 maxSize)
 
qint64 readLine (char *data, qint64 maxSize)
 
void readyRead ()
 
virtual bool reset ()
 
void resetStatus ()
 
virtual bool seek (qint64 pos)
 
void setTextModeEnabled (bool enabled)
 
virtual qint64 size () const
 
int state () const
 
Status status () const
 
int ungetch (int ch)
 
void ungetChar (char c)
 
qint64 write (const char *data)
 
qint64 write (const char *data, qint64 maxSize)
 
qint64 write (const QByteArray &byteArray)
 
qint64 writeBlock (const QByteArray &data)
 
qint64 writeBlock (const char *data, quint64 size)
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
 QObject (QObject *parent, const char *name)
 
virtual  ~QObject ()
 
bool blockSignals (bool block)
 
QObject * child (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
const char * className () const
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const QObject *receiver, const char *method)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QByteArray > dynamicPropertyNames () const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
T findChild (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QList< T > findChildren (const QString &name) const
 
bool inherits (const char *className) const
 
void insertChild (QObject *object)
 
void installEventFilter (QObject *filterObj)
 
bool isA (const char *className) const
 
bool isWidgetType () const
 
void killTimer (int id)
 
virtual const QMetaObject * metaObject () const
 
void moveToThread (QThread *targetThread)
 
const char * name () const
 
const char * name (const char *defaultName) const
 
QString objectName () const
 
QObject * parent () const
 
QVariant property (const char *name) const
 
void removeChild (QObject *object)
 
void removeEventFilter (QObject *obj)
 
void setName (const char *name)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval)
 
QThread * thread () const
 

Protected Slots

void slotExited ()
 
void slotReceivedData ()
 

Protected Member Functions

QByteArray addArgs (char cmd_code, const QStringList &args)
 
virtual bool invokeJVM ()
 
virtual void killJVM ()
 
void storeSize (QByteArray *buff)
 
- Protected Member Functions inherited from KProcess
 KProcess (KProcessPrivate *d, QObject *parent)
 
- Protected Member Functions inherited from QProcess
virtual qint64 readData (char *data, qint64 maxlen)
 
void setProcessState (ProcessState state)
 
virtual void setupChildProcess ()
 
virtual qint64 writeData (const char *data, qint64 len)
 
- Protected Member Functions inherited from QIODevice
virtual qint64 readData (char *data, qint64 maxSize)=0
 
virtual qint64 readLineData (char *data, qint64 maxSize)
 
void setErrorString (const QString &str)
 
void setOpenMode (QFlags< QIODevice::OpenModeFlag > openMode)
 
virtual qint64 writeData (const char *data, qint64 maxSize)=0
 
- Protected Member Functions inherited from QObject
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const char *signal)
 
int receivers (const char *signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 

Additional Inherited Members

- Public Types inherited from KProcess
enum  OutputChannelMode
 
- Static Public Member Functions inherited from KProcess
static int execute (const QString &exe, const QStringList &args=QStringList(), int msecs=-1)
 
static int execute (const QStringList &argv, int msecs=-1)
 
static int startDetached (const QString &exe, const QStringList &args=QStringList())
 
static int startDetached (const QStringList &argv)
 
- Static Public Member Functions inherited from QProcess
int execute (const QString &program, const QStringList &arguments)
 
int execute (const QString &program)
 
bool startDetached (const QString &program)
 
bool startDetached (const QString &program, const QStringList &arguments)
 
bool startDetached (const QString &program, const QStringList &arguments, const QString &workingDirectory, qint64 *pid)
 
QStringList systemEnvironment ()
 
- Static Public Member Functions inherited from QObject
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Public Attributes inherited from QIODevice
typedef Offset
 
typedef OpenMode
 
typedef Status
 
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Protected Attributes inherited from KProcess
KProcessPrivate *const d_ptr
 
- Properties inherited from QObject
 objectName
 

Detailed Description

Definition at line 41 of file kjavaprocess.h.

Constructor & Destructor Documentation

KJavaProcess::KJavaProcess ( QObject *  parent = 0)

Creates a process object, the process is NOT invoked at this point.

You should first set the process's parameters, and then call startJava.

Definition at line 45 of file kjavaprocess.cpp.

KJavaProcess::~KJavaProcess ( )
virtual

Definition at line 61 of file kjavaprocess.cpp.

Member Function Documentation

QByteArray KJavaProcess::addArgs ( char  cmd_code,
const QStringList &  args 
)
protected

Definition at line 118 of file kjavaprocess.cpp.

void KJavaProcess::exited ( int  status)
signal
void KJavaProcess::flushBuffers ( )

Writes all pending data to JVM.

bool KJavaProcess::invokeJVM ( )
protectedvirtual

Definition at line 190 of file kjavaprocess.cpp.

bool KJavaProcess::isRunning ( )

Returns the status of the java Process- true if it's ok, false if it has died.

It calls K3Process::isRunning()

Definition at line 71 of file kjavaprocess.cpp.

void KJavaProcess::killJVM ( )
protectedvirtual

Definition at line 239 of file kjavaprocess.cpp.

void KJavaProcess::received ( const QByteArray &  )
signal
void KJavaProcess::send ( char  cmd_code,
const QStringList &  args 
)

Sends a command to the KJAS Applet Server by building a QByteArray out of the data, and then writes it standard out.

Definition at line 164 of file kjavaprocess.cpp.

void KJavaProcess::send ( char  cmd_code,
const QStringList &  args,
const QByteArray &  data 
)

Sends a command to the KJAS Applet Server by building a QByteArray out of the data, and then writes it standard out.

It adds each QString in the arg list, and then adds the data array.

Definition at line 175 of file kjavaprocess.cpp.

void KJavaProcess::setClassArgs ( const QString &  classArgs)

Arguments passed to the main class.

They will be very last in the java command line, after the main class.

Definition at line 112 of file kjavaprocess.cpp.

void KJavaProcess::setClasspath ( const QString &  classpath)

This will set the classpath the Java process will use.

It's used as a the -cp command line option. It adds every jar file stored in $KDEDIRS/share/apps/kjava/ to the classpath, and then adds the $CLASSPATH environmental variable. This allows users to simply drop the JSSE (Java Secure Sockets Extension classes into that directory without having to modify the jvm configuration files.

Definition at line 91 of file kjavaprocess.cpp.

void KJavaProcess::setExtraArgs ( const QString &  args)

Extra flags passed to the JVM.

Definition at line 107 of file kjavaprocess.cpp.

void KJavaProcess::setJVMPath ( const QString &  path)

Used to specify the path to the Java executable to be run.

Definition at line 86 of file kjavaprocess.cpp.

void KJavaProcess::setMainClass ( const QString &  clazzName)

The class to be called when startJava() is called.

Definition at line 102 of file kjavaprocess.cpp.

void KJavaProcess::setSystemProperty ( const QString &  name,
const QString &  value 
)

Set a property on the java command line as -Dname=value, or -Dname if value is QString().

For example, you could call setSystemProperty( "kjas.debug", "" ) to set the kjas.debug property.

Definition at line 96 of file kjavaprocess.cpp.

void KJavaProcess::slotExited ( )
protectedslot

This slot is called when the Java Process exited.

Definition at line 283 of file kjavaprocess.cpp.

void KJavaProcess::slotReceivedData ( )
protectedslot

This slot is called when the Java Process writes to standard out.

We then process the data from the file descriptor that is passed to us and send the command to the AppletServer

Definition at line 248 of file kjavaprocess.cpp.

bool KJavaProcess::startJava ( )

Invoke the JVM with the parameters that have been set.

The Java process will start after this call.

Definition at line 76 of file kjavaprocess.cpp.

void KJavaProcess::stopJava ( )

Stop the JVM (if it's running).

Definition at line 81 of file kjavaprocess.cpp.

void KJavaProcess::storeSize ( QByteArray *  buff)
protected

Definition at line 154 of file kjavaprocess.cpp.


The documentation for this class was generated from the following files:
  • kjavaprocess.h
  • kjavaprocess.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:26:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal