Quantcast

Documentation Center

  • Trial Software
  • Product Updates

javarmpath

Remove entries from dynamic Java class path

Syntax

  • javarmpath(dpath1,...,dpathN) example

Description

example

javarmpath(dpath1,...,dpathN) removes one or more files or folders from the current dynamic class path.

Examples

expand all

Remove Folder from Dynamic Path

In order to preserve the state of the dynamic path on your system, this example first adds folders to the path, then removes one of these folders.

Create a variable that points to the MATLAB® examples folder.

expath = fullfile(matlabroot,'extern','examples')
expath =

C:\Program Files\MATLAB\R2012b\extern\examples

The path reflects the folder to your MATLAB installation.

Add two folders to the path.

javaclasspath({...
   expath,...
   'http://www.example.com'})
javaclasspath('-dynamic')
		DYNAMIC JAVA PATH

	C:\Program Files\MATLAB\R2012b\extern\examples
	http://www.example.com

The output displays these new folders on your existing path.

Remove one folder.

javarmpath(expath)
javaclasspath('-dynamic')
		DYNAMIC JAVA PATH

	http://www.example.com

The path no longer contains the examples folder.

Input Arguments

expand all

dpath1,...,dpathN — Folders or JAR filesstring

Folders or JAR files, specified as strings, to remove from path.

Data Types: char

More About

expand all

Tips

  • MATLAB calls the clear java command whenever you change the dynamic path. This command clears the definitions of all Java® classes defined by files on the dynamic class path, removes all global variables and variables from the base workspace, and removes all compiled scripts, functions, and MEX-functions from memory.

See Also

Functions

Was this topic helpful?