Migration of java application from Windows to linux server
<p>I am trying to migrate a java application which consist of some graph charts from Windows to Linux but I am getting following the exception:</p>

<pre><code>    java.awt.HeadlessException:
    No X11 DISPLAY variable was set, but this program performed an operation which requires it.
    at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
    at java.awt.Window.&lt;init&gt;(Window.java:432)
    at java.awt.Frame.&lt;init&gt;(Frame.java:403)
    at java.awt.Frame.&lt;init&gt;(Frame.java:368)
    at javachart.servlet.Bean.makeURLImage(Unknown Source)
    at javachart.applet.ParameterParser.makeURLImage(Unknown Source)
    at javachart.applet.ParameterParser.populateGc(Unknown Source)
    at javachart.applet.ParameterParser.getDatasetPropertiesFromParameters(Unknown Source)
    at javachart.applet.ParameterParser.getDatasetParameters(Unknown Source)
    at javachart.applet.ParameterParser.getDataset(Unknown Source)
    at javachart.applet.ParameterParser.getDatasets(Unknown Source)
    at javachart.applet.ParameterParser.getOptions(Unknown Source)
    at javachart.servlet.Bean.getOptions(Unknown Source)
    at javachart.servlet.labelLineApp.init(Unknown Source)
    at javachart.servlet.Bean.buildChart(Unknown Source)
    at javachart.servlet.Bean.generate(Unknown Source)
    at javachart.servlet.Bean.getFileName(Unknown Source)
    at org.apache.jsp.www.SaveHtml.chartByHotelSNS_jsp._jspService(chartByHotelSNS_jsp.java:676)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:662)
</code></pre>

<p>I also tried with setting the Display environment variable through Putty but that also didn't work.<br>
Can anyone tell me where exactly the problem is?<br>
Is it in the application or linux side?  </p>
