JavaA
JavaA

Reputation: 37

Matlab not able to import from jar in javaclasspath.txt

I add C:/example/myPackage.jar to my javaclasspath.txt. The file shows up at the end of the javaclasspath output. However, when I attempt to import com.example.*, my subsequent methodsview fails. When I javaaddpath('C:/example/myPackage.jar'), I get a warning that it is "already specified on static java path", but then my import and subsequent methodsview works without issue.

I need my jar loaded statically. How can I fix this?

Upvotes: 1

Views: 85

Answers (1)

JavaA
JavaA

Reputation: 37

The answer ended up being a computer restart. Matlab may not have closed entirely and did not load static jars correctly.

Upvotes: 0

Related Questions