Running examples in ‘phyloclim-Ex.R’ failed
The error most likely occurred in:

> ### Name: hypothesis.testing
> ### Title: Niche Equivalency and Background Similarity Test
> ### Aliases: niche.equivalency.test niche.identity.test identity.test
> ###   bg.similarity.test print.ntest plot.ntest
> 
> ### ** Examples
> 
> # path to MAXENT
> # --------------
> maxent.exe <- paste(system.file(package="dismo"), 
+ "/java/maxent.jar", sep = "")
> 
> # a data frame of coordinates where two species 
> # have been detected ('presence points') and
> # a raster stack of environmental covariables
> # --------------------------------------
> species <- c("enneaphylla", "laciniata")
> data(sites)
> samples <- sites[grep(paste(species, collapse = "|"), sites$spec), ]
> data.path <- system.file("extdata", package = "phyloclim")
> preds <- list.files(path = data.path, pattern = "[.]asc")
> preds <- paste(data.path, preds, sep = "/")
> preds <- stack(lapply(X = preds, FUN = raster))
> 
> # testing against 9 permutations of the data
> # -------------------------------------------
> reps <- 9
> 
> # run hypothesis tests
> # --------------------
> if (file.exists(maxent.exe)){
+   net <- niche.equivalency.test(samples, preds, reps, maxent.exe)
+   net; plot(net)
+   bst <- bg.similarity.test(samples, preds, reps, app = maxent.exe)
+   bst; plot(bst)
+ } else {
+   message("get a copy of MAXENT (see Details)")
+ }
Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException
	at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
	at java.awt.Window.<init>(Window.java:536)
	at java.awt.Frame.<init>(Frame.java:420)
	at javax.swing.JFrame.<init>(JFrame.java:233)
	at density.MaxEnt.createAndShowGUI(MaxEnt.java:65)
	at density.MaxEnt.access$000(MaxEnt.java:30)
	at density.MaxEnt$1.run(MaxEnt.java:51)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Warning in file(fname, "r") :
  cannot open file 'R.phyloclim.temp/out/enneaphylla_proj.asc': No such file or directory
Error in file(fname, "r") : cannot open the connection
Calls: niche.equivalency.test -> read.asciigrid -> file
Execution halted