Calling External Programs

Mathematica immediately allows you to call both standalone programs and individual functions or methods within running programs. Mathematica's architecture allows external functionality to be represented in a symbolic form that can immediately be manipulated within Mathematica—and that often makes access to external functionality from within Mathematica more convenient even than from its own native environment.

ReferenceReference

Run run an external command-line program (!prog to run as a shell escape)

RunThrough feed standard input to an external program and capture output

Compile automatically generate C code and link back to Mathematica

Import ▪ Export ▪ Splice ▪ CForm ▪ FortranForm

SystemOpen open a file, URL, or other target on your computer system

SendMail send any expression, graphic, etc. by email

Wolfram Library Link »

LibraryFunctionLoad load a function from a dynamic library into Mathematica

LibraryFunction a function that calls into a dynamic library

LibraryFunctionInformation ▪ LibraryFunctionUnload ▪ LibraryLoad ▪ LibraryUnload ▪ FindLibrary ▪ $LibraryPath ▪ ...

MathLink »

Install install a MathLink-installable external program

LinkPatterns find functions available in a running MathLink program

mprep externally prepare a MathLink-installable C or C++ program

LinkRead ▪ LinkWrite ▪ LinkLaunch ▪ ...

J/Link »

JavaNew create a new Java object in any specified class

LoadJavaClass ▪ MakeJavaObject ▪ JavaBlock ▪ JavaShow ▪ ...

.NET/Link »

NETNew create a new .NET object of any specified type

LoadNETType ▪ NETTypeInfo ▪ MakeNETObject ▪ NETBlock ▪ ...

Web Services »

InstallService install web services from a WSDL description

GPU Computing »

CUDAFunctionLoad ▪ OpenCLFunctionLoad ▪ ...

New to Mathematica? Find your learning path »
Have a question? Ask support »