Failed to setup the Java classpath
133 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Christos Stefanakos
il 25 Gen 2022
Commentato: Peiqi Huang
il 13 Mar 2024
Hi, I just downloaded the latest version of nctoolbox from github. I am using MATLAB R2021b. When I tried "setup_nctoolbox", I got the following ERROR message : "Failed to setup the Java classpath".
I checked nctoolbox and I saw that in C:\Program Files\MATLAB\nctoolbox-master\java\ it contains the file "log4j-1.2.17.jar", and my MATLAB distribution contain in C:\Program Files\MATLAB\R2021b\java\jarext\ 3 files:
log4j-1.2-api-2.17.0.jar
log4j-api-2.17.0.jar
log4j-core-2.17.0.jar
I tried 2 actions:
1/ Delete the log4j-1.2.17.jar from nctoolbox-master\java\
2/ Copy the 3 jar files from R2021b path to nctoolbox path
In both cases, I got the same error message :(
Any suggestions how to fix this problem ?
0 Commenti
Risposta accettata
Fan Chen
il 24 Feb 2022
Hi, I just encountered the same problem. A quick fix is to disable(comment) the line:
root.addAppender(org.apache.log4j.ConsoleAppender(org.apache.log4j.PatternLayout('%d{ISO8601} [%t] %-5p %c %x - %m%n')));
in the ...\nctoolbox-master\java\setup_nctoolbox_java.m file.
It seems to work fine after that, although I am not sure of any complications this could cause. Hope someone could provide a better solution.
9 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Java Package Integration in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!