Perform Hamming window and FFT with Java

Hi all,
I am trying to apply Hamming window on my lengthy sound data soundSample[1000] with window length 100. Then proceed with FFT.
And i found that java does have the package for Hamming window and FFT. As below,
http://code.compartmental.net/minim/javadoc/ddf/minim/analysis/FFT.html
http://marf.sourceforge.net/api/marf/math/Algorithms.Hamming.html
But i hardly find an example that illustrate how to use the package in a java program. So no idea how should i use the method in package.
Please advise and appreciate if reference is provided.
Thank you.

Hi,
I have spent sometimes to study and do the coding for FFT on audio samples.
My project is to study the FFT working by performing the FFT on audio sampled data.
After this is done, then only proceed to extract the pitch value in the audio data.
Below is the coding that i have done by referring to the provided steps:
In my main, i call this method and past the retrieved sampled sound data to this method.
public static void Analyze(int[] soundSample,float sample_rate ) {
        int N = (int)sample_rate/5;
        int Number_Sample = soundSample.length;
        Complex[] fftBuffer = new Complex [2*N];
        Complex[] fftResult = new Complex [2*N];
        Complex [] lastN = new Complex [N];   // The array to save the last N sample
        int delay = 0;
        double delta = 2*Math.PI/(2*N);
        // I have no idea how can i convert my sample array to double so that it will be in the range of [-1,+1]
        while(delay <=soundSample.length){
            //Extract the 2N sample for FFT analysis and convert the data to complex number.
            for (int z=0; z<2*N; z++){
                fftBuffer[z] = new Complex(soundSample[z+delay],0) ;                
            for (int i=N-1;i>=N/2; i-- ){
                lastN[N-1-i] = fftBuffer;
for (int z=0; z<2*N; z++){
fftBuffer[z] = fftBuffer[z].times(0.54-0.46*Math.cos(z*delta));
fftResult = FFT1.fft(fftBuffer);
delay = 2*N + delay;
1) I was trying to perform FFT with 2N samples then keep on looping the FFT method until 2N reaches the ends of sampled data.
But the FFT that i am working with is radix 2... It doesn't work with my 2N samples... Please teach me how should i work out FFT regardless the number of sample?
2) The hamming window coefficient i m using is based on http://www.mathworks.com/help/toolbox/signal/hamming.html . I am working on index [0:2N] ..
Is it appropriate?
3) According to your No1 steps, the acceptable frequency resolution is 5Hz. May i know what is this representing? And is it application for most of the FFT application? How can i determine the frequency resolution that i should used in my project?
Sorry for late reply as i was trying to work out the thing..
Hereby attach to your the my coding.. and hopes to have your guidance and tutorial how to extract the pitch for recording audio file with Java.
I have done the pitch extraction with MATLAB.. but Matlab as built-in FFT function... 
So i m now get stucked how to perform FFT on audio sound sample regardless the N value of sound sample for FFT buffer.
Many thanks for your former advise... and
Looking forward for your replies again.
Happy New Year 2011 :)
Edited by: 诸葛 on Dec 31, 2010 9:29 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • Configure CRS2008 to using AD and Kerberos with Java application servers.

    Hi All,
    I have configure CRS2008 to using AD and Kerberos with Java application servers. Domain Controller is installed on W2K3 Server. In addition, CRS2008 is installed on another W2k3 Server.
    I have create service account in domain controller: CMSACC
    I have create two user account: CRuser1 and CRuser2
    I have create domain group: CRSGroup
    After I had run the setspn in domain controller,I got the message at below:
    Registered ServicePrincipalNames for CN=CMSACC, OU=TEST, DC=BD, DC=com:
        BOBJCentralMS/BDMGTSRV.BD.com
    CMC Setting:
    AD Administration Name: BD\administrator
    Default AD Domain: BD.com
    Add AD Group(Domain\Group): secWinAD:CN=CRSGroup,OU=TEST,D=BD,DC=com
    Service principal name:BOBJCentralMS/CMSACCatBD.com
    I have create a WINNT folder in root directory.Moreover and save bcsLognin.conf and Krb5.ini at here.
    bscLogin.conf:
    com.businessobjects.security.jgss.initiate {
    com.sun.security.auth.module.Krb5LoginModule required;
    krb5.ini:
    [libdefaults]
    default_realm = BD.com
    dns_lookup_kdc = true
    dns_lookup_realm = true
    [realms]
    forwardable = true
    BD.com = {
    default_domain = BD.com
    kdc = BDMGTSRV.BD.com
    I have tested the Kerberos,using kinit CMSACCatBD.com password, and got error message at below:
    Exception: krb_error 41 Message stream modified (41) Message stream modified
    KrbException: Message stream modified (41)
            at sun.security.krb5.KrbKdcRep.check(KrbKdcRep.java:53)
            at sun.security.krb5.KrbAsRep.<init>(KrbAsRep.java:96)
            at sun.security.krb5.KrbAsRep.getReply(KrbAsRep.java:486)
         at sun.security.krb5.KrbAsRep.getReply(KrbAsRep.java:444)
         at sun.security.krb5.internal.tools.Kinit.sendASRequest(Kinit.java:310)
         at sun.security.krb5.internal.tools.Kinit.<init>(Kinit.java:259)
         at sun.security.krb5.internal.tools.Kinit.main(Kinit.java:106)
    My problem is failed to logon CMC and infoview and got error message at below:
    Account Information Not Recognized: Active Directory Authentication failed to log you on. Please contact your system administrator to make sure you are a member of a valid mapped group and try again. If you are not a member of the default domain, enter your user name as UserNameatDNS_DomainName, and then try again.
    Actually, I am sucessful to logon Business View manager with CRuser1. However, I fail to logon CMC and infoview and got the above error. Have you any suggestion to solve this problem?
    Ken.

    if you can logon with client tools then that should be an indication that the service account running the CMS IS working! Good news.
    So the problem is likely with the java portion (krb5/bsclogin or java options)
    If the files are in c:\winnt\ (if not copy them there) and perform c:\program files\business objects\javasdk\bin\kinit username
    then enter and password/enter again
    Probably get the same message. To note in your krb5.ini all domain info must be in CAPS (the .com appears to be in lower case)
    kinit works with just the krb5.ini, java SDK and AD (removing BO config and the service account from the picture). Once that works if your java options are specified properly you should be able to login to CMC/infoview.
    also 1 last point. Add udp_preference_limit = 1 to the krb5 lib defaults section
    libdefaults
    default_realm = BD.com
    dns_lookup_kdc = true
    dns_lookup_realm = true
    udp_preference_limit = 1
    Regards,
    Tim

  • BC4J and OAS with Java Application Client

    Could you show me an example about using the BC4J and OAS with Java Application client.
    The JDeveloper Help is not enough to solve this kind of problem.
    Configuration:
    Jdeveloper 3.1
    OAS 4.0.8.1
    Database 7.3.4
    null

    if you can logon with client tools then that should be an indication that the service account running the CMS IS working! Good news.
    So the problem is likely with the java portion (krb5/bsclogin or java options)
    If the files are in c:\winnt\ (if not copy them there) and perform c:\program files\business objects\javasdk\bin\kinit username
    then enter and password/enter again
    Probably get the same message. To note in your krb5.ini all domain info must be in CAPS (the .com appears to be in lower case)
    kinit works with just the krb5.ini, java SDK and AD (removing BO config and the service account from the picture). Once that works if your java options are specified properly you should be able to login to CMC/infoview.
    also 1 last point. Add udp_preference_limit = 1 to the krb5 lib defaults section
    libdefaults
    default_realm = BD.com
    dns_lookup_kdc = true
    dns_lookup_realm = true
    udp_preference_limit = 1
    Regards,
    Tim

  • Silent print a PDF from a web page using Flex. We are targeting Windows and Mac with Arcobat reader installed

    We are planning to Silent print a PDF from a web page using Flex. We are targeting Windows and Mac with Arcobat reader installed. I have tried using the AIR appliaction and it worked, But our requirement is NO INSTALL to the user machine for the silent printing. It is just from web page and silent printing to the default printer to the desktop/Laptop. Can anyone share your thoughts and experience with us. It will be very helpful..
    For AIR : I tried the thread Re: AIR and PDF showing/silent printing

    Hey CodeMonkey & Ross,
    Did you either of you ever find a solution? I'm stuck too, it seems I can get remote printing on all these PDFs to work but it just prints a blank page since I've been using Javascript in the browser, not Adobe's (they are Engineering drawings that I do not have permission to edit so I can't just insert code into them but I need to make work instructions). I've been scouring the internet for hours now, it seems that this thread is the only relevant/useful one at this point. No one else was trying to achieve this for similar reasons to mine.
    Thanks guys,
    Lox

  • Can I access both platforms, window and mac with one cloud account

    can I access both platforms, window and mac with one cloud account

    Yes.
    One Cloud membership = 2 software activations: Win/Win or Mac/Mac or Win/Mac.
    http://www.adobe.com/au/products/creativecloud/faq.html
    "Are there any unique benefits that come with my paid membership?
    Yes, as a member of Creative Cloud, you get many benefits that you do not get when you purchase a traditional shrinkwrapped product:
    Access to both the Mac OS and Windows® versions of the desktop applications and the ability to install them on your primary computer and one backup computer. So, if you have a Mac at home and a PC at work, you can install your applications on both as long as they are not running at the same time. See the product license agreements page for more information."

  • Please, I am in a very big problem I designed the project by Adobe director And you test the software on the computers on Windows and works with high quality When I tested the project on Apple Macintosh operating system, Li appeared a number of problems

    Please, I am in a very big problem
    I designed the project by Adobe director
    And you test the software on the computers on Windows and works with high quality
    When I tested the project on Apple Macintosh operating system, Li appeared a number of problems and you dissolve a large part of them
    But I have a problem too big
    The project works on some devices and others show me messages mistakes and why chasm different operating system version
    Apple's Macintosh and these messages
    "biosegnatures" can't be opened becouse it 's from undefined developer "
    others
    shokwave player error
    pleas what can i do

    Welcome to the Support Communities.
    m.raslan wrote:
    I tested the project on Apple Macintosh operating system
    Click on the  menu at top left of your screen, choose About This Mac and, in the panel that appears, note the Version no. in the form 10.n.n. Then update your product list so we can see what version of OS X you're running on the Mac — see this tutorial:
    Update your product list
    m.raslan wrote:
    "biosegnatures" can't be opened becouse it 's from undefined developer "
    This Apple doc may help:
    OS X: About Gatekeeper
    m.raslan wrote:
    shokwave player error
    Is Shockwave Player installed?...
    http://www.adobe.com/shockwave/welcome/
    ...If not, get it here:
    http://get.adobe.com/shockwave/

  • Should we avoid Graphical mapping and stick with Java mapping?

    After developing mappings in XI for a month, I just don't see any good reasons to use Graphical mappings over Java mappings. Maybe some experienced users here can give me some valid reasons why we should choose Graphical mappings. Here is what I think:
    Disadvantages of Graphical mappings:
    1. No way to perform automated unit testings. This is probably the biggest reason I hate it. You can do some tests manually when you work in Integration Builder. But there is no way you can write some unit testing utilities to automate the task.
    2. Complexity. Even for some simple requirements, your Graphical mappings can become complicated and hard to understand. A lot of times, I find myself staring at several dozens of graphical nodes and try to understand what it does.
    3. Impossible to reuse. This is totally against the DRY (Don't repeat yourself) principle. For example, to generate messages for JDBC adapter, it is common to have two identical fields for primary keys: one in the access node and another in the key node. If you change the mapping logic in one, you have to remember to change the other.
    Advantage with Java mappings:
    1. Fully automated unit testing. You can create JUnit tests along with your Java mapping classes and use Maven or other build tools to perform automated unit testing.
    2. Your choice of XML parsing and binding. With Java mapping, you can choose any open source framework for XML parsing and binding. For example, with XMLBeans, I can convert XML input message to a Java object, transform to another Java object and write to output message. And each Java object is generated from its corresponding XML schema.
    3. Highly reusable. We can use fundamental object-oriented designs to create highly reusable mapping components.
    4. Better version control. Since the mappings are just Java classes, we can use CVS or SVN to track code changes.
    5. Better build tools. We can fully utilize build tools like Ant and Maven to automate the build, unit tests, or even generate documents and mapping web sites.
    So do you guys agree? Maybe I am still new to XI or I am missing some important things. But at this point, I just don't see why I should use Graphical mappings. Is there anyone developing XI interfaces completely with Java mappings?
    Thanks in advance for any comments!
    Kenny Cheang

    Hi Suraj,
    > Since its graphical the blocks will take space, but
    > there is always an adavntage of processing time.
    > Ebven though it may appear bigger, it will take less
    > time as compared with Java code (for the same
    > mapping).
    Could you explain more why the graphical mapping has better performance? I thought the graphical mapping is compiled into a Java class in the runtime anyway.
    > Yes thats there, but same goes with Java mapping too
    > right (if you haven't mentioned it as constants)
    I mainly think about inheritance. If I have to build 10 interfaces and they all have some common behavior, I can create a base interface class to encapsulate the common logic. But with graphical mapping, you have to duplicate them in each interface.
    > Disadvantages of Java mapping:
    > 1. Performance
    Same as above. I just don't see why Java has worse performance. I actually think Java should have better performance. You can optimize the code anyway you want. In some cases, you have to use queue functions in graphical mapping but it's not necessary in Java.
    > 2. All might not be well versed with Java Code(though
    > everyone may know basic java) .
    I am not asking everyone to abandon graphical mapping. I am just wondering which one is better when you have skills for both.
    > 3. Lot of standard functions are available in GM
    > which you can choose, but you have to remember the
    > exact code for those in Java mapping.
    You can create functions in Java too. All you have to do is to remember the function name.
    Kenny

  • Performance Using Windows and Parallels?

    We are getting new computers at work and are fighting to stay on the Mac, but we are running more and more Windows apps. How does performance of Windows apps under Parallels compare (relatively) to the old days of running Virtual PC? Seems to me that having an Intel processor would provide a big boost in performance, since you no longer have to emulate an Intel. I'm talking about RoboHelp, PowerPoint, and web-based applications, nothing too graphic or processor intensive.

    Unless the Windows software you want to use is incredible CPU intensive, using Parallels or VMWare (or even the free VirtualBox) will probably suit you fine. I use PD and Win7 with a number of applications on a 2011 MBA. The ony time I notice any speed degredation is when Win7 is booting up or coming out of hibernation; once it is running there's no noticable performance hit. I can move back and forth between Windows and the Mac smoothly and the programs run fine. (There is, however a noticable hit on battery life because PD is a heavy CPU user.) BootCamp, because it allows you to run Windows natively, has no affect on the Mac because when you are running Windows in BootCamp you aren't running the Mac OS. With BootCamp you run one or the other at one time unlike PD which lets you run multiple OS versions at one time

  • JAR Files and Applets with Java Plug-In

    This seems to be a basic question, but I can't figure it out! I have a jar file that contains all my class files for my applet. The jar file is in the same directory as the following html file:
    <html>
    <body>
    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    WIDTH = 700 HEIGHT = 510 codebase="http://java.sun.com/products/plugin/1.3.1/jinstall-131-win32.cab#Version=1,3,1,0">
    <PARAM NAME = ARCHIVE VALUE = "myFiles.jar" >
    <PARAM NAME = CODE VALUE = "MainView.class" >
    <PARAM NAME="type" VALUE="application/x-java-applet;jpi-version=1.3.1">
    <PARAM NAME="scriptable" VALUE="false">
    </OBJECT>
    </body>
    </html>
    I've checked the jar file, it's the same name. MainView.class is most certainly in the jar file - yet everytime I open the page up, I get the class not found error:
    java.lang.ClassNotFoundException: java.io.FileNotFoundException
    MainView.class (The system cannot find the file specified)
    If I don't jar the files, the applet works fine - but I want to jar them as it's some 20 class files. What am I doing wrong?

    I've had a similar problem where it pops up the Java Extension Installation window, and starts downloading. Everything appears normal, but when it tries to run the applet it gets "load: class <className> not found" where <className> is the name of the class in my CODE parameter.
    It appears that on occasion the download of the jar gets cut off. When I searched the browser's cache, I find a jar file that has fewer bytes than it should. In order to initiate a retry, you have to delete the jar file from your browser's cache, close all your browser windows so that the Plug-in with its truncated jar file stops running, and load the HTML page again. It appears that it checks the timestamp of the jar file in your cache and the one on the server and decides that it doesn't need to download it again. But if you delete it from your cache, it forces a retry.
    I never have this problem when I open from my hard drive. I've never had the problem with a cable modem connection. I've had it once from a corporate LAN hitting an internet server (ie., outside corporate WAN). I've had people report the problem with dial-up connections. My theory is that whatever Sun is using to download the applet is more sensitive than either HTTP download or FTP.
    Has anybody else experienced this problem? Is there anything you can do about it? I couldn't find a bug report on it. Is there one?

  • [SOLVE] Dual Boot Windows and ArchLinux with Syslinux

    Ok, i installed ArchLinux on my laptop with Windows XP (syslinux) and I cannot find get Windows to boot or mount it. I have tried to do what i can to do this but cannot. I Installed XP first like a should and something i think might be needed to know is after i created the partitions scheme (10Gb (boot partition), 50GB (XP), 80GB(was unallocated)). The installation disk formated both 2 partitions in NTFS but i installed XP on the second and Windows reported them as C and D drives. Windows being D. Thought that was bit werid thinking Windows installed the mbr on that partition. When I installed ArchLinux, it did have the boot flag set on 10GB (or C drive).
    Since I installed ArchLinux, I have been unable to find a solution to mounting/booting to Windows. Installed NTFS-3G and that didn't work when i tried mount /dev/sda3 windows and i did created a folder named windows but got ...
    mount: wrong fs type, bad option, bad superblock on /dev/sda3,
    missing codepage or helper program, or other error
    In some cases useful info is found in syslog - try
    dmesg | tail or so.
    Tried dmesg | tail and got
    [ 76.524133] SGI XFS with ACLs, security attributes, realtime, large block/inode numbers, no debug enabled
    [ 179.468499] ACPI: \_SB_.PCI0.LPC0.ACAD: ACPI_NOTIFY_DEVICE_CHECK event: unsupported
    [ 705.472330] 8139too 0000:02:03.0 enp2s3: link down
    [ 717.380879] 8139too 0000:02:03.0 enp2s3: link up, 100Mbps, full-duplex, lpa 0x41E1
    [ 726.447184] 8139too 0000:02:03.0 enp2s3: link down
    [ 727.596128] ACPI: \_SB_.PCI0.LPC0.ACAD: ACPI_NOTIFY_BUS_CHECK event: unsupported
    [ 732.616138] 8139too 0000:02:03.0 enp2s3: link up, 100Mbps, full-duplex, lpa 0x41E1
    [ 733.848832] 8139too 0000:02:03.0 enp2s3: link down
    [ 834.062062] 8139too 0000:02:03.0 enp2s3: link up, 100Mbps, full-duplex, lpa 0x41E1
    [ 2131.449211] perf samples too long (2534 > 2500), lowering kernel.perf_event_max_sample_rate to 50100
    This is when i run sudo lsblk
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    sda 8:0 0 149.1G 0 disk
    |-sda1 8:1 0 9.8G 0 part /boot
    |-sda2 8:2 0 1K 0 part
    |-sda3 8:3 0 53.6G 0 part
    `-sda5 8:5 0 85.7G 0 part /
    sr0 11:0 1 1024M 0 rom
    My syslinux is
    LABEL arch
    MENU LABEL Arch Linux
    LINUX ../vmlinuz-linux
    APPEND root=/dev/sda5 rw
    INITRD ../initramfs-linux.img
    LABEL windows
    MENU LABEL Windows
    COM32 chain.c32
    APPEND hd0 3
    NOTE: chain is in the same directory with syslinux
    I really think Windows got corrupted but not sure. Thought about repairing the mbr on windows and booting to it then reinstall syslinux but really don't want too.
    Thanks in advance
    Last edited by jag-ster (2014-11-27 02:12:12)

    Here is the partition table:
    /dev/sda1 one HUGE linux /boot primary partition (assuming ext4)
    /dev/sda2 "name" of the extended partition
    /dev/sda3 primary Windows partition (assuming NTFS)
    /dev/sda5 logical Linux root partition (assuming ext4)
    /dev/sda1 to /dev/sda4 are either all primary, or three primary and one extended. After /dev/sda4 all partitions are logical. If you're still wondering why is there no /dev/sda4, it's because you have 2 primary and one extended, so /dev/sda4 is reserved for another primary partition.
    Windows problem:
    The /dev/sda1 which Windows named C: is Windows equivalent of linux /boot. When you told linux to place its /boot on /dev/sda1 it formated boot files of Windows. Now you have Windows OS with no kernel. In other words there is no way to boot Windows if you don't reinstall it. Actually there is a way, but you would than screw up Arch.
    Mounting problem:
    You can never mount extended partition, only logical (an extended partition is made of logical partitions). You want to do:
    sudo mount /dev/sda3 -t NTFS-3g -o rw,uid=YourUserName /path/where/you/want/this/partition/mounted
    EDIT:
    Try it this way:
    - Backup all your data
    - Delete every partition
    - Start Windows installation
    - Make only one partition (c:/ for Windows)
    - Let Windows make another partition
    - Make one more so you could have a data partition, which does not need to be formated to reinstall Windows
    - Start Arch installation
    - Get to partitioning
        =Partitioning=
        - /dev/sda4 extended (take the rest of the drive)
        - /dev/sda5 logical /boot 512MiB
        - /dev/sda6 logical /          20GiB
        - /dev/sda7 logical /home (the rest)
    Making a separate /home partition will come in handy when reinstalling Arch (any linux distribution), or switching between distros, because it is the equivalent of D:/ in Windows. Also consider LVM.
    Last edited by bstaletic (2014-02-28 23:25:33)

  • Executing WINWORD from both Windows and linux using Java

    Dear All,
    I have a problem when trying to use Runtime class to execute a winword document. My code is as follows.
    Runtime r= Runtime.getRuntime();
    try{
    r.exec("rundll32"+" "+"url.dll,FileProtocolHandler"+" "+"WINWORD"+ " "+"file://C://welkom.doc");
    catch(Exception ex){
    System.out.println("Unable to open the doc file:"+ex);
    When I execute this swing application with the above, the program is unable to open the specific file. And it says "Problem with the short cut, unable to open the file". When I run the program without the file name, it opens a new doc file.
    Attn: what I want to do here is I need to open the winword file from both windows and linux. So I cannot use the relative path of the WINWORD.exe file.
    Can anyone help me?
    Thanks in advance.
    Regards,
    Bala

    If you take a look at the api, there's an exec(String[]) method. This is the one you should use when calling a command with multiple parameters.
    so something like...
    String[] cmd = new String[] {"rundll32", "url.dll,FileProtocolHandler", "WINWORD", "file://C://welkom.doc"}
    r.exec(cmd);

  • How can I write on ports (COM and LPT) with java APIs

    I need to write in LPT and COM ports with Java like the INP and OUT commands on other languajes, but I don�t want to use native classes... because I want a portable code... so what can I do?

    look at the javax.comm package
    http://java.sun.com/products/javacomm/javadocs/tree.html

  • SAP GUI 7.20 for Windows and problem with Screen Painter

    Hello,
    I just installed the SAP GUI 7.20 for Windows and it looks good.
    But when when I start the Screen Painter for a dynpro I get the following message:
    Graphical Layout Editor not available. Continue with alphanumeric editor.
    And: EU_SCRP_WN32 Connection broken  '..' / CPIC
    The SCreen Painter is installed correctly (I can start ist manually from file system) and the RFC destination works.
    Any idea?
    Regards,
    Ole.

    Hello,
    I've uninstalled all SAP installations, cleaned the registry of Windows XP and deleted all folders with SAP content. Then I've installed the SAP Gui 7.20 again and it works.
    And now I will update the Screen Painter with the information from the OSS-Note!
    Thank's for your help!
    Regards,
    Ole.

  • Fonts in Windows and Fonts in Java

    Hello,
    Say I have in my app:
    String string = "\\u09A1";
    I want to display this in my app. I can call:
    GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
    I can then iterate through these and find out which ones can display this unicode character using,
    font.canDisplayUpTo(string);
    My question is, are these the fonts that Java can display (from charsets.jar) or the ones installed in Windows?
    I would like to be able to get lists for both of these.
    Any ideas?
    Cheers,
    Jim

    Thank you. I did read that. I was not talking about drawing text in 'Hello World' alike applets/programs.
    I should give an example:
    I would like to print 'H' in Tahoma, 72, Bold (Windows format) at (100, 200).
    Font sizes:
    In Windows font size is 72 pixels.
    In Java this is equal to 96 points (72 px * 96 (scr resolution for Toolkit) / 72 (pixels per point).
    Real height in Windows and Java will be 64 px.
    That's fine. For some fonts this does not work.
    Positioning. See example above.
    According to the article you refer to in java we should use y-coordinate 200 + 72 (font size) = 272.
    In fact we have :
    Java text 14 pixels below than expected.
    Similar things happen to other parameters Weight, Styles, etc.
    I do use AttributedString and TextAttribute classes to render text
    Thanks in advance.
    Alex

  • Err. in programs copiled with Jdev 9.0.3 and run with Java Web Start

    Hi all,
    when I build my programs with Oracle9j JDeveloper 9.0.3.988 and I use them with Java Web Start, programs do not run, while when compiled with Oracle9j JDeveloper 9.0.2.x it runs without problems.
    The Java version used in both cases is 1.4.0.
    Here's an example of the log from Java Web Start:
    Error in JavaWeb Start
    viewer/imageViewer/ViewerAppState$1 (Illegal Variable name " val$files")
    java.lang.ClassFormatError: viewer/imageViewer/ViewerAppState$1 (Illegal Variable name " val$files")
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
         at com.sun.jnlp.JNLPClassLoader.defineClass(Unknown Source)
         at com.sun.jnlp.JNLPClassLoader.access$1(Unknown Source)
         at com.sun.jnlp.JNLPClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
         at viewer.imageViewer.UtilityMenuPane.jbInit(UtilityMenuPane.java:167)
         at viewer.imageViewer.UtilityMenuPane.<init>(UtilityMenuPane.java:155)
         at viewer.imageViewer.UtilityMenuPane.getInstance(UtilityMenuPane.java:147)
         at viewer.imageViewer.ImageViewerFrame.jbInit(ImageViewerFrame.java:179)
         at viewer.imageViewer.ImageViewerFrame.<init>(ImageViewerFrame.java:145)
         at viewer.imageViewer.ImageViewerFrame.getInstance(ImageViewerFrame.java:126)
         at viewer.ImageViewer.execute(ImageViewer.java:30)
         at viewer.Viewer.execute(Viewer.java:63)
         at viewer.Viewer.<init>(Viewer.java:27)
         at viewer.Viewer.main(Viewer.java:40)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sun.javaws.Launcher.executeApplication(Unknown Source)
         at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
         at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
         at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
         at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
         at com.sun.javaws.Launcher.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:536)
    Does anybody know why this happens?
    Thanks

    Hi There.
    We had the same problem with some of our code. We moved the definition of the class from a method out of the method. Like this:
    public class{
    class{
    instead of doing this:
    public class{
    method() {
    class{
    This worked with the web start......
    Best regards
    Jesper Lorentzen

Maybe you are looking for

  • Communication from Adobe around recent issues

    John Metzger asked me to post the following message: >>>>>>>>>> An open communication around recent issues reported with the latest deployment of Adobe Digital Publishing. I’d like to open a direct dialog between the Adobe Digital Publishing team and

  • Error while using BAPI_REQUISITION_CHANGE

    Hello All, I am using the bapi BAPI_REQUISITION_CHANGE, to change the quantity for the PR number. Currently I am passing the following details:- PR number in importing parameters PR line item, Storage Location, Material Group, Quantity, and UOM both

  • Copy R/3 system

    Hello experts, we must make a copy/refresh from Production R/3 Environment to Quality R/3 Environment. Do you have some documentation for this activity? Thanks, Vito

  • Corruption of desktop icon by webstart

    Hi. I've specified a 32x32 .gif icon (tried with .jpg as well, same result) as the icon property in my .jnlp file. When webstart installs the application I'm working on, the 16x16 icon in the start menu seems to install fine, whereas the 32x32 icon w

  • TS4268 My iMessage won't let me sign in

    I have updated to ios7 but my I message won't work because it won't sign in with my Apple ID. I have tried this I'd everywhere else and works fine. The error message comes up and say network connection, I have been connected to two routers and cellul