javaaddpath - Add entries to dynamic Java class path - MATLAB (original) (raw)

Main Content

Add entries to dynamic Java class path

Syntax

Description

javaaddpath([dpath](#btmhdhy-1-dpath)) adds one or more folders or Java® Archive (JAR) files to the beginning of the current dynamic class path. Use the dynamic path when developing and debugging your own Java classes.

The javaaddpath command clears the definitions of all Java classes defined by files on the dynamic class path.

example

javaaddpath([dpath](#btmhdhy-1-dpath),'-end') adds files or folders to the end of the path.

example

Examples

collapse all

Display the current dynamic path. The output reflects your configuration.

javaclasspath('-dynamic')

    DYNAMIC JAVA PATH

<empty>

Add the current folder.

Display the updated dynamic path. The output reflects your current folder.

javaaddpath('https://www.example.com','-end') p = javaclasspath

p = 'c:\work\Java' 'https://www.example.com'

Input Arguments

collapse all

Folder or JAR file, specified as a string, an array of strings, a character vector, or a cell array of character vectors to add to the dynamic path. When you add a folder to the path, MATLAB® includes all files in that folder as part of the path.

Data Types: char | cell

Limitations

Tips

Version History

Introduced before R2006a