title: Conflict with xlsx package and choose.files
body: <p>I'm having a strange problem with loading the xlsx package and using choose.files.  </p>
  
  <p>This problem began as soon as I updated RStudio to the newest version (v0.97.237).  If I start RStudio and then load xlsx (i.e. <code>library(xlsx)</code>) the package loads just fine.  However, if I then try and use <code>choose.files()</code>, RStudio freezes up (actually it continually runs and can't be closed without ending it with Win7 task manager).  If I start RStudio and use choose.files first, it works just fine.  If I then run the <code>library(xlsx)</code> line, the xlsx package won't load.  It gives the error below.</p>
  
  <p>I've tried reinstalling the xlsx package (along with xlsxjars and rJava), but that didn't work.  Neither did reinstalling Java.  </p>
  
  <p>Any suggestions?  I'm using R v2.15.2.</p>
  
  <pre><code>library(xlsx)  
  Loading required package: xlsxjars  
  Loading required package: rJava  
  Error occurred during initialization of VM  
  Could not reserve enough space for object heap  
  Error : .onLoad failed in loadNamespace() for 'xlsxjars', details:  
    call: .jinit()  
    error: Cannot create Java virtual machine (-4)  
  Error: package ‘xlsxjars’ could not be loaded  
  </code></pre>
  
  <p>EDIT:
  Here's the problem.  Sorry for any confusion.  When I enter this:</p>
  
  <pre><code>filename&lt;-file.choose() #select file
  library(xlsx)
  mydata&lt;-read.xlsx(filename,1) #load datafile
  </code></pre>
  
  <p>I can successfully select the file name, but the xlsx package fails to load so I can't open the data file.  I get the error above.  However, if I run this instead (after I've closed and restarted RStudio):</p>
  
  <pre><code>library(xlsx)
  filename&lt;-file.choose() #select file
  mydata&lt;-read.xlsx(filename,1) #load datafile
  </code></pre>
  
  <p>The xlsx package loads properly, but <code>file.choose</code> causes R to run indefinitely so the script freezes and I can't load my file.  This is also the case using <code>choose.files()</code>. I have no idea why those two things (xlsx, and <code>file.choose</code>/<code>choose.files</code>) would be conflicting but it appears that they are since I can only use one or the other depending on which one I use first.  </p>
  
  <p>EDIT 2: 
  I've tried this on a different computer (same OS, same versions of R, RStudio, and Java) and I get the same problem.</p>
  
  <p>EDIT 3:
  I converted back to RStudio v0.97.90 and the problem went away.  I guess it is an RStudio problem.</p>