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

KHTML

KJavaProcess Class Reference

#include <kjavaprocess.h>

Inheritance diagram for KJavaProcess:

Inheritance graph
[legend]

List of all members.


Signals

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

Public Member Functions

void flushBuffers ()
bool isRunning ()
 KJavaProcess (QObject *parent=0)
void send (char cmd_code, const QStringList &args, const QByteArray &data)
void send (char cmd_code, const QStringList &args)
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 ()
virtual ~KJavaProcess ()

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)

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 (  )  [protected, virtual]

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 (  )  [protected, virtual]

Definition at line 239 of file kjavaprocess.cpp.

void KJavaProcess::received ( const QByteArray &   )  [signal]

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::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::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 (  )  [protected, slot]

This slot is called when the Java Process exited.

Definition at line 283 of file kjavaprocess.cpp.

void KJavaProcess::slotReceivedData (  )  [protected, slot]

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

KHTML

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal