MD-Anderson-Bioinformatics / NGCHM-R

An R library for creating Next-Generation Clustered Heat Maps (NG-CHM)
http://bioinformatics.mdanderson.org/main/NG-CHM-V2:Overview
7 stars 3 forks source link

Run java headless in system2() #55

Closed marohrdanz closed 1 month ago

marohrdanz commented 1 month ago

To address #51, I had been sending an empty DISPLAY env in system2() calls to java. But two things: 1. my syntax was wrong (only Windows complains about it; correct syntax is env = c(DISPLAY = "")), and 2. it is cleaner to instead run java headless (as pointed out by @ChrisWakefield).

This pull request addresses this: Instead of futzing with 'DISPLAY', we use the flag -Djava.awt.headless=true in the call to java.

This pull request was motivated by and addresses showstopper issue #54.

I tested these changes on

  1. Windows
  2. Linux (RedHat)
  3. MacOS
  4. the ngchm/rstudio-ngchm:latest docker container

and ran

  1. R CMD CHECK --as-cran
  2. Uploaded to winbuilder

All these checks passed.