WindowsLookAndFeel on Linux : BIG PROBLEM

Hello,
I have implemented a GUI application with the windows look and feel. I work under Linux with the jdk 1.3 and eclipse.
To run my application with the windows lf, I add the following lines in my code :
System.setProperty("os.name","Not Windows");
try {
     UIManager.setLookAndFeel(new WindowsLookAndFeel());
} catch (Exception e) {
          e.printStackTrace();
          SwingUtilities.updateComponentTreeUI(getRootPane());

Availability of specific L&F is platform dependent. On a given Platform, you usually have the choice between the local one or the standard Java one (aka "Metal").
Forcing innocent Linux users to use a Windows L&F would not do much good to the popularity of your software anyway :-) "Look" isn't everything, the "Feel" part is important too (default keys, some window behavior), and your app you remain consistent with the rest of the Linux desktop.

Similar Messages

  • WindowsLookAndFeel on Linux : BIG  and complete PROBLEM

    Hello,
    I have implemented a GUI application with the windows look and feel. I work under Linux with the jdk 1.3 and eclipse.
    To run my application with the windows lf, I add the following lines in my code :
    System.setProperty("os.name","Not Windows");
    try {
         UIManager.setLookAndFeel(new WindowsLookAndFeel());
    } catch (Exception e) {
              e.printStackTrace();
              SwingUtilities.updateComponentTreeUI(getRootPane());
    In Eclipse, it works well, but an execution from the line command in a Xterm generate the following exception :
    java.lang.NumberFormatException: multiple points
         at java.lang.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1073)
         at java.lang.Float.valueOf(Float.java:186)
         at com.sun.java.swing.plaf.windows.WindowsLookAndFeel.initialize(WindowsLookAndFeel.java:108)
    It seems that the problem is caused by the following line :
    System.getProperty("os.name","Not Window");
    the system property os.name is parsed as a float.
    what can I do to run my application with the windows lf and under linux ?
    any help will be helpful
    Regards,
    Anne

    In Eclipse, it works well, but an execution from the
    line command in a Xterm generate the following
    exception :
    java.lang.NumberFormatException: multiple points
    at
    java.lang.FloatingDecimal.readJavaFormatString(Floatin
    Decimal.java:1073)
         at java.lang.Float.valueOf(Float.java:186)
    at
    com.sun.java.swing.plaf.windows.WindowsLookAndFeel.ini
    ialize(WindowsLookAndFeel.java:108)Make sure that Eclipse is using the JDK matching the JRE you use to run the program (Windows/Preferences/Java/installed JREs or somesuch)
    It seems that the problem is caused by the following
    line :
    System.getProperty("os.name","Not Window");
    the system property os.name is parsed as a float.Using an official System property is shooting yourself in the foot. You can't tell what else on in the Java runtime has a depency on it. You can set your own property
    for this (System.setProperty("MyFalseOpsSys","Not Windows")). I wonder what use you have for it since you force the Windows L&F anyway?
    >
    what can I do to run my application with the windows
    lf and under linux ?
    any help will be helpful Maybe find a JRE which supports it natively. Or, if you are very lucky, extract the relevant classes and resources from the JAR of a Windows JRE (in Sun's rt.jar, com/sun/java/swing/plaf/windows/) and put them into some independent JAR you add to your Linux classpath. For better luck, use the very same version for both JRE. Pray that there are no native methods involved.

  • ODBC Linux Memory Problem

    Hi,
    I seem to have a big problem with an application I've made.
    The application connects to a Oracle Database, fills the database with arround 1GB of information. Once the database is filled my application launches a series of queries to test performance.
    My problem is when working with Oracle 11 in Linux (Fedora and Oracle Enterprise Linux). Apparently I can't seem to get past the database filling process. The free memory vanishes quite fast, eaten up between my application proces' and Oracle's. Now, I know the problem is not with my application because the same code works perfectly in the following databases:
    Windows:
    - Oracle 10R2
    - Oracle 11g
    - PostgreSQL 8.3
    - MySQL 5.1
    - MySQL 6-alpha
    - SQL Server 2005 Express Edition
    Linux:
    - PostgreSQL 8.3
    - MySQL 5.1
    - MySQL 6-alpha
    My application actually connects to the database and starts executing the inserts successfully. It's just that at some point the memory gets filled up, pretty quickly actually. I've watched the through vmstat. The first one to fall is the free memory, then follows the cache memory. And then it starts filling up swap. When it reaches to 2GB of used swap the behavior differs with the Linux Distribution: Fedora Core 8 crashes horribly, in Oracle Enterprise Linux at some point my application's process goes to "sleep" and I seem to still be able to do other things.
    To connect to the database I use the [OTLv4 library|otl.sourceforge.net]. One might think that my problem is with OTL, but I use the same OTL in all those cases, and unless it's an issue between Oracle in Linux and OTL I don't think it's an OTL issue.
    Can anyone push me in some direction ?
    Thanks.

    Well, you seem to have a memory leak in your application, assuming nothing else is running. Check out the top(1) program; you can get it to sort the displayed processes according to how much %MEM (percent of memory) they are using. First entry is the culprit.
    The best way I've found to locate a memory leak is to run your program using valgrind(1). This tool runs your application in a virtual CPU built in to valgrind(1). It can detect tons of different memory usage issues, from using an un-initialized variable to leaked memory.
    Of course, you may not have a memory problem. Does you program generate huge bursts of I/O or is the I/O more evenly paced? Kernel I/O backlog can consume memory quickly. While your application is running, open two more windows. In one, run the command:
    $ watch -n3 -d cat /proc/meminfo
    and in the other:
    $ watch -n3 -d cat /proc/slabinfo
    Try to figure out what memory usage is steadily increasing; that can tell us if the app is leaking or the I/O channels just can't keep up.
    Hope this gives you some ideas about how to proceed.

  • Big problem with a select using remote database

    Hi Guy.
    I have a big problem with a simple query, but this is a scenario.
    Actuallly I'm in Alexandria - Egypt with a server with Oracle 10.2.0.4 database 32 bit on linux Red Hat as 4.8. the server can connect to another database oracle but 9.2.0.6 installed on Red Hat As 4.5 placed in Milano Italy . Ttwo networks are connected via two adsl cisco router with firewall and Vpn functions. In Egypt there isn't a very good adsl.
    In Alexandria, I'm trying to connect to database in Italy with sqlplus. The sqlplus connected I write.. select * from addetti and all work fine.
    My problem is that when I try to make the same select on a table with many columns oracle database kill me a session.
    My table (ic_lav) is long 174 colums 1924 byte for row. Well when I write a query with select * from ic_lav all oracle close my session.
    So I began to change my query I start to
    select field1 from ic_lav... and work
    select field1,field2,field3,..........field50 from ic_lav and work
    select field1,field2,field3,..........field70 from ic_lav and doesn't work
    the select work with 68 columns
    problem: the query with more then 1064 byte for row doesn't work.
    I've tryed with anoter big table with the same problem, but the select fwork with 65 columns...
    Iit is obvious that there is any problem with the limit of the query.
    The same query (select * from ic_lav) in localMilano)l work fine.
    The same query (select * from ic_lav) in vpn with a better adsl line and openvpn software (NO CISCO firewall) WORK FINE.
    The same query connectetd in Milano with a vpn make with analogic modem and remote access by windows work fine.
    the query (make on my laptop connectet with vpn by cisco doesn't work.
    In cisco firewall we haven't any error (cisco man tell me so)
    on database 9 I found :
    *** 2009-06-12 09:49:45.509
    *** SESSION ID:(66.44406) 2009-06-12 09:49:45.497
    FATAL ERROR IN TWO-TASK SERVER: error = 12152
    *** 2009-06-12 09:49:45.509
    ksedmp: internal or fatal error
    Current SQL statement for this session:
    select * from ic_lis where ditta
    ----- Call Stack Trace -----
    but I don't understand why the lost connection problem (bug 3816595 A processstate dump is produced for a lost connection (12152) ) is caused by len of row
    Anybody have some idea ?
    Thank you

    My table (ic_lav) is long 174 colums 1924 byte for row. Well when I write a query with select * from ic_lav all oracle close my session.Do you get any error?
    If the query length is a problem, you could create a view and query the view instead to see if this problem is resolved.

  • Windows 10 preview build 10049 BIG PROBLEM

    hello,
    i got a very big problem after updating to build 10049. after the installation was complete my laptop restarted and i got a black screen with in the botom right corner the build number 10049. after a couple of hours the laptop restarts itself but it keeps
    getting on this black screen.
    i tried a iso of windows 10 preview latest iso build on a usb stick but with every solution i try: format, repair it keeps getting the same error that there is a problem with unmountable bootdevice.
    even using my official windows 8 dvd gets the same problem
    i'm lost. i dont know how to solve this problem.
    can someone please help me with this?

    This is not a one off, it is repeatable on brand new disks.
    I previously had the original win10 preview build installed on this hard drive = no problems.
    I then did a fresh install of build 9879 from CD. Install completed untill it got to the reboot phase = it would not reboot - the hard drive was not recognized in the bios anymore.
    tested broken hard drive in another computer = works
    tested broken hard drive in 2nd connector on my laptop = fail (still not seen by bios).
    tested a few other sata disks I have laying around on both connectors of my laptop = pass.
    upgrade my bios as there is one version higher than I had. = fail (still not seen by bios).
    boot from broken hard drive on another computer and finish the OOB portion of the win 10 preview install = pass
    So it seems clear that the hard drive is still working, but just not recognized on the original computer. It is only 2 months old so I get it replaced under warranty. Replacement disk is recognized by bios, yeah! I then restore image of broken hard drive
    to this replacement. Disk is still recognized by bios. I boot up from this disk on my laptop. It works OK until first reboot, then is not recognized by bios anymore.
    Computer = Toshiba Satelite P305 PSPC8U-01400Q
    Hard disk = WD blue 1TB  model: WD10JPVX-22JC3T0
    Note: also with windows 8 running on this computer and the broken hard drive installed in second connector, windows also does not see it, neither through disk manager nor through diskpart command line. But if I boot up in Linux from a bootable USB flash
    drive, then I can see the (broken disk) on this same computer. Yes I can see it and I can read and write to the filesystem, even though it is still not seen by the bios. 
    HI
    Disable PUIS (Power-Up In Standby) with HDAT2.EXE  With PenDrive BOOT MS-DOS

  • I have a big probleme ,i download lynux on my ipod

    i have a big probleme ,i download lynux on my ipod and them
    when i turn on:a folder and icant go on my ipod please help me!
    scuse me for eror on the texte :Im talk French

    p.S:and while passing in did not have of warning for linux or of information saying to me that that will not go on new the ipod
    Yes, it did. Go to the homepage (http://www.ipodlinux.org). Click on "Is my iPod Supported?". Scroll down to the 5th Generation iPod.
    http://ipodlinux.org/Generations#FifthGeneration_:_iPod_withVideo
    In red: NOT SUPPORTED BY IPODLINUX
    And at the top of that page, also in red:
    Note: Items that are not officially supported have had some success with the devs, but you should only consider installing iPodLinux on those generations if you are an advanced computer user, preferrably running Linux or Mac OS X. Ask questions about those iPods in moderation, and only if you know what you're doing. If you don't know what you're doing, we are free to ignore you.

  • Hello all .. i have a big problem in my ipad version 5.1.1 that is when i connect the ipad with my computer the i tunes give me this message ( itunes couldnt connect to this ipad .an unknown error occurred (0xE8000012).) how i can solve this problem pleas

    hello all .. i have a big problem in my ipad version 5.1.1 that is when i connect the ipad with my computer the i tunes give me this message ( itunes couldnt connect to this ipad .an unknown error occurred (0xE8000012).) how i can solve this problem please
    and this is an pic for the problem

    There is some troubleshooting for 0xE8 error codes on this page : http://support.apple.com/kb/TS3221 - you could see if anything on that page fixes it

  • Hi I've a big problem with adobe acrobat reader XI pro and I hope you can help me. The problem is; when I past copied text from some pdf books (not all of them) it past symbols only! wherever I past it! and even if I coped that text from another pdf reade

    Hi
    I've a big problem with adobe acrobat reader XI pro and I hope you can help me.
    The problem is; when I past copied text from some pdf books (not all of them) it past symbols only! wherever I past it! and even if I coped that text from another pdf reader (adobe pdf reader, internet browsers, ...etc.).
    This problem started to happen since yesterday when I installed adobe acrobat reader XI pro to try it before I buy it, and before that when I was using the free adobe pdf reader I was totally able to copy any text from any pdf and past it anywhere with nothing wrong.
    What can I do?
    thank you a lot.

    There is no product called Adobe Acrobat Reader Pro. There is
    - Adobe Acrobat Pro ($$)
    - Adobe Reader (free)
    Which do you have? And are you a programmer?

  • I am having a big problem. I am not getting notifications from snapchat and only snapchat. I've made sure every notification setting was on and it just won't work. I have also restored my phone and deleted the app and re-downloaded it multiple times. Help

    I am having a big problem. I am not getting notifications from snapchat and only snapchat. I've made sure every notification setting was on and it just won't work. I have also restored my phone and deleted the app and re-downloaded it multiple times. It just wont give me my notifications. Help please.

    Go to Settings > Privacy > Location Services.
    Turn off SnapChat.
    Go to Settings > Notification Center
    Turn off SnapChat.
    Restart the device.
    Go to Settings > Privacy > Location Services.
    Turn on SnapChat.
    Go to Settings > Notification Center
    Turn on SnapChat.
    Test the issue.

  • How to load an image without a gui? big problems...

    Hey guys, I usually try my best to not ask for help and figure stuff out myself. But this last week i've been having big problems with this work project.
    My goal is to load images from disk, and append them to each other to create one big image.
    The images are 0-9.jpg each file containing a number in it. then i create one big file with 4 numbers in it. called final.jpg.
    so far i can do all this, but whenever the program is finished, the application just keeps running. the program has literally gone through all the steps... i have a system.out.println printed on the last line after the main, after the class instantiation... and still it stays running.
    how do you guys load images without a gui? This program will probably be running under unix, so i can't create a (for component example)
    Panel() and media track the file load... so i'm pretty much stumped
    any help you guys can provide would be really incredibly helpfull at this point. I have searched these threads for a few hours without luck. I found only 1 real post related to my problem, but eventually they said use MediaTracker = new Mediatracker( new Panel() ); which i can't use. :(
    Thanks a lot guys.
    :D

    yeah tried doing that, didn't work either.
    UPDATE
    I FINALLY found a way...
    and here it is for others to find!
    public BufferedImage getImage(String filename) throws Exception {
    FileInputStream input = new FileInputStream( filename );
    JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder( input );
    BufferedImage image = decoder.decodeAsBufferedImage();
    return image;
    it returns an image buffer, but it's better than nothing! :)
    atleast this functions under unix.

  • One Apple ID two phones big problem.

    Hi guys,
    Before 6 months I bought new Iphone 4s,but it was used one day from person who sell it to me, so it already has Apple id.
    I deleted user and created my user which was synced with iCloud and worked without any problem.
    Before 10 I bought Iphone 5, also created my Apple ID on it and sync with my PC/ iCloud.
    Yesterday I want to sell my first Iphone 4 and I did reset ( Erase all content and setting), but it did not want to wake up, so i started it with DFU mode using I tunes, and I did restore and update.
    Now I am facing to bit problem, on the begging steps it says something like "this apple id cannot be used to unlock this iphone".
    If I go to iCloud I can see only one device and currently its new iPhone 5, but both devices called with same name, so I am not sure is this problem.
    So I have two doubts:
    - I am not sure does SIM card can make this problem(on initiation phase you have to put sim in Iphone), because main is much smaller now so I using my wife SIM to finis registration Iphone 4 (iPhone 5 using smaller than iPhone4)?
    - another thing It says you have to "use original apple id..", like I sad on the beginning when i bought Iphone4 it already has apple id on it, which I was deleted and configure main (afterwards this device was visible on my iCloud). So do I need to put first creaded apple id, does iPhone remembering first created or last used. If yes I have big problem because I dont have contact of user who sell it to me.
    I want to add one thing, Iphone is not stolen I have warranty documentations and all profs that is not stolen.
    PLEASE HELP, in my country we have awful support !

    Just left the Apple store with an official answer.  You can have two phones one Apple ID, turn off auto updates so you don't automatically get apps on both phones. Then you need two different iCloud accounts.

  • HI there, am having a big problem updating mu iphone due to me forgetting my password, can you tell me how to retrieve it. It seems like i have one apple id for downloads  and a different one for updates. Can you help ps.?

    Hi There
    Am having a big problem updating my iphone 4 Apps, due to a problem with my password for my apple id. But it seems that i have two different ids, one for the updates and another for the downloads. I am not able to retrieve my Id password for updating my Apps. Can you help me ps?
    Thank you

    What program did you use to fix the internal hard drive? What repairs did it report making? More crucially, if repairs were reported, did you re-run the utility until it reported no problems found? It's possible for one set of problems with a drive to mask others.
    If you have about 5GB or so free space on the internal hard drive, you can use your OS X Install disc to perform an Archive and Install to recover from the failed Software Update. When the computer restarts, download and run the OS X Update Combo 10.4.11 (Universal). When the Mac restarts after that, run Software Update. During all this, make sure nothing interrupts or shuts down the Mac! Note that the first start after each of these updates will take significantly longer than subsequent starts, so be very patient.
    How did you back up your internal drive to the external one? Did you just drag things over in the Finder, or did you use a utility such as SuperDuper! or CarbonCopyCloner? Does the external HD show up as a bootable volume in System Preferences > Startup Disk, or using Startup Manager?

  • Having big problems with my new Mac Pro, when I launch Photoshop CC, I get an error message, can carry on but after a few tasks it starts going gar... menus go blank, when you try to save it shows a blank box.... can anybody help?

    Having big problems with my new Mac Pro, when I launch Photoshop CC, I get an error message, can carry on but after a few tasks it starts going gar... menus go blank, when you try to save it shows a blank box.... can anybody help?

    when I launch Photoshop CC, I get an error message
    and what exactly is the text of that error message?

  • I have a big problem :( why is it i cant update my ipod touch 2g into ios 4! im using the latest version of itunes and everytime i click "update" it stucks on the "contacting server" please help :( i want to update it now

    i have a big problem why is it i cant update my ipod touch 2g into ios 4! im using the latest version of itunes and everytime i click "update" it stucks on the "contacting server" please help i want to update it now

    Maybe here:
    iTunes for Windows: iTunes cannot contact the iPhone, iPad, or iPod software update server

  • I have big problem i make update to my software  iso 7.12 in my iphone 4  but when i recive calling  and i want to cancel and recall again i phone is stop no working and i must restart it to work what can i do

    modem firmware 04.12.09
    iPhone 4
    memory is 32 g
    iso 7.1.2(11d257)
    when cancel call it not work before is shutdown and open it again
    i have big problem i make update to my software  iso 7.12 in my iphone 4  but when i recive calling  and i want to cancel and recall again i phone is stop no working and i must restart it to work what can i do

    Basic Troubleshooting Steps when all else fails
    - Quit the App by opening multi-tasking bar, and swiping the App upward to make it disappear.  (For iOS 6 older, hold down the icon for the App for about 3-5 seconds, and then tap the red circle with the white minus sign.)
    - Relaunch the App and try again.
    - Restart the device. http://support.apple.com/kb/ht1430
    - Reset the device. (Same article as above.)
    - Reset All Settings (Settings > General > Reset > Reset All Settings)
    - Restore from backup. http://support.apple.com/kb/ht1766 (If you don't have a backup, make one now, then skip to the next step.)
    - Restore as new device. http://support.apple.com/kb/HT4137  For this step, do not re-download ANYTHING, and do not sign into your Apple ID.
    - Test the issue after each step.  If the last one does not resolve the issue, it is likely a hardware problem.

Maybe you are looking for

  • How do I Save Outlook Attachments using Powershell?

    I have seen a few examples of this for vbScript, but none for powershell. Here is a script I found to open Outlook and pick a folder: function Release-Ref ($ref) { ([System.Runtime.InteropServices.Marshal]::ReleaseComObject( [System.__ComObject]$ref)

  • Can I easily change speaker output on the Apple TV?

    In particular I'd like not to have to navigate into the Apple TV menus to change the audio output souce. At some times I want the TV to be the audio output source and at other times I want airplay to output to an airport express.

  • Connecting two 23" displays

    The Mac Pro has one firewire 400 port and one firewire 800 port. Each display has a firewire 400 connector so there is no available firewire 400 port for the second display. Is it OK to connect the second display firewire cable into the first dispay'

  • Anyone else getting ERROR MSG 502?

    Haven't been able to connect to iTunes store for 2 weeks or so now... everything was peachy-keen before that. Have tried all suggestions on forum and support sites, all to no avail. This is on my work computer, so I'm not sure if something was recent

  • Descripción e imagen en el buscador

    Buenas, mi consulta es: como puedo modificar la descripción y la imagen que aparece cuando enlazo mi pagina web por ejemplo en facebook? Muchas gracias