Font problems running a swing app under Linux

I have an application running well under the Win family (NT, 2000, etc.)... and it also runs well under a Linux Red Hat os... but in the linux environment I've observed the folloowing font errors displayed in the screen:
Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
this is a unexpected issue because I'm not setting any font in my code... How can I solve it ?
It's a Java or OS configuration problem ??

Here is a solution:-
Copy SYMBOL.TTF to /usr/java/jdk1.3.1_01/jre/lib/fonts or wherever.
Note the copy should have lower case name!
Do a chmod 444 symbol.ttf
I don't say where to get a copy from but you can imagine!!
Modify the file fonts.dir in the same directory as follows:
Change the first line by 1 ie if its 72 change to 73.
Insert the following line:
symbol.ttf -monotype-symbol-medium-r-normal--0-0-0-0-p-0-abode-fontspecific
You have to do the above as root of course.

Similar Messages

  • Problem running Java GUI apps in Linux

    When launching GUI Java apps a blank window with only a title appears and nothing more happens. Have no idea of how to deal with it..
    pvs@pvs-laptop:~$ uname -a
    Linux pvs-laptop 2.6.22-14-generic #1 SMP Tue Feb 12 07:42:25 UTC 2008 i686 GNU/Linux
    pvs@pvs-laptop:~$ java -version
    java version "1.5.0_14"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
    Java HotSpot(TM) Server VM (build 1.5.0_14-b03, mixed mode)

    Try wrapping the code that actually displays the GUI in a SwingUtilities.invokeLater (...)
    db

  • Does ds 52 run as 64 bit app under linux?

    does ds 52 run as 64 bit app under linux?
    Under 64 bit RH 3 AMD64 V20Z?
    Under 64 bit RH 3 on Dell or other x86 64 bit hardware?
    I've searched all over the public Sun site with no conclusive answer.
    Thanks, Mike

    No. 32 bit on Linux.

  • Problem of executing a process under Linux using Runtime.exec

    Hi, All
    I am having a problem of executing a process under Linux and looking for help.
    I have a simple C program, which just opens a listening port, accept connection request and receive data. What I did is:
    1. I create a script to start this C program
    2. I write a simple java application using Runtime.exec to execute this script
    I can see this C program is started, and it is doing what it supposed to do, opening a listening port, accepting connection request from client and receiving data from client. But if I stop the Java application, then this C program will die when any incoming data or connection request happens. There is nothing wrong with the C program and the script, because if I manually execute this script, everying works fine.
    I am using jre1.4.2_07 and running under Linux fedora 3.0.
    Then I tried similar thing under Windows XP with service pack2, evrything works OK, the C program doesn't die at all.

    Mind reading is not an exact science but I bet that you are not processing either the process stdout or the stderr stream properly. Have you read http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html ?

  • Problems running TestStand 4.0 under non-admin account

    I am having problems running TestStand 4.0 under a non-admin account under windows XP. I have done the following:
       1. Set full control protection to entire National Instrument directory
       2. tcverselext.exe was giving me problems until I changed it to run in window 95 compatability mode. Otherwise I get an "you do not have administrator priviliges to run this command" error. Don't know if this is the correct fic for this.
       3. Now when starting TestStand I get a "Retrieving COM class factory for component with CLSID {B2794EF6-C0B6-11D0-939C-0020AF68E893} - failed due to the following error: 80040154." error
    Everything works fine as administrator.
    Can anyone help me?
    Don

    The Version Selector needs to be run with Administrator Access.  When you are running it in Windows 95 Compatability Mode, you are masking the problem.  However, once you set the correct version of TestStand, you no longer need Administrator Access to use the Sequence Editor.
    Allen P.
    NI

  • Keyboard Problem while running Swing App on LINUX

    Hi All,
    We have a Swing based Application running on Windows Platform. We need to run the Application on LINUX. The Application does not have any problem and runs without problems for a few minutes but after that the keyboard stops to respond inside the application. Keyboard runs fine outside the application but no key events are recognized inside the application. Mouse is working fine even after the keyboard stops responding.
    Key Points:
    �     The keyboard is a PS/2 keyboard.
    �     Read Hat Fedora 5.0 is being used.
    �     The problems occur on both KDE and GNONE.
    �     The Java Version is jdk1.5.0_09
    The application is data entry application using EJB at server side. The client UI has lot of JTables and Desktop Panes/ Internal Frames. User use ctrl+tab, ctrl+shift+tab, tab, shift+tab, and other hot keys to navigate between Components. Listeners on keyboard Focus Owner are also used. We are unable to diagnose the problem because of the undeterminable nature of the problem. The problem occurs at anytime and does not occur on any special key/ combinations press.
    Thanks and Regards,
    Nishant Saini
    http://www.simplyjava.com

    I've just installed the JDK 1.4 on my debian box. I
    can compile and run a basic Hello World app using
    System.println, but when I try to run a simple swing
    app, I get an error like:
    Exception in thread "main"
    java.lang.NoClassDefFoundError
    at java.lang.Class.forName0(Native Method)
    at java.lang.... etc, etc.
    It goes on with about 30 different classes. It
    compiles fine, with no errors, but when it comes time
    to run, that's what I get. This is what I have in my
    .bash_profile as far as environment variables go:
    export JAVA_HOME="/usr/local/j2sdk1.4.1_01"
    export PATH="$JAVA_HOME/BIN:$PATH"
    export
    CLASSPATH="$JAVA_HOME/jre/lib/:$JAVA_HOME/lib:."The code works fine in Windows, so unless there's
    something platform-specific, I don't think there's a
    problem there. I've checked to make sure I'm not
    running kaffe by accident and I'm definitely running
    the right java and javac. I'm out of ideas. Any
    suggestions would be greatly appreciated.
    -dudley
    I may just be crazy, but your PATH looks a little screwy to me. I was under the impression that the standard java installation has its executables in the 'bin' directory, not the 'BIN' directory. Unless Debian has fallen to the evil empire, then I'm fairly sure file names are case-sensitive. I don't know if that will fix your problem though. Do you compile from the command line, or do you use an IDE???

  • Problem running third party apps in clean installed mavericks HELP....Consol code knowledge needed!

    Yo Guys
    I've had some kernel problems with my mid2010 MBP, problems booting, crashes etc. so decided to make a clean install of mavericks, first through the recovery partion, later at the genius bar (they coudnt help me and blamed my toshiba HD (not generic mac) allthough i strongly doubt its the HD since it has passed every test.
    still i've no thirdparty apps installed, so when after the clean install i tried to install spotify, it hangs(keeps bouncing in dock), same goes for transmission. This happens the same before and after my clean install, but didnt two weeks ago...WEIRD!
    What makes it all weirder is that the spotify install will run and install in safe boot, but it doesnt in normal mode.....
    I can add a etrecheck but since its only a mevericks install you guys could guess the results, everything tests perfect......Its like i've MBP with a burnout, no doctor or app or diagnositc can find any flaw, geniusses arent so genius when behind my laptop, but it behaves very ill.....all&all its just super weird.
    I hope some of you guys are able to read the code in consol, and maybe shine a light on whats wrong. I see some problem occuring the Kernel mach and libsystem_kernel.dylib) and (libsystem_pthread.dylib) still i've no idea how to fix or what it means...
    this is the log of transmission, which usually just runs inside its app.
    Date/Time:       2014-03-19 09:20:22 +0100
    OS Version:      10.9.2 (Build 13C64)
    Architecture:    x86_64
    Report Version:  18
    Command:         Transmission
    Path:            /Applications/Transmission.app/Contents/MacOS/Transmission
    Version:         2.82 (14160)
    Parent:          launchd [156]
    PID:             440
    Event:           hang
    Duration:        1.97s (process was unresponsive for 21 seconds before sampling)
    Steps:           20 (100ms sampling interval)
    Hardware model:  MacBookPro6,2
    Active cpus:     4
    Fan speed:       1999 rpm
    Free pages:      156876 pages (+1491)
    Pageins:         0 pages
    Pageouts:        0 pages
    Swapins:         0 pages
    Swapouts:        0 pages
    Process:         Transmission [440]
    Path:            /Applications/Transmission.app/Contents/MacOS/Transmission
    Architecture:    x86_64
    Parent:          launchd [156]
    UID:             501
    Task size:       11271 pages (+2)
    CPU Time:        0.003s
    Importance:      Donating
    IO Policy:       Standard
    Note:            Unresponsive for 21 seconds before sampling
      Thread 0x3779     DispatchQueue 1          priority 47       
      20 ??? (Transmission + 5892) [0x100001704]
        20 ??? (Transmission + 6582) [0x1000019b6]
          20 NSApplicationMain + 448 (AppKit) [0x7fff8541c727]
            20 +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 357 (AppKit) [0x7fff854208db]
              20 -[NSBundle(NSNibLoading) loadNibNamed:owner:topLevelObjects:] + 197 (AppKit) [0x7fff85420aec]
                20 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 288 (AppKit) [0x7fff85420cfc]
                  20 loadNib + 327 (AppKit) [0x7fff8542175e]
                    20 -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:] + 1157 (AppKit) [0x7fff8542cc8d]
                      20 -[NSSet makeObjectsPerformSelector:] + 201 (CoreFoundation) [0x7fff8688a549]
                        20 ??? (Transmission + 15619) [0x100003d03]
                          20 -[NSWindow makeKeyAndOrderFront:] + 51 (AppKit) [0x7fff8557f7d6]
                            20 -[NSWindow orderWindow:relativeTo:] + 162 (AppKit) [0x7fff8558e220]
                              20 -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 786 (AppKit) [0x7fff8558e5a0]
                                20 -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 1972 (AppKit) [0x7fff8558eff6]
                                  20 -[NSView displayIfNeeded] + 1680 (AppKit) [0x7fff8557542a]
                                    20 -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 2828 (AppKit) [0x7fff85595fbf]
                                      20 -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectFor View:topView:] + 314 (AppKit) [0x7fff85598fd1]
                                        20 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectFor View:topView:] + 841 (AppKit) [0x7fff85599826]
                                          20 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2787 (AppKit) [0x7fff8559bdc0]
                                            20 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2787 (AppKit) [0x7fff8559bdc0]
                                              20 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1799 (AppKit) [0x7fff8559b9e4]
                                                20 -[NSScrollView _drawRect:clip:] + 78 (AppKit) [0x7fff8567fca9]
                                                  20 -[NSView _drawRect:clip:] + 422 (AppKit) [0x7fff8559c471]
                                                    20 -[NSView(NSLayerKitGlue) _drawRectAsLayerTree:] + 670 (AppKit) [0x7fff8559d7c1]
                                                      20 CAViewDraw + 54 (QuartzCore) [0x7fff8efaeeb0]
                                                        20 __psynch_mutexwait + 10 (libsystem_kernel.dylib) [0x7fff897db746]
                                                         *20 psynch_mtxcontinue + 0 (pthread) [0xffffff7f80b75a3b]
      Thread 0x37d1     DispatchQueue 2          priority 49       
      20 _dispatch_mgr_thread + 52 (libdispatch.dylib) [0x7fff85103152]
        20 kevent64 + 10 (libsystem_kernel.dylib) [0x7fff897dc662]
         *20 ??? (mach_kernel + 3949760) [0xffffff80005c44c0]
      Thread 0x37e2     priority 47         cpu time   0.003s
      20 thread_start + 13 (libsystem_pthread.dylib) [0x7fff8dcb7fc9]
        20 _pthread_start + 137 (libsystem_pthread.dylib) [0x7fff8dcb372a]
          20 _pthread_body + 138 (libsystem_pthread.dylib) [0x7fff8dcb3899]
            20 __NSThread__main__ + 1318 (Foundation) [0x7fff893f476b]
              20 -[NSUIHeartBeat _heartBeatThread:] + 2132 (AppKit) [0x7fff856a221d]
                20 usleep + 54 (libsystem_c.dylib) [0x7fff84120cb2]
                  20 __semwait_signal + 10 (libsystem_kernel.dylib) [0x7fff897dba3a]
                   *20 semaphore_wait_continue + 0 (mach_kernel) [0xffffff800023b5a0]
      Thread 0x37e4     priority 47       
      20 thread_start + 13 (libsystem_pthread.dylib) [0x7fff8dcb7fc9]
        20 _pthread_start + 137 (libsystem_pthread.dylib) [0x7fff8dcb372a]
          20 _pthread_body + 138 (libsystem_pthread.dylib) [0x7fff8dcb3899]
            20 ??? (Transmission + 431943) [0x100069747]
              20 ??? (Transmission + 460794) [0x1000707fa]
                20 ??? (Transmission + 650671) [0x10009edaf]
                  20 kevent + 10 (libsystem_kernel.dylib) [0x7fff897dc64a]
                   *20 ??? (mach_kernel + 3949760) [0xffffff80005c44c0]
      Thread 0x37e5     priority 47       
      20 thread_start + 13 (libsystem_pthread.dylib) [0x7fff8dcb7fc9]
        20 _pthread_start + 137 (libsystem_pthread.dylib) [0x7fff8dcb372a]
          20 _pthread_body + 138 (libsystem_pthread.dylib) [0x7fff8dcb3899]
            20 ??? (Transmission + 431943) [0x100069747]
              20 ??? (Transmission + 545880) [0x100085458]
                20 ??? (Transmission + 549400) [0x100086218]
                  20 ??? (Transmission + 366126) [0x10005962e]
                    20 __semwait_signal + 10 (libsystem_kernel.dylib) [0x7fff897dba3a]
                     *20 semaphore_wait_continue + 0 (mach_kernel) [0xffffff800023b5a0]
    This is the log of the Spotify hang, which installs through a installer.....
    Date/Time:       2014-03-19 09:17:16 +0100
    OS Version:      10.9.2 (Build 13C64)
    Architecture:    x86_64
    Report Version:  18
    Command:         Spotify
    Path:            Spotify.app/Contents/MacOS/Spotify
    Version:         ??? (???)
    Parent:          bash [385]
    Responsible:     Install Spotify [368]
    PID:             387
    Event:           hang
    Duration:        3.47s (process was unresponsive for 24 seconds before sampling)
    Steps:           33 (100ms sampling interval)
    Hardware model:  MacBookPro6,2
    Active cpus:     4
    Fan speed:       1994 rpm
    Free pages:      46388 pages (-1678)
    Pageins:         10 pages
    Pageouts:        0 pages
    Swapins:         0 pages
    Swapouts:        0 pages
    Process:         Spotify [387]
    Path:            Spotify.app/Contents/MacOS/Spotify
    Architecture:    i386
    Parent:          bash [385]
    Responsible:     Install Spotify [368]
    UID:             501
    Task size:       6271 pages
    Note:            Unresponsive for 24 seconds before sampling
      Thread 0x2f09     priority 57       
      33 ??? (Spotify + 33269) [0x91f5]
        33 ??? (Spotify + 62620) [0x1049c]
          33 ??? (Spotify + 1346690) [0x149c82]
            33 ??? (Spotify + 1347795) [0x14a0d3]
              33 ??? (Spotify + 302663) [0x4ae47]
                33 ??? (Spotify + 5056946) [0x4d39b2]
                  33 ??? (libcef.dylib + 9832) [0x5b5f668]
                    33 ??? (libcef.dylib + 34570767) [0x7c5520f]
                      33 ??? (libcef.dylib + 34572176) [0x7c55790]
                        33 ??? (libcef.dylib + 35281217) [0x7d02941]
                          33 ??? (libcef.dylib + 35277575) [0x7d01b07]
                            33 ??? (libcef.dylib + 34878617) [0x7ca0499]
                              33 ??? (libcef.dylib + 18343636) [0x6cdb6d4]
                                33 ??? (libcef.dylib + 18336291) [0x6cd9a23]
                                  33 ??? (libcef.dylib + 18337894) [0x6cda066]
                                    33 ??? (libcef.dylib + 18927361) [0x6d69f01]
                                      33 ??? (libcef.dylib + 18939243) [0x6d6cd6b]
                                        33 ??? (libcef.dylib + 18930022) [0x6d6a966]
                                          33 ??? (libcef.dylib + 18937985) [0x6d6c881]
                                            33 ??? (libcef.dylib + 36711472) [0x7e5fc30]
                                              33 CGLChoosePixelFormat + 117 (OpenGL) [0x98906019]
                                                33 ??? (OpenGL + 39344) [0x989069b0]
                                                  33 ??? (OpenGL + 26274) [0x989036a2]
                                                    33 cglBadApplicationNotMuxAwareLockDown + 54 (OpenGL) [0x98903556]
                                                      33 ??? (OpenGL + 24350) [0x98902f1e]
                                                        33 IOServiceOpen + 93 (IOKit) [0x98606aac]
                                                          33 io_service_open_extended + 171 (IOKit) [0x9866b574]
                                                            33 mach_msg_trap + 10 (libsystem_kernel.dylib) [0x943fff7a]
                                                             *33 hndl_mach_scall + 216 (mach_kernel) [0xffffff80002f38f8]
                                                               *33 ??? (mach_kernel + 824877) [0xffffff80002c962d]
                                                                 *33 mach_msg_overwrite_trap + 195 (mach_kernel) [0xffffff800021e043]
                                                                   *33 ipc_kmsg_send + 117 (mach_kernel) [0xffffff80002139f5]
                                                                     *33 ipc_kobject_server + 241 (mach_kernel) [0xffffff8000226bf1]
                                                                       *33 ??? (mach_kernel + 745563) [0xffffff80002b605b]
                                                                         *33 is_io_service_open_extended + 341 (mach_kernel) [0xffffff80006cac65]
                                                                           *33 AppleMuxControl::newUserClient(task*, void*, unsigned int, OSDictionary*, IOUserClient**) + 80 (AppleMuxControl) [0xffffff7f8258df36]
                                                                             *33 IOWorkLoop::runAction(int (*)(OSObject*, void*, void*, void*, void*), OSObject*, void*, void*, void*, void*) + 62 (mach_kernel) [0xffffff80006acf4e]
                                                                               *33 AppleMuxControl::newUserClientGated(void*) + 144 (AppleMuxControl) [0xffffff7f8258deb2]
                                                                                 *33 AppleGraphicsControlClient::start(IOService*) + 36 (AppleMuxControl) [0xffffff7f8258e688]
                                                                                   *33 AppleGraphicsControlClient::startEx(IOService*) + 124 (AppleMuxControl) [0xffffff7f8258e71c]
                                                                                     *33 AppleMuxControl::addTaskToList(IOService*, unsigned int, char*, bool) + 524 (AppleMuxControl) [0xffffff7f8258d458]
                                                                                        *33 IOEventSource::sleepGate(void*, unsigned int) + 69 (mach_kernel) [0xffffff80006ad5e5]
                                                                                          *33 IOGraphicsWorkLoop::sleepGate(void*, unsigned int) + 106 (IOGraphicsFamily) [0xffffff7f80b866d6]
                                                                                            *33 lck_mtx_sleep + 78 (mach_kernel) [0xffffff800022d1be]
                                                                                              *33 thread_block_reason + 204 (mach_kernel) [0xffffff8000235d8c]
                                                                                                *33 ??? (mach_kernel + 223627) [0xffffff800023698b]
                                                                                                  *33 machine_switch_context + 354 (mach_kernel) [0xffffff80002d7e42]
      Thread 0x2f12     DispatchQueue 2707864236 priority 48       
      33 _dispatch_mgr_thread + 52 (libdispatch.dylib) [0x97fc5546]
        33 kevent64 + 10 (libsystem_kernel.dylib) [0x94405992]
         *33 ??? (mach_kernel + 3949760) [0xffffff80005c44c0]
      Thread 0x2f18     priority 46       
      33 thread_start + 34 (libsystem_pthread.dylib) [0x9727fcf2]
        33 _pthread_start + 130 (libsystem_pthread.dylib) [0x9727a485]
          33 _pthread_body + 144 (libsystem_pthread.dylib) [0x9727a5fb]
            33 ??? (Spotify + 2539575) [0x26d037]
              33 mach_msg_trap + 10 (libsystem_kernel.dylib) [0x943fff7a]
               *33 ipc_mqueue_receive_continue + 0 (mach_kernel) [0xffffff8000216800]
      Thread 0x2f2c     priority 46       
      33 thread_start + 34 (libsystem_pthread.dylib) [0x9727fcf2]
        33 _pthread_start + 130 (libsystem_pthread.dylib) [0x9727a485]
          33 _pthread_body + 144 (libsystem_pthread.dylib) [0x9727a5fb]
            33 ??? (Spotify + 11173138) [0xaa8d12]
              33 ??? (Spotify + 7110193) [0x6c8e31]
                33 ??? (Spotify + 7109735) [0x6c8c67]
                  33 ??? (Spotify + 11177224) [0xaa9d08]
                    33 pthread_cond_wait$UNIX2003 + 71 (libsystem_pthread.dylib) [0x9727ebd9]

    I see noting weird in here
    Hardware Information:
              MacBook Pro (15-inch, Mid 2010)
              MacBook Pro - model: MacBookPro6,2
              1 2.4 GHz Intel Core i5 CPU: 2 cores
              4 GB RAM
    Video Information:
              Intel HD Graphics - VRAM: 288 MB
              NVIDIA GeForce GT 330M - VRAM: 256 MB
    System Software:
              OS X 10.9.2 (13C64) - Uptime: 0 days 0:26:50
    Disk Information:
              TOSHIBA MQ01ABD075 disk0 : (750,16 GB)
                        EFI (disk0s1) <not mounted>: 209,7 MB
                        Macintosh HD (disk0s2) /: 749,3 GB (729,06 GB free)
                        Recovery HD (disk0s3) <not mounted>: 650 MB
              HL-DT-ST DVDRW  GS23N 
    USB Information:
              Apple Internal Memory Card Reader
              Apple Inc. Apple Internal Keyboard / Trackpad
              Apple Inc. BRCM2070 Hub
                        Apple Inc. Bluetooth USB Host Controller
              Apple Computer, Inc. IR Receiver
              Apple Inc. Built-in iSight
    FireWire Information:
    Thunderbolt Information:
    Kernel Extensions:
    Problem System Launch Daemons:
    Problem System Launch Agents:
    Launch Daemons:
              [loaded] com.adobe.fpsaud.plist 3rd-Party support link
    Launch Agents:
    User Launch Agents:
    User Login Items:
              iTunesHelper
    Internet Plug-ins:
              FlashPlayer-10.6: Version: 12.0.0.77 - SDK 10.6 3rd-Party support link
              Flash Player: Version: 12.0.0.77 - SDK 10.6 3rd-Party support link
              QuickTime Plugin: Version: 7.7.3
              Default Browser: Version: 537 - SDK 10.9
    Audio Plug-ins:
              BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
              AirPlay: Version: 2.0 - SDK 10.9
              AppleAVBAudio: Version: 203.2 - SDK 10.9
              iSightAudio: Version: 7.7.3 - SDK 10.9
    3rd Party Preference Panes:
              Flash Player  3rd-Party support link
    Bad Fonts:
              None
    Old Applications:
              None
    Time Machine:
              Time Machine not configured!
    Top Processes by CPU:
                   6%          WindowServer
                   2%          Safari
                   2%          hidd
                   1%          EtreCheck
                   0%          Dock
    Top Processes by Memory:
              135 MB          Safari
              127 MB          iTunes
              102 MB          WindowServer
              102 MB          Mail
              66 MB          com.apple.WebKit.WebContent
    Virtual Memory Information:
              1.52 GB          Free RAM
              1.47 GB          Active RAM
              227 MB          Inactive RAM
              672 MB          Wired RAM
              270 MB          Page-ins
              0 B          Page-outs

  • Running java swing apps thru telnet... [Is this possible?]

    Hi All!
    I am just wandering if it is possible to run swing applications thru telnet since everytime I run it... it returns ang error....
    Exception in thread "main" java.lang.NoClassDefFoundError: sun/awt/X11GraphicsEnvironment
    at java.lang.Class.forName1(Native Method)
    at java.lang.Class.forName(Class.java:173)
    at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:90)
    at at sun.awt.motif.MToolkit.<clinit>(MToolkit.java:109).null(Unknown Source)
    at java.lang.Class.forName1(Native Method)
    at java.lang.Class.forName(Class.java:173)
    at java.awt.Toolkit$2.run(Toolkit.java:754)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:745)
    at javax.swing.ImageIcon.<init>(ImageIcon.java:226)
    at javax.swing.LookAndFeel$1.createValue(LookAndFeel.java:295)
    at javax.swing.UIDefaults.getFromHashtable(UIDefaults.java:203)
    at javax.swing.UIDefaults.get(UIDefaults.java:148)
    at javax.swing.MultiUIDefaults.get(MultiUIDefaults.java:65)
    at javax.swing.UIDefaults.getIcon(UIDefaults.java:429)
    at javax.swing.UIManager.getIcon(UIManager.java:562)
    at javax.swing.plaf.basic.BasicOptionPaneUI.getIconForType(BasicOptionPaneUI.java:600)
    at javax.swing.plaf.basic.BasicOptionPaneUI.getIcon(BasicOptionPaneUI.java:586)
    at javax.swing.plaf.basic.BasicOptionPaneUI.createMessageArea(BasicOptionPaneUI.java:337)
    at javax.swing.plaf.basic.BasicOptionPaneUI.installComponents(BasicOptionPaneUI.java:178)
    at javax.swing.plaf.basic.BasicOptionPaneUI.installUI(BasicOptionPaneUI.java:146)
    at javax.swing.JComponent.setUI(JComponent.java:475)
    at javax.swing.JOptionPane.setUI(JOptionPane.java:1725)
    at javax.swing.JOptionPane.updateUI(JOptionPane.java:1747)
    at javax.swing.JOptionPane.<init>(JOptionPane.java:1710)
    at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:832)
    at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:646)
    at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:617)
    at JTest.main(JTest.java:40)
    Source Code:
    import javax.swing.*;
    import java.awt.*;
    public class JTest extends JFrame{
    JPanel pnlMain = new JPanel();
    JLabel lblMsg=new JLabel("This is only a test.");
    Font font=new Font("Arial", Font.BOLD, 28);
    public JTest(){
    try{
    this.setTitle("Unix Frame Testing");
    this.setBounds(10,10,500,100);
    this.setVisible(true);
    this.setDefaultCloseOperation(this.EXIT_ON_CLOSE);
    lblMsg.setFont(font);
    lblMsg.setBounds(100,10,250,50);                    
    pnlMain.setLayout(null);
    pnlMain.add(lblMsg);
    this.setContentPane(pnlMain);
    }catch(Exception e)
    { System.out.println("Unable to Display Window.");
    JOptionPane.showMessageDialog(null,"Unable to Display Window.","Error",JOptionPane.INFORMATION_MESSAGE);
    System.exit(0);
    public static void main(String args[]){
    JTest test=new JTest();
    }

    "scripts" are entirely different from GUI applications. What do you expect to happen when you run a Swing application through telnet on another machine? Do you expect the Swing UI to be magically transported to the local Windows machine?
    Not gonna happen. Yes, like ejp hinted, you could run an X-environment on your local machine and have the Swing UI tunnel its output there, but are you sure you want GUI apps to run on a remote machine like that? It's not gonna be fun to work with, I'll tell you that.
    Why not create a Java WebStart app (or perhaps even an applet) out of your application, so your users can run the application locally?

  • Is it possible to run my swing app in another jre

    Hi All,
    I have a swing app jar deployed in the server having jre. It may be possible that the client may have a lower version of jre. In that case would it be possible to download the jre itself from the server (local server not Sun server) and then the run the application in the downloaded jre. The client may be in windows or linux. Please give me steps to go about it. Am new to web start. Please help ASAP.
    Thanks to all the folks out there keeping the java community alive and kicking

    Hi Andy,
    I wanted to bring the jre on the client machine on par with the one in my server which hosts the application to be launched by web start. I had posted a query on how to install a newer version of jre other than using the sun's auto installer site. I had to search high and low for such a solution. Finally got a set of servlets called web start services from the following site :
    http://lopica.sourceforge.net/.
    It helped me to host the jre installer on my server itself which woulc be used by the client to install a higher version of jre if required. I was trying to install a runtime installer of jre as per their instructions. I created a jar file called jre_1.5.05.jar created by doing a jar -cvf on the jar directory. And gave the j2se version required as <j2se version="1.5.05"> and then my helloapp.jar. Everything goes fine during the installation. It also asks me for the reboot and I did the same. However when I try to run the application, it says
    "Bad Installation. Error involving Java VM (SysExec) and then points to the directtory inm the cache as .ext/E11332440658/bin/javaw.exe.
    So I went to the directory .ext/E11332440658 in the cache. and I see that the jar has been in jarred as jre_1.5.0_05/bin/javaws.exe which should have been the actual path where web start should have looked.
    Do you have any idea why it happened? Is it possible to correct it without doing anything manually at the client side? Please reply ASAP.
    Zeus.

  • Can't run any swing apps??!?!?

    Hello!
    I have a very confusing problem, I'm trying to run the "Java Web Start" gui.
    It starts and shows a Window frame (with "minimize","maximize" and the Close"X"), but the rest is gray.
    Nothing changes if I try to resize, or just wait (it stood for over 1 hour).
    I also tried the "htmlConverter" gui with the same result. Then I tried the simplest Swing program from the Swing tutorial with the same result, but then I right clicked on the little icon on the start menu which resulted in the gui being painted. When I moved the window it went all gray again until i right clicked on the icon again.
    Eclipse runs fine, but it is not a swing app.
    I run on Windows XP (Home) with all the latest uppdates and J2SDK1.4.2_04.
    I have uninstalled and tried older versions of J2sdk with no success.
    I have no idea what's going on, can somebody please help.
    Regards, Calle

    Hello!
    I have now kind of solved this problem.
    I found this in another forum:
    http://forum.java.sun.com/thread.jsp?forum=32&thread=330898
    I did what it say's, turned of 3D accelaration, and now it works like it should.
    I have a ATI Radeon 9800 256Mb graphic card, and it seems like this is the cause of the problem.
    If someone read this and know if I should submit this as a Java2D bug please tell me and I will.
    Regards Calle

  • Problems running a particular app via ssh and remote X

    Got a few apps (including things like Matlab etc.) running off one of our Linux application servers.
    Am now trying to run Stata (using xstata-se) via SGD and it will simply not work.
    It works perfectly if you manually log in to the application server from a terminal with ssh -X and run the executable, but when using SGD, it connects, finds the application, says it's starting it, but then the connection to the Linux server is simply closed. The application session (with pause/play/X buttons etc.) remains even though an X window never appears.
    I've duplicated the Matlab application that works perfectly and simply changed the executable name, so nothing is configured differently but it still refuses to work, instead simply closing the connection.
    The /opt/tarantella/var/log/webtop.log on the specific SGD server shows that the app starts correctly, yet no X window ever appears - all other X apps work fine...
    I've found that there are errors logged in /opt/tarantella/var/log/wm_error.log with:
    X connection to unix:11.0 broken (explicit kill or server shutdown).
    Any ideas?
    Edited by: Hutch on 23-Feb-2011 07:28

    I was having the same issue with Eclipse. If I launched an xterm and then ran eclipse it worked fine but as a published application, it would die after showing the Eclipse splash screen for a second. Adding the ampersand to the end of the launch command fixed it. Strange.
    Thanks for following up your post with the fix. I don't think backgrounding the process from the SGD launcher would have ever occurred to me.

  • Problem when moving our app to Linux platform

    Hi to all,
    My app uses Java swings which will work only on windows (platform dependent).
    We used Windows LookandFeel and font for labels as Arial, Tahoma... and set the size for each component according to the windows look and feel, while we developed our app.
    If we change the look and feel to Metal look and feel, labels will not be displayed fully. (Instead of displaying the label as Observation, it displays Observ...). Everywhere in the view, we were facing this problem if we change the look and fell.
    Now we are trying to make our app to be platform independent for which we are working with Linux.
    While working with linux, there is no windows look and feel and no font called Tahoma or Arial.
    Because no font called Arial or Tahoma exist and there is no windows look and feel, Instead of displaying the label as Experimenting, it is displaying as Experim..... This problem occurs everywhere in my apps.
    Also wherever we used Labels in the classes (nearly some 150 class), we specified the font as Tahoma.
    Is there any alternative in Java like Macros (Preprocessor) in C, so that wherever we used the word Tahoma, everywhere it will be changed, if i change it in one place.
    Thanks in advance.

    Bala wrote:
    But how to make the components fully visible and avoid the above problem, even if we change different look and feel and runs on different platforms?IMO: the only real way is to use a cross-platform look & feel so the app looks the same on all environments - it doesn't have to be a built-in one, there are plenty of cool look & feels to be found on the net. In any other case its the same as developing a website: where you would have to create CSS and test it under each browser that you want to support, in the case of Swing you have to create the GUI with system look & feel and test it under every environment that you want to support; tinker and adjust until it works everywhere.
    Another option which is even more of an overhaul is to build on top of the Netbeans platform, which is designed to display correctly in Windows, Mac and Linux (although you can probably still screw it up if you're not careful) and also gives you access to advanced features such as docking windows.

  • Best way to run M$ windows apps on linux ?

    hi everyone,
    i plan on getting rid of my windows partitions. but that's big deal because i need to run a few (exotic) programs that are made for windows. i need to find a way to use them in linux, be it through a windows emulator or a computer emulator (or whatever).
    please don't tell me to find linux equivalents to these programs i need to run, there's just nothing similar on linux.
    on some of those programs i need audio to work.
    so far i tried wine, qemu (with kqemu), and a combination of qemu and vmplayer (kind of "free" vmware).
    my feelings are the following :
    - wine improved A LOT during the past year (i really mean it), but my programs are a little buggy (at best). that does not make the usable for day to day use.
    - qemu is sooooo slooooow it is barely usable. it took me 4 hours to get a working installation of windows xp (ok, i was multitasking, but still. for the first time ever my system swapped - could this be a memory leak ?)
    - qemu + kqemu is toooo sloooooow as well (i suppose when they say near-native speed, it means 1/10 to 1/2 of native speed)... i've been very very disapointed.
    - on qemu (and kqemu) i haven't tried the programs i need yet, the windows install process finished too late in the night...
    - qemu + vmplayer :  qemu is used to generate an image which is then used by vmplayer. i used this trick on gentoo once, and i can tell you this was the best solution i tried so far. usable speed, functional programs. but i didn't achieve to get the sound workind (might need a bit of tuning).
    apart from those ones, do you know of usable solutions to get windows apps running on linux ? i need them to just works at reasonable speed, with audio, and, if possible, printing.
    any tricks that could improve speed or compatibility are appreciated as well.
    tia

    vmware-server isnt 'for server emulation' but that can be one of it's uses.
    vmware player doesnt allow you to create vm's. vmware server does. vmware server is able to do *almost* anything that vmware desktop can do. It's got the added benefit that if X crashes, or you close the frontend X app, the vm's still keep running on the daemon.
    So it could be considered to be oriented towards usage for servers - I myself ran a openbsd server on it for a while. -- but it doesnt have to be used for that, and I use it for testing other distros, and I have Win XP installed to an image too.
    vmware server does support sound, and im pretty sure you can make images that will work in vmplayer.
    James

  • Help! File in use problem when using Swing app

    Hi. I got a program that is pretty much a JFileChooser that prints to standard output the path of the file that I've chosen. If I invoke the DOS command:
    java JFileChooserDemo, I will get the following as expected from the program:
    "You chose a file named: C:\MyJava\Book.xls".
    But if I invoke the following DOS command:
    java JFileChooserDemo > output.txt, the file "output.txt" contains the following:
    "GetModuleHandleA succeed
    LoadLibrary returns baaa0000
    You chose a file named: C:\MyJava\Book.xls"
    So, if I try to open the file or try to modify "output.txt", I get an error message stating that the file is in use.
    What's weird is that, I THINK if I have a program that DOES'NT use Swing or anything GUI-related and prints to standard output with the DOS "> outfile" command, I won't get this problem. So in other words, I can duplicate this problem with a sample Swing application that prints to standard output. Try it yourself.
    In my original program, it does have an event handler that closes the JFileChooser and its container and exits the system via "System.exit(0);", but for some reason, something still has "locked" the output.txt file. I even did the ctr+alt+del and can't find anything that would lock the output.txt file. What's even weirder is that if I run the application again, but output to a different file like "output2.txt", this file is not locked, but the "output.txt" file still is. output2.txt also don't have contain the
    "GetModuleHandleA succeed
    LoadLibrary returns baaa0000" message.
    The only way I know of that would "unlock" output.txt is to re-boot my computer.
    So it seems I have to modify my program somehow because it appears the OS still thinks output.txt file is still in use.
    Someone may think why would I invoke the java interpreter with the DOS "> outfile" command. Well, the reason being, I got a different version of the program that executes a query and I want it to create a delimited text file that contains the resultset of the query, so that I can then import it to Access, Excel, or whatever. But, because of this problem, I can't modify the query result without having to either run the application again and created another file name with the same result or re-boot. Of course, this would be silly.
    Any help in how I can modify my program or any GUI-program so that if I invoke the DOS "> outfile" command, the outfile won't be "locked" would be greatly appreciated. Thanks. If you want my program, you can e-mail me or run any sample program from the Swing Tutorial that prints to standard output and just add the " > outfile" to the java interpreter command.
    -Dan
    [email protected]

    Oops sorry, forgot to add the code. Here it is:
    BTW, can I edit posts? Oh well...
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.filechooser.*;
    public class FileChooserDemo2 extends JFrame {
    static private String newline = "\n";
    public FileChooserDemo2() {
    super("FileChooserDemo2");
    //Create the log first, because the action listener
    //needs to refer to it.
    final JTextArea log = new JTextArea(5,20);
    log.setMargin(new Insets(5,5,5,5));
    log.setEditable(false);
    JScrollPane logScrollPane = new JScrollPane(log);
    JButton sendButton = new JButton("Attach...");
    sendButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    JFileChooser fc = new JFileChooser();
    fc.addChoosableFileFilter(new ImageFilter());
    fc.setFileView(new ImageFileView());
    fc.setAccessory(new ImagePreview(fc));
    int returnVal = fc.showDialog(FileChooserDemo2.this,
    "Attach");
    if (returnVal == JFileChooser.APPROVE_OPTION) {
    File file = fc.getSelectedFile();
    /** The next 2 lines I added, the rest of the code is original taken from the Swing Tutorial **/
    System.out.println("You chose a file named: " +
                             fc.getSelectedFile().getPath());
    log.append("Attaching file: " + file.getName()
    + "." + newline);
    } else {
    log.append("Attachment cancelled by user." + newline);
    Container contentPane = getContentPane();
    contentPane.add(sendButton, BorderLayout.NORTH);
    contentPane.add(logScrollPane, BorderLayout.CENTER);
    public static void main(String[] args) {
    JFrame frame = new FileChooserDemo2();
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    frame.pack();
    frame.setVisible(true);

  • Problem running my Java apps in my LG phone. Please help!

    Hi all!!
    I am quite new to the world of J2me, altough I've been coding Java for quite a few years now.
    Recently I bought a LG u 8120 phone with Java-support so I decided it was time to step into the mobile Java-world.
    Now I have written my first small app, a simple timer application which my phone (strangely enough) does not already have.
    So what happens is this : I create my app on my PC and package it with the WTK into a jar -file and a jad-file which i transfer to the phone.
    After this I can see the name of my app in the list of available programs in the phone. But when I try to run it: Nothing. The Java logo shows up for a few seconds and then I am tossed back to the menu.
    I have thought of the following as possible problems:
    1. the 8120 does not support MIDP2.0
    2. I am doing something wrong transfering the files
    3. I have missed out on one or several necessary steps in the process
    Anyone who have developed Java apps for LG phones who can give me some hints?
    I've used the Sun J2ME Wireless Toolkit 2.2 with MIDP2.0 and CLDC1.1 .
    The apps works fine in the emulator. The problem starts when I want to run it in the phone. The phone I've tried is an LG u8120. LG apparently does not want to make life easy for its customers, so there is no support for transfering Java apps in the vendor-supplied software. I suppose that's because they want you to only download stuff from their site. However, after surfing around on some discussion forums for a while I found a program called G-thing which can be used to upload Java apps to LG-phones via USB.
    Any help is very appreciated!
    Thanks,
    Sarah

    Thanks,
    I have tried this and ruled out some of the possible causes.
    When I added some more exception handling, I could see that a "java.lang.IllegalArguenException" is thrown.
    When I ran the AudioDemo package that came with WTK2.2 I noticed that the examples that uses WAV-files do not work while the rest works fine.
    My new theory is now that the u8120 does not support the WAV-format, so I will try with an mp3 instead and see what happens.
    Anyone who knows if LG-phones support WAV-format?
    /Sarah

Maybe you are looking for