title: Tricking Java Web Start About the Operating System
body: <p>I'm restoring an antique vehicle and for that I use the EPC (Electronic Parts Catalog) from Mercedes Benz.  (Membership is free, so those wanting to see the program I'm talking about can go <a href="https://epc.startekinfo.com/epc/login.jsp" rel="nofollow">here</a> if they want to check it out.)  To get to the program, there's a sign in page, then another page with a link.  Clicking the link downloads a file called ewa-net.jnlp and it's launched with JavaWS.</p>
  
  <p>I used to use this program on my Linux system and it worked.  I remember I changed either the osname variable in my /etc directory or I changed the OS in Firefox before I ran the program and changed it back when I was done, so it wouldn't effect any other Java program.  The EPC program worked just fine under those conditions.  I strongly suspect the reason for requiring Windows is more of a defensive move (for example, to avoid liability or to avoid having to fix bugs on multiple OSes).</p>
  
  <p>I'm aware that making changes like this can mess up a program, but this is used only to go through the parts catalog and to examine part diagrams, which helps in determining part locations or placements or helps the parts guys because I can help them find the page a part is on quickly if I've done my research before calling them.  I'm not saving data or modifying anything on a disk drive or elsewhere (although I do sometimes take a screenshot and print it out).</p>
  
  <p>I cannot download ewa-net.jnlp and just run it whenever I want. I have to go through the HTML login page, then run the program from their site, so I can't just run the program from the command line or something like that.  (Unless that replaces running it with JavaWS right after I log in.)</p>
  
  <p>Now I'm using an iMac, using Snow Leopard.  I tried finding and changing the osname on here, and it didn't work.</p>
  
  <p>Right now whenever I need to use the EPC, I have to start up a Windows VM in Parallels and about the only reason I use that Windows VM is for this program.</p>
  
  <p>Is there some way I can trick Java so when I run this program, it thinks it's on Windows?  I'm aware this could crash, but since the catalog worked fine on Linux, I want to at least try it on OS X.</p>
  
  <p>I thought maybe I could use a wrapper script that runs JavaWS, but I'm not quite sure what to do and, as I said previously, changing the osname setting didn't seem to work.</p>
  
  <p>Is there anything that might help me trick this program into thinking it's on Windows?</p>