Problem with remoted display of java applications

842

Solution 1

From this post on the java.net forums it seems that there are "incorrect insets detection when using the Xming". The fix is to set the AWT_TOOLKIT environment variable. Explanation for why can be found on Sun's page here.

AWT_TOOLKIT=MToolkit

Setting this environment variable fixed all problems. Update: The link containing the original link has changed. See here.

Solution 2

I also had errors in our Solaris 11 server to Windows 7 desktop using Xming. We were installing some Oracle (Java) apps on the Solaris 11 server and we had issues with XMing with input field becoming uneditable at random times. We tried so many parameter changes and nothing worked (not even a corporate license of Exceed, but that was another issue). We tried using MobaXterm and that worked well and allowed us to do our Oracle installs without issue.

Share:
842

Related videos on Youtube

SimonDowdles
Author by

SimonDowdles

Updated on September 17, 2022

Comments

  • SimonDowdles
    SimonDowdles over 1 year

    I have a simple core class that is being used for core functions to a small web app. I have defined some constants in the class - which has mostly static functions - and I am wanting to set / edit these constants outside of the class, example:

    class core{
      const connection = '';
      public static function someSqlScript(){
        $sql = "SELECT * FROM sometable WHERE someconditions";
        $exec = mysqli_query(self::connection, $sql);  
      }
    }
    

    Now, I want to be able to set the connection constant so that it references a mysql connection object, which (by means of another script), has already been assigned to the variable $con, so essentially I am after something like this:

    core::connection = $con; //send connection for use in class
    core::someSqlScript(); //should not perform the MySQL query using conneciton $con as above
    

    Any help is greatly appreciated, I am used to using non static functions and variables within classes, but the static functions with constants has got me.

    Thanks to all.

    • quack quixote
      quack quixote over 14 years
      my first guess is a misconfiguration in your local X server, since that's getting the click events first. can you connect to the linux box (eg, via VLC) and see the right-click working there?
    • nathan
      nathan over 14 years
      Yes, right click works on Linux
    • quack quixote
      quack quixote over 14 years
      are you starting Xming with the -multiwindow option?
    • nathan
      nathan over 14 years
      The -multiwindow allowed me access to the right click and file menu, but only until I move the window. Once the java application's window is moved, then there is no way to left or right click menu items on the application.
    • Gordon
      Gordon about 13 years
    • SimonDowdles
      SimonDowdles about 13 years
      Apologies if it is, I did search for a related question but did not come across one that I thought was a duplicate.
  • quack quixote
    quack quixote over 14 years
    the quote from the forum is "incorrect insets detection when using the Xming", which doesn't necessarily imply it's Xming doing the incorrect detection. sounds like it's a bug in Swing. good job finding the workaround, +1!
  • nathan
    nathan over 14 years
    Good point. I'll correct my quote and reword to not put Xming at fault.
  • Nico
    Nico almost 14 years
    So, this seemed to solve the problem for a while for me too, however, I'm now faced with another problem, I sometimes get some sort of keyboard focus/event problem, I can't type in my textboxes and such until i change the focuse to another window and back... anyone run into this ?
  • SimonDowdles
    SimonDowdles about 13 years
    thank you for a very informative response, much appreciated, you cleared all my misunderstandings up in one paragraph! * kisses your feet *
  • SimonDowdles
    SimonDowdles about 13 years
    I did, had to wait 'x' amount of minutes before system allowed me to accept as answer ;)
  • Yoshi
    Yoshi about 13 years
    Oh, I'm sorry then. Just saw the comment and no green check mark, and was a bit disappointed ;)
  • Sridhar
    Sridhar over 9 years
    @nathan The given link page not found. (java.net/jive/thread.jspa?threadID=62022&tstart=0) any alternate link?
  • nathan
    nathan about 9 years
    @Sridhar I updated the link.