Setting Java ZWT.headless variable

I am creating graphics on the fly with the Oracle JVM in the database. I need to set the headless environment variable.
I found the command: -Djava.awt.headless=true
I can not find where this needs to be run.
Can this environment variable be set from the Java code?
I have this code from Sun which does not change the headless variable.
System.setProperty("java.awt.headless", "true");
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
boolean headless_check = ge.isHeadless();
if(headless_check)
htpPrint("<br/>headless<br/>");
else
htpPrint("<br/>not headless<br/>");
I am working with 11g and 10g.
Any help with this would be greatly appreciated.
Thanks,
Gregory
Message was edited by:
phillippio

Thanks Again Marcelo.
That set headless to true.
This, unfortunately did not fix issue.
I get the following error every time I try to create a BufferedImage in Java on the Database.
ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException
The image I am trying to create is from a JFreeChart object.
BufferedImage bufferedImage = chart.createBufferedImage(500, 300);
Like I stated earlier this works in my desktop environmet. With Java 1.4.
The Stack if you are interested:
start. org.jfree.chart.JFreeChart@68ecbb34 This is a title to end all titles. 1.5.0_10 sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1236)
sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:170)
sun.awt.FontConfiguration.(FontConfiguration.java:75)
oracle.aurora.awt.OracleFontConfiguration.(OracleFontConfiguration.java:33)
oracle.aurora.awt.OracleGraphicsEnvironment.createFontConfiguration(OracleGraphicsEnvironment.java:25)
sun.java2d.SunGraphicsEnvironment$1.run(SunGraphicsEnvironment.java:186)
java.security.AccessController.doPrivileged(Native Method)
sun.java2d.SunGraphicsEnvironment.(SunGraphicsEnvironment.java:94)
oracle.aurora.awt.OracleGraphicsEnvironment.(OracleGraphicsEnvironment.java:14)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:511)
java.lang.Class.newInstance0(Class.java:373)
java.lang.Class.newInstance(Class.java:326)
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1141)
org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1397)
org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1378)
org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1363)
LASER_REP_MH_EVENTS_BARGRAPH.buildGraph(LASER_MH_EVENTS_GRAPH_JV:135)
If you have any idea on running JFreeChart on the DB JVM I would like to hear them.
Thanks for your help.

Similar Messages

  • Code to set and destroy session variables in Java Server Pages(JSP)

    code to set and destroy session variables in Java Server Pages(JSP)
    we have use following statement to set session variable
    session.setAttribute("userClient",id);
    we have use following statement to destroy session variable
    session.setAttribute("userClient","");
    and
    the session.invalidate() is not working
    Plz. solve this probem

    code to set and destroy session variables in Java
    Server Pages(JSP)
    we have use following statement to set session
    variable
    session.setAttribute("userClient",id);
    we have use following statement to destroy session
    variable
    session.setAttribute("userClient","");Perhaps if you tried using
    session.setAttribute("userClient", null);
    or
    session.removeAttribute("userClient");
    and
    the session.invalidate() is not workingNot working how?
    >
    Plz. solve this probem

  • Setting up the windows variable

    Hello i need the first step, how do i set up my windows variable so i can conline my java programs? thanks

    Before running the J2EE SDK, you must set these environment variables:
    * J2EE_HOME - the directory where you installed this release.
    * JAVA_HOME - the directory where the Java 2 SDK Standard Edition is installed.
    * PATH - include the bin directory beneath the directory where you've installed this release.
    If you don't know how to set environment variables:
    right mouse click on my pc - properties - tab advanced - button environment variables.
    This should do it.

  • Setting a server wide variable at startup

    Anyone have a way to set a server wide variable (likely in
    the server scope) that gets set on server startup rather than in a
    specific page request via a cfset.
    What I would like to be able to do is set a variable external
    to any application that describes the servers role (ie.
    development, integration, staging, production) rather than
    hardcoding into the applications a test for server ip, name, etc.
    Thanks
    -Mike

    That's a new one. I can't think of anything internal to CF
    that would
    accomplish this.
    My first idea, assuming a windows world, you could do
    something in the
    services start that would call some resource that would set
    this for
    you. I have no idea how or know for sure this is possible.
    My second idea is what might be done in the Java
    underpinnings. Could
    something be done there.
    There are several xml files that are parsed at start up, but
    I have no
    idea how, if at all, extensible they are.

  • Find text from a file and set it as a variable in applescript?

    I am trying to build a script that sends me updates and notifications from cex.io. Please keep on reading below, so I may guide you until the point I have trouble with.
    The first simple script in this operation goes to cex.io's trading page for BTC/GHS. It records ands saves the text to a file every 4 seconds. It works great. It doesn't need to have safari refresh because the site pushes info to the browser live.
      repeat
              set the webpage_content to ""
              tell application "Safari" to set the webpage_content to the text of document 1
              set theText to webpage_content
              set a to "Macintosh HD:Users:PRIVATE:Desktop:CEX:"
              set theFile to (open for access file ((a) & "CEXRaw") with write permission)
              write theText to theFile
              close access theFile
              delay 4
      end repeat
    And it returns this from the site to this main file every 4 seconds: (note I cut off a chunk from the bottom and the top of the file, because they are unimportant)
        GHS:
        0.05233439
        BTC:
        0.00000223
        NMC:
        0.00002939
        LTC:
        0.00000000
        GHS/BTC
        0.02362958 LTC/BTC
        0.02438131 NMC/BTC
        0.00597565 GHS/NMC
        3.96951800 BF1/BTC
        1.67000000 Fund Account
        GHS/BTC
        Last price:
        0.02362958
        Daily change:
        -0.00018042
        Today's open:
        0.02381000
        24h volume:
        73812.35539255
    I now need an applescript to read that file, and return wanted values. But I'm lost on how to write it.
    It needs to find the number under BTC, and set it as a variable.
    It needs to find the number under GHS, and set it as a variable.
    It needs to find the number under Last Price, and set it as a variable.
    If anyone could script that really quick for me, or tell me how to do it, that would be amazing. Thank you so much!

    Couldn't tell if you had any whitespace in the lines (i.e. is there a space before or after GHS:), so I used contains, not is.  Also, if you have a line such as GHS/BTC with a colon GHS/BTC:  then it will also fail (as contains "BTC:" would be true for BTC: and GHS/BTC:)
    However, this will give you some guidance:
    set a to "Macintosh HD:Users:PRIVATE:Desktop:CEX:CEXRaw"
    set x to 0
    set Names to paragraphs of (read file a)
    repeat with nextLine in Names
              set x to x + 1
              if nextLine contains "BTC:" then
                        set BTC to item (x + 1) of Names
              else if nextLine contains "GHS:" then
                        set GHS to item (x + 1) of Names
              else if nextLine contains "Last Price:" then
                        set lastPrice to item (x + 1) of Names
              end if
    end repeat

  • How to store multiline string literal in to java bean shell variable

    Hello Experts
    How to store multiline string literals in java bean shell like we use triple quote for jython variable
    Using Jython
    str=""" helllo
    welcome to my world"""
    above syntax is working but not for java bean shell like below
    String str=""" hello
    welcome to my world""";
    So how to do this in java bean shell. I came to this scenario while storing logs to a variable. I believe there is no solution for storing multiline strings to java bean shell variable.
    <@
    String str="<%=odiRef.getPrevStepLog("MESSAGE")%>";
    @>
    Any suggestion will be highly appreciated.
    Thank You.

    maddythehunk wrote:
    Im trying this but its not working...
    while(billingQueryParamsItr.hasNext()) {
         billingQueryParam = (BillingQueryParam) billingQueryParamsItr.next();
         System.out.println("****** Param Name-->"+billingQueryParam.getParamName());
         String[0] name = billingQueryParam.getParamName(); // giving error ; expected
         //billingItemActionForm.setParamName(billingQueryParam.getParamName());
    Declare the array outside of the loop. Fill the array as you iterate. And stop putting your error messages inside of comments in the code.

  • Binding a JavaFX variable to a Java class instance variable

    Hi,
    I am pretty new to JavaFX but have been developing in Java for many years. I am trying to develop a JavaFX webservice client. What I am doing is creating a basic scene that displays the data values that I am polling with a Java class that extends Thread. The Java class is reading temperature and voltage from a remote server and storing the response in an instance variable. I would like to bind a JavaFx variable to the Java class instance variable so that I can display the values whenever they change.
    var conn: WebserviceConnection; // Java class that extends Thread
    var response: WebserviceResponse;
    try {
    conn = new WebserviceConnection("some_url");
    conn.start();
    Thread.sleep(10000);
    } catch (e:Exception) {
    e.printStackTrace();
    def bindTemp = bind conn.getResponse().getTemperature();
    def bindVolt = bind conn.getResponse().getVoltage();
    The WebserviceConnection class is opening a socket connection and reading some data in a separate thread. A regular socket connection is used because the server is not using HTTP.
    When I run the application, the bindTemp and bindVolt are not updated whenever new data values are received.
    Am I missing something with how bind works? Can I do what I want to do with 'bind'. I basically want to run a separate thread to retrieve data and want my UI to be updated when the data changes.
    Is there a better way to do this than the way I am trying to do it?
    Thanks for any help in advance.
    -Richard

    Hi,
    If you don't want to constantly poll for value change, you can use the observer design pattern, but you need to modify the classes that serve the values to javafx.
    Heres a simple example:
    The Thread which updates a value in every second:
    // TimeServer.java
    public class TimeServer extends Thread {
        private boolean interrupted = false;
        public ValueObject valueObject = new ValueObject();
        @Override
        public void run() {
            while (!interrupted) {
                try {
                    valueObject.setValue(Long.toString(System.currentTimeMillis()));
                    sleep(1000);
                } catch (InterruptedException ex) {
                    interrupted = true;
    }The ValueObject class which contains the values we want to bind in javafx:
    // ValueObject.java
    import java.util.Observable;
    public class ValueObject extends Observable {
        private String value;
        public String getValue() {
            return this.value;
        public void setValue(String value) {
            this.value = value;
            fireNotify();
        private void fireNotify() {
            setChanged();
            notifyObservers();
    }We also need an adapter class in JFX so we can use bind:
    // ValueObjectAdapter.fx
    import java.util.Observer;
    import java.util.Observable;
    public class ValueObjectAdapter extends Observer {
        public-read var value : String;
        public var valueObject : ValueObject
            on replace { valueObject.addObserver(this)}
        override function update(observable: Observable, arg: Object) {
             // We need to run every code in the JFX EDT
             // do not change if the update method can be called outside the Event Dispatch Thread!
             FX.deferAction(
                 function(): Void {
                    value = valueObject.getValue();
    }And finally the main JFX code which displays the canging value:
    // Main.fx
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.text.Text;
    import javafx.scene.text.Font;
    import threadbindfx.TimeServer;
    var timeServer : TimeServer;
    var valueObjectAdapter : ValueObjectAdapter = new ValueObjectAdapter();
    timeServer = new TimeServer();
    valueObjectAdapter.valueObject = timeServer.valueObject;
    timeServer.start();
    Stage {
        title: "Time Application"
        width: 250
        height: 80
        scene: Scene {
            content: Text {
                font : Font {
                    size : 24
                x : 10, y : 30
                content: bind valueObjectAdapter.value;
    }This approach uses less cpu time than constant polling, and changes aren't dependent on the polling interval.
    However this cannot be applied to code which you cannot change obviously.
    I hope this helps.

  • How to set a new session variable?

    Hi all,
    Can anybody say how to set a new session variable in istore?

    Hi,
    you can use either
    pageContext.getAttribute(VAR, PageContext.REQUEST_SCOPE);
    or
    <%@page session="true" %>
    session.putValue
    session.getValue
    Hope this will help.
    Thanks
    Gurjeet

  • Can I capture the url of the page I am on and set it to a variable??

    Hi..
    I was wondering how I can capture the url of the page that I am on and then set it to a variable??? is that possible???
    Thx
    Rich

    Try this.
    String url =request.getRequestURI();
    Hope this helps.
    Fred

  • Spry XML data set and dynamic post variables

    Hi,
    I am trying to create an XML data set that has dynamic post
    variables.
    Everytime something is pressed on the page a variable changes
    and I then want to reload the XML data set using the new variable.
    I know I can just pull in an XML with all possible variables
    and filter client side but this would make it way too large.
    Does anyone know what I may need to do.
    I tried this:
    var myVar = 0;
    var dss = new Spry.Data.XMLDataSet (
    '../../cgi-bin/server_details.pl' , 'top' , { method: 'POST' ,
    postData: sid=ajaja21&ip=127.0.0.1&cid=' . myVar ,
    subPaths: [ "auth" , "plugins" , "plugins/plugin" ] , keepSorted:
    "true", sortOnLoad: "plugins/plugin/order", sortOrderOnLoad:
    "descending", useCache: false, loadInterval: 10000 } );
    onclick="myVar=1";
    But the script doesn't understand the post variables sent (it
    does when I remove the . myVar part and put in a static value). I
    think it isn't sending that dynamic variable with the post
    variables.
    Any ideas anyone?
    Thanks

    Well I had it working when I stripped back everything and
    just had the dss data set and a single onclick function, but now
    that I put it back together it hash foobared again.
    Here are the relevant bits of code that I've changed.
    The function to change server id:
    //function to run when changing the server id
    function changeServer ( sid ) {
    //set the url to use the current server id
    dss.setURL = ( '../../cgi-bin/server_details.pl' , { method:
    'POST' , postData:
    'sid=7gv1m3vjvagfl7h7qeefb8iodj8evhmb&ip=127.0.0.1&cid='+sid
    //force a reload of the server data
    dss.loadData();
    The inital load of the data set
    var dss = new Spry.Data.XMLDataSet (
    '../../cgi-bin/server_details.pl' , 'yams' , { method: 'POST' ,
    postData:
    'sid=7gv1m3vjvagfl7h7qeefb8iodj8evhmb&ip=127.0.0.1&cid=0' ,
    subPaths: [ "auth" , "plugins" , "plugins/plugin" ] , keepSorted:
    "true", sortOnLoad: "plugins/plugin/order", sortOrderOnLoad:
    "descending", useCache: false, loadInterval: 10000 } );
    And the part that changes the server id
    <td align="left" style="cursor:default; width:174px;"
    onclick="changeServer({dsv::servers/server/@id})">{dsv::servers/server/name}</td>
    I checked that the function is receiving the correct server
    id and I even tried hard coding the cid variable to 2 in the change
    function but it still wasn't changing on the server side.
    Any ideas?
    Thanks

  • Setting empty Selections in Variables

    When setting a user-exit variable to initial for unassigned values, the variable value in the planning level displays the '#'.  When entering data for this selection in a layout and saving it, everything looks fine.  The data records are written to the cube and can be verified using list cube.  However, when exiting the layout and returning the newly created records do not show up.  If I take the variable out of the selection on the package and open the layout I can see the values.  I've tried everything I can think of as far as assigning values to the variable to represent unassigned.  I've tried the # sign, clearing the values, and assigning space but this behavior persists.  Does anyone have any ideas on this problem.
    thanks,
    Chuck Hall

    Hi,
    Thanks for your message. I have found the reason of my problem.
    We use 0SOURSYSTEM as a primary key of all the characteristics (compounding). We have 2 source systems. In the SID tables, SAP has got three entries for the initial values of my characteristic 0NETWORK.
    0SOURSYSTEM      NETWORK
    0                             0
    R1                           0
    F1                           0
    When I inserted the 0NETWORK to my cube, SAP grabbed its first index 0/0, and I was expecting having the second R1/0.
    So the combination does not match when I execute a layout.
    I'll now use Remodeling to remove 0NETWORK and put it back with the value R1/0.
    Thanks
    Laurent

  • Best practices for setting environment based static variables?

    I have a set of static string variables that hold the url location of modules in a project. These locations change depending on whether I'm building for development, staging or production.
    What's the best way to set static variables in this way?

    I don't know if this is best practice, but here's the solution I've come up with.
    The root domain is accessible within the swf via a node on a loaded xml file. So I created a simple method that sets a url variable based on that domain node.
    The domain-based url variable is then used within the static string variables that define the location of the modules.
    Simplified like so:
    var domain:String = xml.node.value;
    static var bucketLocation:String = getLocation()
    static var moduleLocation:String = bucketLocation + "modulename.swf";
    function getLocation():String
         var loc:String
         switch (domain) {
              case stagingUrl:
                  loc = "pathToAmazonStagingBucket";
                   break;
              case productionUrl:
                   loc = "pathToAmazonProductionBucket";
                   break;

  • Trouble in BEx Analyzer when try to set values to the variables in ZXRSRU01

    Hi Experts!
    I have the trouble in BEx Analyzer when try to set values to the variables in ZXRSRU01 on i_step = 1.
    When variable's screen apeares the values is not those what was set in ZXRSRU01. When I try to trace
    this in RSRT I have no this problem, all the values are same as was set in ZXRSRU01.
    Thanks in advance.
    Best regards,
    Andrey Bychkov

    Hi
    Check this
    Documentation about variable types & their processing in i_step = 1, 2 etc.
    It may help you....
    Cheers

  • Setting java.library.path property in java code

    Hi,
    i'd like to set java.library.path property in java code to load a dll-library. I know that a funtional way is to run JVM with parameter -Djava.library.path=c:\tmp, but I need it do it IN CODE.
    I'v tried this:
    System.setProperty("java.library.path", "c:\\tmp");
    System.loadLibrary("libapr");The library 'libapr.dll' is situated really in 'c:\tmp' directory, but I get 'java.lang.UnsatisfiedLinkError: no libapr in java.library.path' exception.
    It seems like the already running java program doesn't use actual java.library.path set in previous step.
    Is there any possibility to set java.library.path property in java code?
    Thanx
    Brny

    I think the following code should work:
    // Reset the "sys_paths" field of the ClassLoader to null.
              Class clazz = ClassLoader.class;
              Field field = clazz.getDeclaredField("sys_paths");
              boolean accessible = field.isAccessible();
              if (!accessible)
                   field.setAccessible(true);
              Object original = field.get(clazz);
              // Reset it to null so that whenever "System.loadLibrary" is called, it will be reconstructed with the changed value.
              field.set(clazz, null);
              try {
                   // Change the value and load the library.
                   System.setProperty("java.library.path", "c:\\tmp");
                   System.loadLibrary("libapr");
              finally {
                   //Revert back the changes.
                   field.set(clazz, original);
                   field.setAccessible(accessible);
    The idea is to make the static field "sys_paths" null so that it would construct the paths from the changed value.

  • Set up a Session Variable

    Hi,
    How to setup a session variable of User id in PHP in
    Dreamweaver Style. Is it possible to assign the session variable
    value equal to user id from the recordset......if yes i need the
    procedure. Thanks in advance.

    prashi123 wrote:
    > How to setup a session variable of User id in PHP in
    Dreamweaver Style. Is it
    > possible to assign the session variable value equal to
    user id from the
    > recordset......if yes i need the procedure.
    There is no "Dreamweaver style" for setting up a session
    variable. You
    do it in exactly the same way as for any PHP page. Put this
    at the
    beginning of the page:
    session_start();
    Retrieve the value that you want from the recordset and
    assign it to a
    session variable like this:
    $_SESSION['user_id'] = $row_recordsetName['user_id'];
    David Powers
    Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    http://foundationphp.com/

Maybe you are looking for

  • Efi update via usb flash drive?

    I would like to know if there is a way to perform an efi update via a usb flash drive?

  • How to delete the content of a datatable by the "Database Adapter"

    Hello, i want to delete all entries in a table by a database adapter - like "DELETE FROM table" in SQL. (Oracle SOA Suite 11g SR1, with Oracle DB over JDBC)) When i create a new Database adapter i can select standard functions for "insert, select, de

  • Adobe Acrobat Standard Installation Manual

    I am trying to do something very simple: Find an installation manual for Acobe Acrobat Standard. When I go to the Adobe site, here is what I'm trying to do: Go to Support & Learning -> I Need Help -> Products Choose Acrobat Click "Acrobat X Standard

  • Fire tv connection problem

    For some reason my fire to box has stopped connecting to my hub, have turned it on and off, changed channels and even move the box closer to the hub, it connected at first then disconnected and will

  • Dynamicaly print logo on smartform(if a person email id change logo ischang

    hi expert, actually i want all the variable of smartform in one table. so i crated ztable, my logo is in database i want to  fetch the logo from z table . (v_logo logo name in table how can i fetch logo from database with refrence of email id of pers