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

KHTML

  • sources
  • kde-4.14
  • kdelibs
  • khtml
  • java
kjavaprocess.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 
3 /* This file is part of the KDE project
4  *
5  * Copyright (C) 2000 Richard Moore <rich@kde.org>
6  * 2000 Wynn Wilkes <wynnw@caldera.com>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public License
19  * along with this library; see the file COPYING.LIB. If not, write to
20  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  * Boston, MA 02110-1301, USA.
22  */
23 
24 #ifndef KJAVAPROCESS_H
25 #define KJAVAPROCESS_H
26 
27 #include <kprocess.h>
28 
40 class KJavaProcessPrivate;
41 class KJavaProcess : public KProcess //QObject
42 {
43 Q_OBJECT
44 
45 public:
50  KJavaProcess( QObject *parent = 0 );
51  virtual ~KJavaProcess();
52 
57  bool startJava();
58 
62  void stopJava();
63 
68  bool isRunning();
69 
73  void setJVMPath( const QString& path );
74 
82  void setClasspath( const QString& classpath );
83 
88  void setSystemProperty( const QString& name, const QString& value );
89 
93  void setMainClass( const QString& clazzName );
94 
98  void setExtraArgs( const QString& args );
99 
104  void setClassArgs( const QString& classArgs );
105 
110  void send( char cmd_code, const QStringList& args );
111 
117  void send( char cmd_code, const QStringList& args, const QByteArray& data );
118 
122  void flushBuffers();
123 
124 protected Q_SLOTS:
130  void slotReceivedData();
134  void slotExited();
135 
136 protected:
137  virtual bool invokeJVM();
138  virtual void killJVM();
139 
140  QByteArray addArgs( char cmd_code, const QStringList& args );
141  void storeSize( QByteArray* buff );
142 
143 Q_SIGNALS:
144  void received( const QByteArray& );
145  void exited( int status );
146 
147 private:
148  KJavaProcessPrivate* const d;
149 
150 };
151 
152 #endif // KJAVAPROCESS_H
KJavaProcess::stopJava
void stopJava()
Stop the JVM (if it's running).
Definition: kjavaprocess.cpp:81
KProcess
KJavaProcess::startJava
bool startJava()
Invoke the JVM with the parameters that have been set.
Definition: kjavaprocess.cpp:76
QByteArray
KJavaProcess::flushBuffers
void flushBuffers()
Writes all pending data to JVM.
KJavaProcess::setMainClass
void setMainClass(const QString &clazzName)
The class to be called when startJava() is called.
Definition: kjavaprocess.cpp:102
KJavaProcess::storeSize
void storeSize(QByteArray *buff)
Definition: kjavaprocess.cpp:154
KJavaProcess::KJavaProcess
KJavaProcess(QObject *parent=0)
Creates a process object, the process is NOT invoked at this point.
Definition: kjavaprocess.cpp:45
KJavaProcess::received
void received(const QByteArray &)
KJavaProcess::slotReceivedData
void slotReceivedData()
This slot is called when the Java Process writes to standard out.
Definition: kjavaprocess.cpp:248
KJavaProcess::setSystemProperty
void setSystemProperty(const QString &name, const QString &value)
Set a property on the java command line as -Dname=value, or -Dname if value is QString().
Definition: kjavaprocess.cpp:96
QObject::name
const char * name() const
KJavaProcess::addArgs
QByteArray addArgs(char cmd_code, const QStringList &args)
Definition: kjavaprocess.cpp:118
kprocess.h
KJavaProcess::send
void 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: kjavaprocess.cpp:164
QObject
KJavaProcess::~KJavaProcess
virtual ~KJavaProcess()
Definition: kjavaprocess.cpp:61
QString
KJavaProcess::exited
void exited(int status)
QStringList
KJavaProcess::setClasspath
void setClasspath(const QString &classpath)
This will set the classpath the Java process will use.
Definition: kjavaprocess.cpp:91
KJavaProcess::isRunning
bool isRunning()
Returns the status of the java Process- true if it's ok, false if it has died.
Definition: kjavaprocess.cpp:71
QIODevice::status
Status status() const
KJavaProcess::setJVMPath
void setJVMPath(const QString &path)
Used to specify the path to the Java executable to be run.
Definition: kjavaprocess.cpp:86
QObject::parent
QObject * parent() const
KJavaProcess::setExtraArgs
void setExtraArgs(const QString &args)
Extra flags passed to the JVM.
Definition: kjavaprocess.cpp:107
KJavaProcess
Definition: kjavaprocess.h:41
KJavaProcess::setClassArgs
void setClassArgs(const QString &classArgs)
Arguments passed to the main class.
Definition: kjavaprocess.cpp:112
KJavaProcess::killJVM
virtual void killJVM()
Definition: kjavaprocess.cpp:239
KJavaProcess::invokeJVM
virtual bool invokeJVM()
Definition: kjavaprocess.cpp:190
KJavaProcess::slotExited
void slotExited()
This slot is called when the Java Process exited.
Definition: kjavaprocess.cpp:283
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:26:19 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