2

I am running maxent from R, in the package biomod2 and the following error appeared. I do not come from a technical background and wasn't sure why is this error happening. Is it a memory problem or someone said the java path is not set. But I followed the instructions to set maxent to run in R and also downloaded Java Platform, Standard Edition Development Kit and set a path for it as explained in this pdf: http://modata.ceoe.udel.edu/dev/dhaulsee/class_rcode/r_pkgmanuals/MAXENT4R_directions.pdf

I would be really grateful if you could help me understand this problem and any solution to it.

Thanks a lot

Error in file(file, "rt") : cannot open the connection
In addition: Warning messages:
1: running command 'java' had status 1 
2: running command 'java -mx512m -jar E:\bioclim_2.5min\model/maxent.jar environmentallayers
="rainfed/models/1432733200/m_47203134/Back_swd.csv" 
samplesfile="rainfed/models/1432733200/m_47203134/Sp_swd.csv" 
projectionlayers="rainfed/models/1432733200/m_47203134/Predictions/Pred_swd.csv" 
outputdirectory="rainfed/models/1432733200/rainfed_PA1_Full_MAXENT_outputs" 
outputformat=logistic  redoifexists visible=FALSE linear=TRUE quadratic=TRUE 
product=TRUE threshold=TRUE hinge=TRUE lq2lqptthreshold=80 l2lqthreshold=10 
hingethreshold=15 beta_threshold=-1 beta_categorical=-1 beta_lqp=-1 
beta_hinge=-1 defaultprevalence=0.5 autorun nowarnings notooltips 
noaddsamplestobackground' had status 1 
3: In file(file, "rt") :
 cannot open file 'rainfed/models/1432733200/rainfed_PA1_Full_MAXENT_outputs/rainfed_PA1_
Full_Pred_swd.csv': No such file or directory
Mark
  • 7,785
  • 2
  • 14
  • 34
user53020
  • 889
  • 2
  • 10
  • 33
  • 1
    I've just had exactly this problem. For me, all other models within `biomod2` are working, and MaxEnt runs okay from `dismo`. Did you manage to solve this problem? – Andrew Mar 01 '16 at 08:33

1 Answers1

2

I've just manage to solve this problem - it is a problem with the file path specified. For me, I had a space in one of the folder names which was not accepted in the path to the maxent.jar file. From looking at your error, it looks like it might be the two backslashes.

E:\bioclim_2.5min\model/maxent.jar

should probably read

E:/bioclim_2.5min/model/maxent.jar
Andrew
  • 516
  • 1
  • 6
  • 17
  • I have the same issue here, @Andrew ... did someone managed to deal with this problem? I don't have space in folder names... and I can't fix the backlashes... no matter which "lashes" I use, it automatically records backlashes.. – Thai Sep 28 '17 at 00:20