Java GUI does not work in Ubuntu

Hello everybody,
I made an GUI application using Swing and Eclipse. When I run it, the GUI shows up, and the program works until I place the pointer on top of the program's window. When I do so, the program freezes and after a couple of seconds I get a message telling me that the program is not responding.
The code itself should not be the problem because I tried several well established Hello Worlds applications. Other users also report that this code works fine on theri computers.
Probably it is important to notice that SWT based Hello World applications work fine on my Ubuntu (only Swing based applications freeze).
It has been suggested that the problem can be in the default JDK used by Ubuntu. I tried to solve the problem in this direction. I typed "aptitude search jdk" in the command line and found out that "sun-java6-jdk" is the only JDK installed on my computer. So, it should be OK.
Any ideas what can be wrong?
The old dicussion about this subject was blocked (it is here: http://forums.sun.com/thread.jspa?threadID=5402905&tstart=0)

// This code generate a text area.
// Taken from http://www.javafaq.nu/java-article743.html
import java.awt.*;
import javax.swing.*;
public class HelloWorldSwing extends JFrame {
         JTextArea m_resultArea = new JTextArea(6, 30);
         //====================================================== constructor
         public HelloWorldSwing() {
             //... Set initial text, scrolling, and border.
             m_resultArea.setText("Enter more text to see scrollbars");
             JScrollPane scrollingArea = new JScrollPane(m_resultArea);
             scrollingArea.setBorder(BorderFactory.createEmptyBorder(10,5,10,5));
             // Get the content pane, set layout, add to center
             Container content = this.getContentPane();
             content.setLayout(new BorderLayout());
            content.add(scrollingArea, BorderLayout.CENTER);
             this.pack();
         public static void createAndViewJFrame() {
             JFrame win = new HelloWorldSwing();
             win.setTitle("TextAreaDemo");
             win.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
             win.setVisible(true);
         //============================================================= main
         public static void main(String[] args) {
              SwingUtilities.invokeLater(new Runnable(){
                   public void run(){
                        createAndViewJFrame();
}

Similar Messages

  • My java programe does not work

    Hi
    I createda java programme with jdeveloper . I compiled my code in all of version (1.3, 1.4, 1.5, 1.6 and default).
    But when i try to run my programme in other computers that have j2SE Runtime Environment 5.0 update 11, or java Runtime 2 Environment SE 1.3 - 1.4,
    my programme doesnot work.
    how can i fix this problem.

    Which Jdev version?
    What exactly do you mean by 'does not work'?
    Timo

  • Java GUI apps not working

    All my Java apps are not rendering their GUI properly anymore. It seems to affect those that are using a Carbon-ized UI. I'm guessing this means all Swing apps?
    Regardless I'm trying to figure out a way to fix this without re-installing the OS...
    Any tips?
    thanks in advance.
    -j

    Have you tried deleting the Java caches? Close all your Java applications first. You'll find some in <user>:Library:Caches:Java Applets. While you're there you can also clean up anything else in the Caches folder that might be related - it's not a problem to remove anything in here, they'll just get recreated and may cause the related application to start up a bit slower next time.
    There should also be one or more 'Plugin Settings' files in the Applications:Utilities:Java (note: I'm on 10.3.9 and this may be different for you - I have two: one for 1.3.1 and one for 1.4.2). Launch them and use whatever features they have for cleaning up unwanted caches/mess, but I think they just remove the cache files I mentioned in the first paragraph.

  • Communication between SOAP and java proxy does not work

    Hi Group,
    i want to proceed following scenario:
    SOAP->XI->JavaProxy
    For that i have created of the message interface of a remote function module my java proxy.
    Calling the java proxy with following scenario works successfully:
    RFC->XI->JavaProxy
    Further, i have created in the integration engine(configuration) my wsdl file. In the SAP
    Netwaever Developer Studio, i have made a standalone proxy project, that is consuming the
    web service out of the wsdl file.
    Testing the web service client with following example works fine:
    SOAP->XI->RFC
    But when i try the scenario SOAP->XI->JavaProxy, i get following rmi exception on client side:
    java.rmi.RemoteException: Service call exception; nested exception is:
    java.lang.Exception:  Element 'Z_GPS_PING.Response' not found in response message.
    at com.demo.sap.MI_WEBSRV_GPS_PING_OUTBBindingStub.MI_WEBSRV_GPS_PING_OUTB(MI_WEBSRV_GPS_PING_OUTBBindingStub.java:86)
    at com.demo.test.TT_Pinger.main(TT_Pinger.java:36)
    Caused by: java.lang.Exception:  Element 'Z_GPS_PING.Response' not found in response message.
    at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.getResponseDocument(MimeHttpBinding.java:942)
    at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.call(MimeHttpBinding.java:1231)
    at com.demo.sap.MI_WEBSRV_GPS_PING_OUTBBindingStub.MI_WEBSRV_GPS_PING_OUTB(MI_WEBSRV_GPS_PING_OUTBBindingStub.java:79)
    ... 1 more
    In the monitoring, the execution of both directions is ok. In the response message, i can see the result of the java proxy.
    Here is the result:
    <ns:Z_GPS_PING.Response xmlns:ns="urn:sap-com:document:sap:rfc:functions">
         <E_RETURNCODE>PINGOK  </E_RETURNCODE>
    </ns:Z_GPS_PING.Response>
    My first thought, was, that i have a problem with the prefix, so i have changed it via xslt transformation into "rfc",
    but it got the same error message.
    Does anyone know, which problem we have here?
    For any hint or suggestion, i would be much obliged.
    Greetings,
    Sigi
    P.S. WAS and Sap Netweave Dev Studio is on patch level 12

    Hi Group,
    the SAP has solved the Problem now.
    The coresponding OSS note is: 862926
    (release date 18.07.05)
    The reason was, that the response payload name wasn't
    "maindocument". For that, the adapter didn't found the payload and returned an emty one.
    Greetings,
    Sigi

  • JTextField and JTextArea in Mac with Java 6 does not work

    Hi there,
    I just installed the new version of Java 6 for Mac and I my text fields and text areas just stoped working. I can paste text to them, but they do not respond to my typing (only backspace works!!). Did anyone have this problem?
    I guess it is still beta and they are going to fix it in time. But I would be happy if I was not the only one and if there is any way to fix it for now.
    I just tried simple code like:
    main... {
      JFrame f = new JFrame();
      f.add(new JTextField(10), BorderLayout.NORTH));
      f.add(new JTextArea(5,2), BorderLayout.CENTER));
      f.pack();
      f.setVisible(true);
    }All the best,
    RC

    ...hm, nope, works for me...

  • Pathname for java.exe does not work

    Hi all,
    on Windows, when prompted for full name to java.exe, I enter:
    C:\Program Files\Java\jre1.5.0_06\bin\java.exe
    Next, pressing OK, I get an error:
    Cannot find a J2SE SDK installed at path: C:\Program Files\Java\jre1.5.0_06.
    What am I doing wrong here?
    Kind regards - Remi.

    OK got it.
    I now use D:\oracle\Raptor\raptor\jdk\jre\bin\java.exe from my latest beta version.
    This appears to work just fine.
    Thanks - Remi.

  • [code]javac[/code] works, [code]java[/code] does not work.

    I have installed the Java 2 SDK Standard Edition v1.3.1_01. I have set the path in the autoexec.bat file. I created the file WhatsUpDoc.java containing:
    public class WhatsUpDoc{
      public static void main(String[] args){
        System.out.println("What's up Doc?");
    }At the DOS prompt, when I type: javac WhatsUpDoc.java there is no compilation error and the WhatsUpDoc.class file is created. But, when I type java WhatsUpDoc at the DOS prompt, I get:
    Exception in thread "main" java.lang.NoClassDefFoundError: WhatsUpDocI have compiled several applets working just fine on a web page. Why I cannot run this simple application?
    Thank you for your help.
    Michel Cariotis

    I have installed the Java 2 SDK Standard Edition
    v1.3.1_01. I have set the path in the
    autoexec.bat file.What have you set the CLASSPATH to? It should be ".;%JAVA_HOME%\jre\lib\rt.jar". It looks like the CLASSPATH is wrong, so java can't see the class in the current directory. :-/
    Bhav

  • Generation of custom syncbo java classes does not work.

    Hello
    we created some new syncbo's for MAM 3.0 in the middleware and download it's correspond meRepMeta.xml.
    Now i will generate in the NetWeaver Developer Studio the manager and syncbo classes for our new custom syncbo's. I had create a new SmartSync-Project and deliver the meRepMeta.xml file, edit the package and some other things and start the project creation process. But after this, i have only an simple MI project with web.xml, meRepMeta.xml and so on, but no generated, custom syncbo's. In the documentation i couldn't find a detailed description for the generation of syncbo java classes.
    Can anybody help me, what i do wrong.
    Tanks a lot.
    Greetings
    Andreas

    Hi Kai,
    Just note these points..
    1)Smart Sync MI Applications (JSP Runtime) generated using SP 09v of Developer Studio is MCD specific.It is generating MCD specific files.This architecture makes the applications too complex during migration.
    2)In SP 09v applications, the developers don't have to code in Smart Sync API level as most of the codes are generated by default.
    3)Applications in SP 09v of Developer Studio is following the exact MVC Architecture(We can see the seperation of models, views and controllers here).
    4)Corresponding to the mapped fields (in SyncBo level), in the BO Wrapper classes we can see implementations of corresponding getter() and setter(..) methods.The names of this methods are totally dependent upon the names of fields mapped.So if there is change in the names of fields , in the case of already generated projects , we have to explicitly rename the getter() and setter(..) methods appropriately inorder to make the changes to take effect.
    5)For adding new JSP pages, we have to add references in many files(*.view). (we have to explicitly create the corresponding controller class file , map the relationship between the controller and the corresponding JSP file).
    refer this blog also..
    /people/kishor.gopinathan/blog/2006/05/29/smart-sync-application-development-using-sp-09v-of-developer-studio
    <<
    have to write the acces classes, mentioned in the MDK, manually for every new SyncBO I want to use?
    >>
         For that , we can write a generic method in such a way that , we only have to pass the syncbo name as the parameter for that method, so that it would retrieve the records corresponding to the syncbo given.
       Since the getter nd setter method names are closely related to the names of the mapped fields, this would create problems when we change the names of fields used in the table parameter or import parameter of the BAPI Wrapper used for syncbo creation.
    So using SP 11 , we can create generic applications, which can be migrated using the higher versions of NWD Studio. I think , SAP might not change this infrastructure anymore..
      Regards,
      Kishor Gopinathan

  • JAVA APPLICATION DOES NOT WORK WITH TMG

    Dear all,
    I'm not able to log into a JAVA APP or a Website using Java (.jsp) pages.
    We can open either the windows application and the webpage, but we can't log in.
    I'm using Forefront TMG 2010 as a my corporate firewall and all clients are using Windows 8.1.
    I've tried everyting I'm able to try.
    Could you please help me?
    Best Regards
    Clemilson
    Clemilson Correia IT Specialist

    Hi,
    Thank you for your post here.
    Firstly we need you to collect
    TMG live logging.
    As you mentioned, you can normally get website but cannot login in, so I think there may be something wrong with the HTTP post method. You may need to capture the packets to see what happened.
    You can use
    Network Monitor 3.4.
    Best Regards
    Quan Gu

  • Show/hide Menue with Alt does not work @ Ubuntu

    The shortcut does not work with Ubuntu, nothing happens when I press Alt

    The doubling is weird. I cannot produce that. Forgive the repetition, but stated a little differently, in normal mode start with the cursor on the desired center point, depress the left mouse button, drag out to any starting shape and position, then depress and hold down the ALT key. The shape should then reposition itself so that its center is the initial point you chose. Without letting up on either the mouse button or the ALT key, drag the mouse to get the shape and size you want. Now release the mouse button FIRST, and then the ALT key. If that doesn't hack it, you've got a more interesting problem and we'll do some more head scratching,

  • Java command still not working - please help

    i have installed jdk1.6.0_05. The javac command works fine but the java command does not work at all. even when i try java HelloWorld i receive this exception message
    Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld
    Caused by: java.lang.ClassNotFoundException: HelloWorld
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    please help (you to SUN)!!

    bart@kerberos:~$ javac -help
    Usage: javac <options> <source files>
    where possible options include:
      -g                         Generate all debugging info
      -g:none                    Generate no debugging info
      -g:{lines,vars,source}     Generate only some debugging info
      -nowarn                    Generate no warnings
      -verbose                   Output messages about what the compiler is doing
      -deprecation               Output source locations where deprecated APIs are used
      -classpath <path>          Specify where to find user class files and annotation processors
      -cp <path>                 Specify where to find user class files and annotation processors
      -sourcepath <path>         Specify where to find input source files
      -bootclasspath <path>      Override location of bootstrap class files
      -extdirs <dirs>            Override location of installed extensions
      -endorseddirs <dirs>       Override location of endorsed standards path
      -proc:{none,only}          Control whether annotation processing and/or compilation is done.
      -processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process
      -processorpath <path>      Specify where to find annotation processors
      -d <directory>             Specify where to place generated class files
      -s <directory>             Specify where to place generated source files
      -implicit:{none,class}     Specify whether or not to generate class files for implicitly referenced files
      -encoding <encoding>       Specify character encoding used by source files
      -source <release>          Provide source compatibility with specified release
      -target <release>          Generate class files for specific VM version
      -version                   Version information
      -help                      Print a synopsis of standard options
      -Akey[=value]              Options to pass to annotation processors
      -X                         Print a synopsis of nonstandard options
      -J<flag>                   Pass <flag> directly to the runtime systemSee the bold part.
    More information: [http://java.sun.com/docs/books/tutorial/java/package/managingfiles.html]

  • Java - version does not return the version??

    Hi,
    The following is from a cmd window
    C:\Program Files\JavaSoft\JRE\1.2\bin>java -version
    C:\Program Files\JavaSoft\JRE\1.2\bin>
    It seems to be missing the expected:
    java version "1.2.2"
    Classic VM (build JDK-1.2.2_006, native threads, symcjit)
    Another side effect is that any application using java to launch creates a java process (briefly observed through task manager) and then dies almost instantly.
    The machine is a Win2000 Server running JRE 1.2.2_006, I've tried uninstalling, re-installing, rebooting (between unistalling and reinstalling), setting the path and classpath variables to nothing and running from the folder.
    Anyone seens this before? know what the resolution is?
    Thanks
    Dave

    Thanks for the response, I've already tried that with no success.
    It appears that it might be related to the fact that it's installed on a VMWare machine.
    The java -version command works fine on the VMWare machine when the VM is running on the host machine that it was built on, however when the VMWare machine was moved to a new host it seems that when you run the java interpreter it launches and then just dies??
    I still don't have an answer for why the Java -version does not work.
    As I said before I have uninstalled and reinstalled JRE 1.2.2 a couple of times with no success, however a workaround appears to be to install the JRE 1.3.1.
    After installing JRE 1.3.1 the java -version command works, fortunately the java applications I am using 'seem' to be compatible (with a few modifications to path variables etc) with the 1.3.1 version�.
    Thanks
    Dave

  • Java does not work at all upon using the update manager to update to firefox 3.6.10 for Ubuntu 9.0.4

    OS: Ubuntu 9.0.4
    Browser: Firefox 3.6.10
    upon updating to firefox 3.6.10, java does not work at all.
    websites that use java do not work at all anymore, when they worked just fine before the updating thru update manager. e.g. hulu website cannot play any of the shows.
    i can give the folder of bookmarked pages i tried.
    how to do that on here, i've yet to see if possible.
    i can even give saved text from the terminal concerning certain attempts.
    when i updated thru update manager, it gave some weird java plugin that wasn't there before "The IcedTea Web Browser Plugin IcedTea6 Java Web Browser Plugin (execution of applets on webpages)".
    i uninstalled this as instructed by an answer found in one of the pages i saved, cuz it was conflicting w/another java program the updater said i needed. right now, i don't remember for sure what it was. it perhaps was realplayer flash or Java itself. w/all the hours/days of searching i put in, it's difficult if not downright impossible for me to remember all the specifics of what i tried.
    i've searched throughout many webpages (including many searches on mozilla, ubuntu, java, etc) for instruction in fixing the problem.
    oh, and incidentally, on the Java site, when i try the verify test of Java, firefox pops up with that yellow bar right below the slew of tabbed website windows, giving the statement "additional plugins are required to display all the media on this page. (w/link to) install missing plugins ." which is what i do, go thru the requesting plugin installation. it comes up with, guess what, the IcedTea Java Plugin. i click on the 'next' in the "Plugin Finder Service" box that pops up, & all it gives me is "No plugins were installed. IcedTea ...Plugin failed. and the link 'find out more about plugins or manually find missing plugins'". the link takes me to some of the very things/plugins that wouldn't install in the first place. the Java test failure is a LOL funny, as what plugin it is saying is required (IcedTea) is a recommended alternate program to display the very test in the first place.
    i followed the given instructions on those many searched pages, in every case (barring what i may have just plain missed), but to no avail.
    i've even gone to the point of trying to reinstall the previous 3.5.13 firefox version, from mozilla site. even that wouldn't install.
    i've tried installing Java for my sys direct from it's site. nada.
    now it's time for me to post the problem & perhaps someone will come up with some kind of "dummy" way to fix it.
    until then many sites a regularly use are totally useless to me on this fast puter.
    the only way i can get to use such sites, are two choices: 1. use a dinosaur laptop, which is slower than molasses & cannot handle to any streaming stuff, or 2. use an available internet access puter at the library. but useage for ea person per day is limited to only one hour a day. and one can end up waiting for an hour or more ( in the busiest periods) to even get to use one.
    so, is there anyone at all, who knows any for-sure working fix for this problem?
    thanks muchly :^D
    p.s. i can't pay anybody any money for such help, as is required in certain sites (e.g. Java website), cuz i don't have any.
    i can pay in labor tho, if there is someway to find someone who can physically be at this puter w/me, taking me step-by-step
    sorry for the 20-pg essay. i hope it was all clearly understood. if, not, well, clear communication is always what is needed, ask away.

    Your above posted system details show outdated plugin(s) with known security and stability risks.
    *Shockwave Flash 9.0 r999
    Update the [[Managing the Flash plugin|Flash]] plugin to the latest version.
    *http://www.adobe.com/software/flash/about/
    In Firefox 3.6 and later versions you need the Next-Generation Java™ Plug-In present in Java 6 U10 and later (Linux: libnpjp2.so; Windows: npjp2.dll).
    http://java.com/en/download/faq/firefox_newplugin.xml
    See also http://java.sun.com/javase/6/webnotes/install/jre/manual-plugin-install-linux.html

  • HTML5 does not work in Android 5 and Ubuntu

    Hi! Today my tablet Google Nexus 7 updated to Android 5, and I noticed a problem with Firefox. I noticed that does not work HTML5 mp3 player / It can be seen on the website http://audiobook-online.com/?page_id=2971. Instead of playing a song, it is suggested to download the file. This same problem in Ubuntu system on a netbook Emachine M350. In Google Chrome everything is fine. This can be seen in the screenshots.
    http://pixs.ru/showimage/Screenshot_6315323_14799085.png
    http://pixs.ru/showimage/Screenshot_2281471_14799099.png

    Yes this is a known issue. You will need to use Firefox Beta until Dec 1 or so to get h264 video playback. There are two other codecs webm and ogg video that continue to function. So sites that support multiple formats should continue to work.

  • Hi, I have a MAC (version 10.10.2) and installed Creative Suite one year ago. Now I want to open the Illustrator, but it does not work. It says I should install old Java SE 6-Runtime-Version to open „Adobe Illustrator CS6". Where can I find it? Thanks for

    Hi, I have a MAC (version 10.10.2) and installed Creative Suite one year ago. Now I want to open the Illustrator, but it does not work. It says I should install old Java SE 6-Runtime-Version to open „Adobe Illustrator CS6“. Where can I find it? Thanks for your answer! Jana

    Prompted to install Java SE 6 Runtime | Mac OS 10.9
    Mylenium

Maybe you are looking for

  • External LG drive not showing up on my mac mini

    I have a mini and bought an external LG dvd writer but it will not show up on desktop. Its mac compatible but not being recognized. Is there something I doing wrong?

  • Trouble connecting in-game on PS3

    Hi, guys! Okay, so, specs: -Airport Express Base Station -Cable internet -PS3 (one generation back) -NAT Type 2 I can connect wirelessly from both computers in the apartment just fine, and I can also connect to the PS3 network without a problem (send

  • Report contains PR & Po details

    Hi Gurus, Is there any report which shows PR,PR Approval date, PO , PO creation date and PO Approval date. I tried ME5A but PO approval date field is not present in the report Please suggest

  • Chinese Data in OBIEE Chart Reports

    Hello All, I'm facing an issue with OBIEE Chart report . We have some data as Chinese in database. When displaying these on OBIEE Chart , it is shown as boxes. This is happening only with OBIEE Charts . Looks like chinese characters are not supported

  • My computer got a virus and we had to wipe it clean, I need to re-install photoshop CS5

    Where do I go to download it again? Or does Adobe need to send me a link?