Maple für Professional
Maple für Akademiker
Maple für Studenten
Maple Personal Edition
Maple Player
Maple Player für iPad
MapleSim für Professional
MapleSim für Akademiker
Maple T.A. - Testen & beurteilen
Maple T.A. MAA Placement Test Suite
Möbius - Online-Courseware
Machine Design / Industrial Automation
Luft- und Raumfahrt
Fahrzeugtechnik
Robotics
Energiebranche
System Simulation and Analysis
Model development for HIL
Anlagenmodelle für den Regelungsentwurf
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematikausbildung
Technik
Allgemein- und berufsbildende Schulen
Testen und beurteilen
Studierende
Finanzmodelle
Betriebsforschung
Hochleistungsrechnen
Physik
Live-Webinare
Aufgezeichnete Webinare
Geplante Veranstaltungen
MaplePrimes
Maplesoft-Blog
Maplesoft-Mitgliedschaft
Maple Ambassador Program
MapleCloud
Technische Whitepapers
E-Mail Newsletters
Maple-Bücher
Math Matters
Anwendungs-Center
MapleSim Modell-Galerie
Anwenderberichte
Exploring Engineering Fundamentals
Lehrkonzepte mit Maple
Maplesoft Welcome-Center
Resource-Center für Lehrer
Help-Center für Studierende
Engine.restart - restart the kernel
Calling Sequence
void restart() throws MapleException
Description
The restart method causes the Maple session represented by the Engine object to clear its internal memory so that Maple acts (almost) as if just started.
Any Algebraic objects will have their dispose method called. These objects can no longer be used to reference the values they represented before restart was called.
The restart method of Engine performs the same function as the restart function in Maple.
In the event of an error, restart raises a MapleException.
Examples
import com.maplesoft.openmaple.*;
import com.maplesoft.externalcall.MapleException;
class Example
{
public static void main( String notused[] ) throws MapleException
String mapleArgs[];
Engine engine;
Numeric n;
List l;
RTable r;
mapleArgs = new String[1];
mapleArgs[0] = "java";
engine = new Engine( mapleArgs, new EngineCallBacksDefault(),
null, null );
n = engine.newNumeric( 1000 );
l = (List)engine.evaluate( "[1,2,3,4]:" );
r = (RTable)engine.evaluate( "Array( 1..10, 1..10 ):" );
engine.evaluate( "a := 10;" );
System.out.println( n.isDisposed() );
System.out.println( l.isDisposed() );
System.out.println( r.isDisposed() );
engine.restart();
engine.evaluate( "a;" );
}
Executing this code produces the following output.
a := 10
false
a
true
See Also
ExternalCalling/Java/MapleException, OpenMaple, OpenMaple/Java/API, OpenMaple/Java/Engine, restart
Download Help Document