• 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)
 

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)
 

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)
 
- Protected Attributes inherited from KProcess
KProcessPrivate *const d_ptr
 

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-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:23 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • 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