On which API the JVM is based

Well I am new to Java, but I am a .NET developer. I am sure that .NET is a wrapper for the WinAPI32 on Windows, but what about Java? Is the Java VM also a wrapper for the WinAPI running on Windows or is it built up by different technolgies. If it is not a wrapper, can you tell how lots of Java Apps look like native XP apps ( I speak about the e.g. Control Center for Java).
What about the difference between Swing and SWT?
I am looking forward to hearing from you?

Wow! Big respect to Sun Microsystems for the fast
answers! It is great!Sun Microsytems had nothing to do with the content of the replies. I don't work for Sun. Jschell doesn't work for Sun (at least I don't think he does).
We are Java developers who volunteer our time to answer questions here. You will rarely if ever run into Sun employees in these forums.
The
VM is written in C++ if that is what your question
is. Really? The VM is written in C++! This would be maybe
a quite silly question but: Most C++ compilers are
written in C++, why not to write the Java interpreter
or JVM in Java? Why did you use C++ instead of the
assembler or better machine code?As indicated above "i" didn't do this. I suspect jschell can give you a clearer reason for this decision so I will just leave it there.
>
>
Here another question: Is there a RAD IDE for Java
like Visual Studio, where I can find a designer likeThere are a large number of Java IDE's with a variety of features. Many are free (open source etc) and some you pay for (but often get free trials).
If you search this forum you will find this topic is discussed ad nauseaum. I would suggest looking at a couple and seeing if the feature set and interfaces are what you are looking for.
As a start (just suggestions)look at Eclipse and Netbeans.

Similar Messages

  • Is it possible to record the jvm...?

    Is it possible to record the actions of the jvm running a program,as binary.My idea was if you could record the way the jvm executes a program as binary, you could try running the binary on a similar architecuture without the jvm thus ultimately running the program without the jvm.
    If that is not possible........
    I understand that the jvm operates based on a stack architecture,pushing the values in each stack frame on to the processors registers for executing the corresponding instruction(s).
    so is it possible to modify the jvm itself to dump stack structure somewhere so, that the same could be done without constructing the stack each time.
    Please bear with me ,if I am talking rubbish.....I am a student.

    As generally stated - no.
    It isn't possible in any language (major.)
    A running programming consists of inputs which are conditionally processed. Recording what the application does on one pass does not allow for different conditionals on a second pass.
    Simple macro recorders in editors succeed at this because they are simple and there is no conditional processing.
    There are however java compilers which are supposed to produced machine op codes rather than byte codes. Those would allow one to run with a VM if they actually do compile to machine codes (despite their claims some do not really do that.) Such a compiler would need a compiled version of the Java API as well.

  • VS.PHP vs PHP TOOLS for Visual Studio : which is the best ?

    Hi,
    I love Visual Studio. I use it since 2006 for c#, asp, WinForm project, etc. I have a question about PHP / Simple Web dev : 
    Which is the extention between VS.PHP and PHP TOOLS ?
    What i need :
    - Intellisence (auto completion all PHP core class and functions and major extention, project lib class and functions)
    - Powerfull debug, with break points etc...
    -Web server integartion (apache, nginx, mysql) 
    - Live edit over FTP
    - Publish over FTP the file projet
    - MySQL Integration (design tools, etc ?)
    [- Integration of some platform like Drupal or Wordpress (intellisence and debut)
    - Integartion with other HTML/Javascript framework (jquery, angular etc.) ]
    - CONTROL + K + D indentation for all documents
    Thanks for your opinion.

    Hi nicpulse,
    Thank you for posting in MSDN forum.
    Since this forum is to discuss: Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation
    and Help System, and Visual Studio Editor.
    >>VS.PHP vs PHP TOOLS for Visual Studio : which is the best ?
    Based on your issue, since the PHP Tools and VS.PHP are involved to the Extensions tool,
    this extension tool is out of support range of this forum.
    In my option, I think that there have no specified answer about which is the best in the
    VS.PHP vs PHP TOOLS for Visual Studio.
    It is just depend on which is appropriate for your requirement, so I suggest you can see the feature about the VS.PHP and
    PHP Tools. And then choose which extension tool is appropriate your requirement.
    https://visualstudiogallery.msdn.microsoft.com/F5CFBE65-D843-4C96-8F24-2C169676504Chttps://visualstudiogallery.msdn.microsoft.com/6eb51f05-ef01-4513-ac83-4c5f50c95fb5
    In order to resolve your issue better, I suggest you post this issue to
    PHP Tools
    for Visual Studio or
    VS.Php for Visual Studio, click “Q AND A”, you will get better support there.
    Thanks for your understanding.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Which Java API could check the type of Operating System the JVM is running?

    Does anyone know which Java API could check the type of Operating System the JVM is running?
    thanks a lot!

    check out System class.
    regards
    shyamAnd specifically, the getProperty() method.
    - K

  • How do I know which is the correct location of the JVM?

    How do I know which is the correct location of the JVM? What do I add to my PATH environment variable? I'm trying to install Sybase ASE on my Sun Fire v480 SPARC box, but keep getting the below error...
    *"A suitable JVM could not be found. Please run the program again using the option -is:javahome <JAVA HOME DIR>"*
    So I did the following...
    STEP 01) To confirm that Java is installed, I ran the java -version command. I received the following output...
    bash-3.00# java -version
    java version "1.5.0_17"
    Java(TM) Platform, Standard Edition for Business (build 1.5.0_17-b04)
    Java HotSpot(TM) Server VM (build 1.5.0_17-b04, mixed mode)
    STEP 02) Then I tried to locate the location of where Java was installed...
    bash-3.00# which java
    /usr/bin/java
    STEP 03) Then I tried to confirm if it was a symbolic link or not...
    bash-3.00# ls -al /usr/bin/java
    lrwxrwxrwx 1 root other 16 Jun 24 01:54 /usr/bin/java -> ../java/bin/java
    STEP 04) The symbolic link doesn't seem to match any of the output below. Which is the correct location / path of Java (JVM / JRE)?
    bash-3.00# find / -name java -print;
    /usr/share/lib/java
    /usr/share/java
    /usr/bin/java
    /usr/sfw/include/mozilla/java
    /usr/include/firefox/java
    /usr/jdk/instances/jdk1.5.0/bin/java
    /usr/jdk/instances/jdk1.5.0/bin/sparcv9/java
    /usr/jdk/instances/jdk1.5.0/jre/bin/java
    /usr/jdk/instances/jdk1.5.0/jre/bin/sparcv9/java
    /usr/jdk/packages/javax.help-2.0/doc/api/com/sun/java
    /usr/java
    /usr/apache/tomcat/webapps/tomcat-docs/catalina/docs/api/org/apache/naming/java
    /usr/apache/tomcat55/classes/org/apache/naming/java
    /usr/apache/jserv/docs/api/org/apache/java
    /usr/j2se/bin/java
    /usr/j2se/bin/sparcv9/java
    /usr/j2se/jre/bin/java
    /usr/j2se/jre/bin/sparcv9/java
    /usr/appserver/samples/blueprints/adventure1.0.4/project/apps/activitysupplier/activitysupplier-ejb/src/java
    /usr/appserver/samples/blueprints/adventure1.0.4/project/apps/airlinesupplier/airlinesupplier-ejb/src/java
    /usr/appserver/samples/blueprints/adventure1.0.4/project/apps/bank/bank-ejb/src/java
    /usr/appserver/samples/webservices/security/web/apps/clientCert/clientCert-share/src/java
    /usr/appserver/samples/webservices/security/web/apps/clientCert/clientCert-war/src/java
    /usr/appserver/samples/webservices/security/web/apps/xms/xms-client/src/java
    /usr/appserver/samples/webservices/security/web/apps/xms/xms-share/src/java
    /usr/appserver/samples/webservices/security/web/apps/xms/xms-war/src/java
    /usr/appserver/samples/xml/apps/dom/src/java
    /usr/appserver/samples/xml/apps/sax/src/java
    /usr/appserver/samples/xml/apps/xslt/src/java
    /opt/staroffice8/share/Scripts/java

    I've been racking my head against the wall, but can't seem to find the solution... I've even installed the latest JRE (in a new location), but still seem to have the same problem. Please see the notes below...
    I installed the latest JRE in /export/home/jvm/jre1.6.0_17/
    bash-3.00# /export/home/jvm/jre1.6.0_17/bin/java -version
    java version "1.6.0_17"
    Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
    Java HotSpot(TM) Server VM (build 14.3-b01, mixed mode)
    bash-3.00# PATH=/export/home/jvm/jre1.6.0_17/bin:$PATH
    bash-3.00# export PATH
    bash-3.00# echo $PATH
    /export/home/jvm/jre1.6.0_17/bin:/usr/sbin:/usr/bin
    bash-3.00# JAVA_HOME=/export/home/jvm/jre1.6.0_17/bin
    bash-3.00# export JAVA_HOME
    bash-3.00# echo $JAVA_HOME
    /export/home/jvm/jre1.6.0_17/bin
    bash-3.00# env
    HZ=100
    LC_MONETARY=en_CA.UTF-8
    TERM=xterms
    SHELL=/sbin/sh
    LC_NUMERIC=en_CA.UTF-8
    OLDPWD=/export/home/jvm/jre1.6.0_17
    PATH=/export/home/jvm/jre1.6.0_17/bin:/usr/sbin:/usr/bin
    MAIL=/var/mail/root
    LC_MESSAGES=C
    LC_COLLATE=en_CA.UTF-8
    PWD=/export/home/jvm/jre1.6.0_17/bin
    JAVA_HOME=/export/home/jvm/jre1.6.0_17/bin
    EDITOR=vi
    TZ=Japan
    SHLVL=1
    HOME=/
    LOGNAME=root
    LC_CTYPE=en_CA.UTF-8
    LC_TIME=en_CA.UTF-8
    _=/usr/bin/env
    bash-3.00# cd /cdrom/disc1050709/
    bash-3.00# ./setup -console
    InstallShield Wizard
    Initializing InstallShield Wizard...
    Searching for Java(tm) Virtual Machine...
    .........................A suitable JVM could not be found. Please run the program again using the option -is:javahome <JAVA HOME DIR>
    Is there something I'm missing?
    Thank you

  • In which table the initial balances will be stored when loading via api

    Hi all,
    I am doing initial balances migration...
    In which table the initial balances will be stored when loading though an api.. (pay_balance_upload.process).
    First I have loaded data in to pay_balance_batch_headers and pay_balance_batch_lines tables..
    Then called the api pay_balance_upload.process. and the data was reflecting correctly in front end.
    But we need to reconcile the loaded data.. for that, can anyone please tell me in which the loaded balances would be stored..
    I have identified two tables, pay_assignment_latest_balances
    and pay_latest_balances
    when I try to create a balance from frontend I can see the data in pay_latest_balances table..
    But when I load via api I am not able to find it in any of these tables..
    In addition to that can anyone please tell me when the data will be populated in pay_assignment_latest_balances and pay_latest_balances tables.
    Awaiting for your help and quick response..
    Thanks and Regards
    Kishore

    You have followed the correct process..As Vignesh said, you can use pay_balance_pkg.get_value to make sure you have the correct values uploaded but otherwise if you are able to see the values in the front end I wouldn't worry about the latest balances tables. These tables, as the name indicate, hold only the latest values and if a payroll (ran post the initial balance upload) has been rolled back, these are deleted since they are no longer available.
    You can refer the below Metalink notes for a detailed explanation:
    The Secret Life of Initial Balance Upload with Screenshots Example [ID 60057.1]

  • Which program is the jvm?

    Hi!
    in windows system , jvm.dll is the jvm program. but in Linux system,I don't know which program is the main program of jvm? Is java in bin directory only a classloader?

    We can ask: how comes that "java" is a very small executable?
    ijbalazs@bijpc:/usr/lib/jdk1.4.2> find . -name java -ls
    248167 24 -rwxr-xr-x 1 root root 24564 j�n 20 2003 ./bin/java
    247526 24 -rwxr-xr-x 1 root root 24564 j�n 20 2003 ./jre/bin/java
    Well, maybe so:
    ijbalazs@bijpc:/usr/lib/jdk1.4.2> find . -name libjvm.so -ls
    247551 5044 -rwxr-xr-x 1 root root 5159829 j�n 20 2003 ./jre/lib/i386/client/libjvm.so
    247545 7487 -rwxr-xr-x 1 root root 7657624 j�n 20 2003 ./jre/lib/i386/server/libjvm.so
    ijbalazs@bijpc:/usr/lib/jdk1.4.2>

  • Which is the best Open source API  for PGP??

    Hi All,
    Please tell me
    which is the best Open source API for PGP??
    Please Help me thi is urgent!!
    regards
    harish

    I am also looking at these topic at the moment.
    I found Bouncycastle and hushSDK.
    Have you found a good one and with example also?

  • In which language does the jvm program is written?

    In which language does the jvm program is written?
    Please give the reason for that
    Thanks,
    Vidyadhar

    Dear Nisha,
    you can use table GRACREVREJUSER with the correpsonding reasons from table GRACREJREASON and GRACREJREASONT.
    Regards,
    Alessandro

  • Which is the best API for creating restful web services.

    Hi guys,
    I have tried a lot of apis to create a restful web service. But none of them has perfect documentation or examples. Which is the best one that has good support and future.

    "Best" automatically implies opinions and speculation; one I personally believe has a bright future is Jersey. Jersey is the reference implementation (RI) for [JSR-311|http://jcp.org/en/jsr/detail?id=311] ("The Java API for RESTful Web Services" or JAX-RS).

  • How the JVM SHOULD be distributed (interesting)

    Well I sent this document to the JCP maybe it will be better off there....
    Sun needs a new JAVA marketing strategy.
    Opinions expressed here are of my own, Matt Prokes, remember these are only opinions about what should or could be.
    If you have ?'s contact me at [email protected]
    What Java's Problem Is:
    As far as I can see the only problem that java has these days is the client inconsistencys, this is due to Microsoft and there attempted dustruction of the HUGE java language, and Microsoft has succeeded wonderfully thus far, which is sad. I feel it is only due to the way Sun markets Java, not that they have not tried but they are going about it the wrong way.
    Sun Feels They Are Being Oppressed:
    It seems to me that Sun has a feeling of being oppressed by Microsoft, they see the company inflicting standards on the computing world that are self centered and platform specific, this is why java was created, to break that mold and it does it wonderfully but java has not gained populatiry because of marketing technique, no, it has gained popularity because it REALLY is what it is cracked up to be....A better way of doing things....
    That is why sun landed the title of being one the the most innovative companys today by the magazine �PC World� ranking 13th place while Microsoft landed 137th (i think).
    Yet with all this technology sun does not try to inflict it's standards on the PC world, well you might think what about all those court cases, for instance the most recent that suggests that Sun wants to FORCE Microsoft to install their JVM. I think stuff like this just slows Sun down, as we learned with previous cases Microsoft is just to big to fight and if you do manage to win it will be 3-4 years later. If you think about it time is money, why waste time? Trying to leach off of Microsoft is NOT the way to inflict standards, infact it is one of the worst ways because by the time you would have won microsoft would have bullied the java enviroment to it's grave (umm .net). So you may ask how do we enforce standards without the help of microsoft, the answer is more simple than you may think yet for some reason it has not been thought of by Sun. So far this is what has brought microsoft to the top.
    1.Great Software
    2.Enforced Standards, and Implementation
    3.Excellent Marketing
    4.Protected Software (Ideas)
    5.Industry Wide Support
    Innovation is not on this list, Microsoft does not have a innovative bone in it's body at the moment, it just buys technology that it needs, and has flashy GUI's, and a huge amount of support in the software industry. This is why according to the magazine �PC World� microsoft ranks #137 in innovation while Sun sits at a satisfying ranking of #13.
    What this means is that Sun just is more innovative, it has technology out there that could be used but it can't because we have clients with Version 1.3 Java software on their PC's, Either that or Propietary and NOT PLATFORM INDEPENDENT Microsoft JVM's which Microsoft will again start to distribute in 2004 on XP, this brings me to my first point, if we are going to have a platform independent language it needs to come from ONE POINT that will be implemented by all Manufactures (the W3C for instance). You may be thinking well how do you enforce the SUN JVM if microsoft does not pack it with windows? The answer is you do what most new companys do and that is goto the PC Vendors. I would like to point out that microsoft is for the most part ONLY a software company (aside from some of there PC products), but they do not build and distribute PC systems, thus microsoft does not control what can go on a PC, I would like to point out the growing Linux threat to windows, more particulary the linux based operating system (Lindows) recently lindows has aquired a deal with walmart to sell there operating system as a subsitute to windows, this worked out phenominaly and right now walmart cannot seem to keep enough of the pc's on the shelves (since they cost only about 199$). Case point linux has also grown enormously due to �Home Editions� of linux (Red Hat). The first point I would like to make is that Sun should be PAYING vendors to install the SUN JVM over the microsoft one, this takes care of a few of Sun's problems (Not as much industry support as microsoft, and upgrading the JVM) all this can be done for a measily 5-6 million a year and will reach about 70% of the PC sector, infact I am almost certain this is how microsoft started out.
    One Of Java's Big Problems JVM Inconsistencys
    Now if Sun locks 70% of the PC market that will already be a large boost for java, but the question is how to make the percentage grow to 100%... I would now like to point out the company Macromedia, macromedia products are phenominal, and have changed the way media is seen on the web, particularly the Flash product that macromedia sells, now at this moment macromedia has stated that >90% flash support exists on the web today and >70% is with the most current version of flash, as I see it infact flash is one of the most universally supported pieces of software even more so than microsoft, this is why you see flash movies on yahoo, cnet, amazon, and even MSN! So you may ask what made flash what it is today? Well as described before flash is supported and installed by PC vendors, and even if it is not you can bearly go any place on the web with out getting a message stating that you should upgrade to the most current version of flash, this is due to the wide support on the web..... Now on the other hand if I run a java applet and the applet was compiled with some new features that were not supported in version 1.3 (Swing for example) we will get an error message stating that the package cannot be found and the applet will not run...You do not get any messages to upgrade, no window prompts, nothing..which brings me to my next point the java compiler should include the code (a pre JVM 1.3 version & microsoft JVM compatiable) that will prompt you to install the most current version of Java you already see default loaders for swing, a plugin check should also be included in all programs to ensure that you have to most recent version, and if you do not then it will send you to the Sun Website, or display a update manager or something. Getting an error saying that the applet packages are not found does not help the user any it only frusterates them, you have to physically provide a remedy to the problem at hand. This should also check to see if the microsoft JVM is installed and if it is prompt to upgrade to the Sun JVM, this will pretty much distroy the use of the microsoft JVM.
    This takes care of the enforcing standards part, braudens the Industry Wide Support, and protects the java enviroment, last but not least you need to promote the software, Java already does this excellently with webservices, and other things but there are more consumers than businesses and Java should also be concentrating more on the excellent 3d support that they have, the networking features of java, ect. Take OpenOffice.org for instance the product has grown emmensly since it has started and much uses Java API's, you would see much growth in Java if you provided other products like Open Office for free, for instance a Quake Like Multiplayer game in Java 3D distributed on an open source enviroment, in applet form (since applets are exclusivly a invention of Java), and then have a couple of servers set up that people can play for free on Sun's site, more networking app's for free, ect. You have to promote some of the more flashy features of Sun this way in order to see more growth and support and for free (learn from linux which is quickly becoming a HUGE threat for microsoft) if sun is making 13 billion a year I see no problem to them sporting a couple of servers with some USEFUL online apps/games/ect that sport how innovative java really is, and if they really need to they can have all the banners on stuff like the online games, take Http://www.runescape.com that sports an average of 10,000 users at any moment using the cross platform Java 3d API and they do it for free! All open source free products should be on Suns website, it shows how strong of a community Sun really is, instead of having it on some other website like www.openoffice.org that only sports Sun's name maybe a few times you might occasionally see a logo.. it would be better to maybe get open office from an address like www.openoffice.sun.com, maybe try a www.games.sun.com address or a www.apps.sun.com and then advertise the stuff that can be found at the Sun website. Sun should be proud to be open source, it is the only thing microsoft can't buy....
    Opinions Of Matt Prokes..
    [email protected]

    Sun should be proud to be open source, it is the only thing microsoft
    can't buy....Thats the only line of your whole pointless post that I read.
    Since when is "sun" open source. I imagine you mean java. Java isn't open source, what makes you think it is? You can get the source for it and modify it to suit ur needs as per the license but this isn't really open source.. is it?
    Anyway, don't waste space with your crap here, send an e-mail to somebody at sun instead, its just a waste posting this here.

  • IAS6.0 SP4: How to find the port number of the JVM

    I want to check the jvm to know whether the startup class is excecuted in kjs or cxs.
    I want that certain operations in the startup class are not excecuted in every kjs or are excecuted only once.
    Thanks for your help

    There is a better way. Use kiva API to cover all OSs:
    knowledgebase FAQ 4008 (
    http://knowledgebase.iplanet.com/NASApp/ikb/index.jsp):
    ServletContext ctx = ...
    com.netscape.server.IServerContext sc =
    (com.netscape.server.IServerContext)ctx;
    com.kivasoft.IContext gxContext = sc.getContext();
    String host = com.kivasoft.util.GX.GDSCurrentEngineGetString
    (gxContext, null, "Host", "defaulthost");
    int port = com.kivasoft.util.GX.GDSCurrentEngineGetLong (gxContext,
    null, "Port", 0);
    But I also want to get the kjs's name which used in the log file's name:
    kjs_1.log. How to?
    Stefan Herz wrote:
    I want to check the jvm to know whether the startup class is excecuted
    in kjs or cxs.
    I want that certain operations in the startup class are not excecuted
    in every kjs or are excecuted only once.
    Thanks for your help
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • On the printing slowness of Postscript produced by the JVM from calls to Graphics.drawString() (Linux/Unix)

    Happy new year,
    before the holidays my attention was drawn to an issue that supposedly the Postscript produced by the JVM is too big and hence too slow.  Here are my findings.
    The issue
    Text printing via CUPS to native Postscript printers can be slow. Printing a terms and conditions page (17000 characters/page) takes three and a half minutes to print on a Dell 2330 dn laser printer (96 MB,Max speed 33 ppm). The file is about 8 MB in size. To contrast that, rendering the text to a buffered image with 300 DPI and printing the result produces 7 MB of output which prints in 30 seconds on the same printer. More measures for different printers and documents can be found at the end of this post. The issues is registered as  "JDK-4627340 : RFE: A way to improve text printing performance for postscript devices" (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4627340) and the proposed workaround is to use printer fonts.
    Side remark regarding the workaround
    There is a regression that prevents the workaround from working (bug 9008662 at Sun (not yet visible),  bug 8023990 at OpenJDK (https://bugs.openjdk.java.net/browse/JDK-8023990). Without knowing what other bad side effects this might have, the issue can be resolved by setting the property "sun.awt.fontconfig". On my system I set it to the location of a "fontconfig.properties" of a JVM that does not have the bug (e.g. /home/alex/openjdk_7_b147_jun_11/openjdk/build/linux-i586/bin/java -Dsun.awt.fontconfig="/etc/java-6-openjdk/fontconfig.properties" Print2DtoStream). I also successfully tested the workaround on an Oracle JVM 1.7.0_03-b04.
    Back to the main topic
    How the JVM draws text if it can't use a standard printer font
    Text is drawn with postscript path drawning commands such as "moveto", "lineto" or "curveto". As an example consider the word "ll" which looks something like this:
    %N->short for "newpath"
    N
    %paint first "l"
    %M->short for "moveto"
    0.76875 11.06 M
    %L->short for "lineto"
    0.76875 2.468 L
    1.823 2.468 L
    1.823 11.06 L
    0.76875 11.06 L
    %p->short for "closepath"
    P
    %paint second "l"
    3.649 11.06 M
    3.649 2.468 L
    4.703 2.468 L
    4.703 11.06 L
    3.649 11.06 L
    P
    The same text could be printed with a printer font using the command "(ll) show" which is much more compact but is available in Java only for the Postscript standard fonts and it isn't working at all right now as explained above.
    Is it the file size?
    My first thought was that the file size was the source of of slowness and so I wrote a small processor that would detect glyphs, normalize*1 them and place them in a dictionary. Recurring references to the same glyph were replaced by a dictionary reference  (This is incidentally the fix proposed by the original author of RFE 4627340). This shrunk the file to about 11% of the original size but the processing time surprisingly doubled.
    *1: With "normalizing" I mean applying a translation transform so that the smallest coordinates in the contours of a glyph are exactly 0. In addition I experimented with performing a normalizing scale transform so that all coordinates lie between 0 and 1 so that identical glyphs are detected at arbitrary positions and at different font sizes.
    That led to the question to why there is such a big difference in performance between a Type 1 font dictionary and a self constructed dictionary since both contain basically the same drawing instructions. The difference is apparently that fonts are cached and user drawings are not unless explicitly told.
    The Postscript "ucache" instruction
    Postscript level 2 introduces the "ucache" instruction which seems to be defined for precisely this kind of problem. From the documentation:
    "Some PostScript programs define paths that are repeated many times. To optimize the interpretation of such paths, the PostScript language provides a facility called the user path cache. This cache, analogous to the font cache, retains the results from previously interpreted user path definitions. When the PostScript interpreter encounters a user path that is already in the cache, it substitutes the cached results instead of reinterpreting the path definition. "
    After adding "ucache" instructions to my filter the speed improved by factor 10.
    To illustrate the said the "ll" text from above looked as follows after the transformation:
    %definition of the glyph "l" named "p0"
    /p0
    ucache
    0.000 0.000 1.054 8.592 setbbox
    0.000 8.592 moveto
    0.000 0.000 lineto
    1.054 0.000 lineto
    1.054 8.592 lineto
    0.000 8.592 lineto
    closepath
    } cvlit def
    G
    N
    0.769 2.468 translate
    %draw "l" at 0.769 2.468
    p0 ufill
    -0.769 -2.468 translate
    3.649 2.468 translate
    %draw "l" at 3.649 2.468
    p0 ufill
    -3.649 -2.468 translate
    For ucached shapes there is a special compact representation so that the same can be written as follows:
    /p0
    0.000 0.000 1.054 8.592
    0.000 8.592
    0.000 0.000
    1.054 0.000
    1.054 8.592
    0.000 8.592
    } cvlit def
    G
    N
    0.769 2.468 translate
    p0 ufill
    -0.769 -2.468 translate
    3.649 2.468 translate
    p0 ufill
    -3.649 -2.468 translate
    Interestingly the speed improvement remained the same on a Chinese report that had hardly any character reuse. Upon this observation I changed the filter to not use a dictionary but so simply instruct the interpreter to cache each glyph definition and the performance remained nearly the same.
    The initial "ll" text from above looks as follows after this transformation:
    N
    %paint first "l" cached
    0.76875 2.468 1.823 11.06
    0.76875 11.06
    0.76875 2.468
    1.823 2.468
    1.823 11.06
    0.76875 11.06
    } ufill
    %paint second  "l" cached
    3.649 2.468 4.703 11.06
    3.649 11.06
    3.649 2.468
    4.703 2.468
    4.703 11.06
    3.649 11.06
    } ufill
    Note that I didn't normalize the shapes.
    Why does this improve the performance so vastly if the shape is drawn only once? For a while I thought perhaps that the interpreter would consider two paths which differ only by a translation as being the same but rereading the documentation and looking at the Chinese example in which nearly all characters are unique, disproves this. The relevant part of the documentation reads:
    "Caching is based on the value of a user path object. That is, two user paths are considered the same for caching purposes if all of their corresponding elements are equal, even if the objects themselves are not.
    A user path placed in the cache need not be explicitly retained in virtual memory. An equivalent user path appearing literally later in the program can take advantage of the cached information. Of course, if it is known that a given user path will be used many times, defining it explicitly in VM avoids creating it multiple times.
    User path caching, like font caching, is effective across translations of the user coordinate system, but not across other transformations, such as scaling or rotation. In other words, multiple instances of a given user path painted at different places on the page will take advantage of the user path cache when the current transformation matrix has been altered only by translate. If the CTM has been altered by scale or rotate , the instances will be treated as if they were described by different user paths."
    An explanation that would fit the findings
    The rasterizer renders the page multiple time (perhaps in order to save memory and produce horizontal strips). On the first rendering the cache is filled and reused on the subsequent renderings thereby improving performance even if all cached items are used only once.
    Based upon this theory I hoped that the strip height would grow if I added more memory to the printer but this was not the case on the two printers for which I had memory to test with. Even substantial changes to the available memory (e.g. going from 32 MB to 96 MB) had no impact whatsoever on the performance.
    Summary
    The issue is not related to the file size as the original requester suspected but very likely due to the uncached rendering. Caching of glyphs can be achieved by using the "ucache" instruction or perhaps by placing the glyphs in font dictionaries and using the "show" operator.
    Although reported in 2003, time is apparently not healing this quick enough since printers in the 10,000$ class like the Sharp MX2310U still take a full minute to print 10 pages and a desktop printer may be blocked for over an hour for the same document.
    We will now try to use the CUPS filter and leave the printers configured as Postscript printers. If there is interest I can post the single file source of a CUPS filter that performs the inline conversion described. Apart from libl it requires no additional libraries and written using flex it is reasonably lightweight and fast.
    I would appreciate any opinion on whether or not the proposed workaround for bug 8023990 (https://bugs.openjdk.java.net/browse/JDK-8023990), namely having the system property "sun.awt.fontconfig" pointing to a working fontconfig.properties of a previously installed and working 1.6 version file, is safe.
    Measures (Appendix)
    "Terms and Conditions" report
    Testing a single page "Terms and Conditions" report in "Arial" 8pt (I am aware that "Helvetica" is width compatible and nearly looks the same but in this particular case the line height was also relevant and as explained above, printer fonts are currently not working). The page contains 17000 characters of which some parts are bold and some italic. This is a real world example and to make things worse the requirement is to print the text on the backside of every page on a certain class of reports. I am aware that this is a bit extreme but I also felt that I couldn't dismiss it as being unreasonable.
    File "Arial.ps" (7.5 MB Unmodified output of the JVM)
    Printer
    Printing time
    Dell 2330dn 32MB/96MB
    3:50 minutes
    Lexmark X658de (55 ppm, aprox. 5,000$)
      1:45 minutes
    HP LaserJet 4240n 64 MB
    1:12 minutes
    Kyocera Taskalfa 300ci (30 PPM, aprox. 8,000$)
    1 minute
    HP Color LaserJet 4650 dn 128/384MB
    51 seconds
    Sharp MX 2310U 512MB (55ppm,  aprox. 10,000$)
    31 seconds
    Arial_inline.ps (8 MB contains "ucache" without normalization and without dictionary)
    Printer
    Printing time
    32MB/96MB
    30seconds/30seconds (Improvement by factor 7.7)
    Lexmark X658de (55 ppm, aprox. 5,000$)
      15 seconds (Improvement by factor 7)
    HP LaserJet 4240n 64 MB
    47 seconds (Improvement by factor 1.5)
    Kyocera Taskalfa 300ci (30 PPM, aprox. 8,000$)
    20 seconds (Improvement by factor 5)
    HP Color LaserJet 4650 dn 128/384MB
    46 seconds (Improvement by factor 1.1)
    Sharp MX 2310U 512MB (55ppm,  aprox. 10,000$)
    14 seconds (Improvement by factor 2)
    Asian characters test
    Testing 10 pages of Asian characters in the font "WenQuanYi Zen Hei" 12pt where each page contains 49 lines by 40 unique characters. The document contains the 30,000 characters between unicode 0x4e00 and 0x9fff. This is a nonsense stress test but it illustrates  that the "ucache" speedup works even though no character is repeated in the report.
    Asian.ps  (52 MB Unmodified output of the JVM)
    Printer
    Printing time
    Dell 2330dn 32MB/96MB
    64 minutes
    Lexmark X658de (55 ppm, aprox. 5,000$)
    Not measured
    HP LaserJet 4240n 64 MB
    11 minutes
    Kyocera Taskalfa 300ci (30 PPM, aprox. 8,000$)
    Not measured
    HP Color LaserJet 4650 dn 128/384MB
    9:13 minutes
    Sharp MX 2310U 512MB (55ppm,  aprox. 10,000$)
    4:08 minutes
    Asian_inline.ps (54 MB contains "ucache" without normalization and without dictionary)
    Printer
    Printing time
    32MB/96MB
    5:30 minutes (Improvement by factor 11.6)
    Lexmark X658de (55 ppm, aprox. 5,000$)
    Not measured
    HP LaserJet 4240n 64 MB
    3:48 minutes (Improvement by factor 2.9)
    Kyocera Taskalfa 300ci (30 PPM, aprox. 8,000$)
    Not measured
    HP Color LaserJet 4650 dn 128/384MB
    2:46 minutes (Improvement by factor 3.4)
    Sharp MX 2310U 512MB (55ppm,  aprox. 10,000$)
    48 seconds (Improvement by factor 5)

    Hi Sven,
    Will putting the boilerplate in the trailer section allow me to still have it appearing on the back page of the main report? This is where it needs to be as far as the printed report goes - it is duplexed.
    Regards
    Lanny

  • Eclipse hangs and the JVM terminates in a Swing app incorporating JavaFX

    Hi everyone,
    I have a situation that is driving me nuts. I am developing a Swing based application which is incorporating some JavaFX components,mainly the TableView and a few layouts. I have wrapped all the javafx components into a common control for use application wide. I am also using an Eclipse plugin (Window Builder Pro) to layout the swing stuff.
    Now, my issue is, when I preview the JFrames and other components making use of the said simple custom control referred above, it only allows me to preview the JFrame once, there after Eclipse hangs and the JVM terminates.
    After some research, the most likely cause of this is that the reference to jfxrt.jar i have referenced in the project is loading some native dlls which can/should only be loaded once in the lifetime of a JVM. It looks like for some reason, my app is trying to load the native libs after it has already loaded them initially.
    The Application needs to be developed in Eclipse so netbeans is not an option.
    Am just getting started with maven, i don't have the know to build a project of this complexity with maven.
    Has any one encountered this issue and how did they walk around it?
    Any assistance would be greatly appreciated.

    After further digging around, the actual exception that causes the jvm to terminate is java.lang.UnsatisfiedLinkError due to an attempt to reload \JavaFX_2.0_SDK\rt\bin\mat.dll, anyone knows how to overcome this ?

  • Which of the following are true about abstract methods in EJB 2.0

    Hi guys I'm beginner to EJB and i got some unanswered questions.
    Can any one of you please.. give answers?
    Thanks if you do...
    Which of the following are true about abstract methods in EJB 2.0
    CMP?
    Choose all correct answers:
    1. Abstract accessor methods should not be exposed in the EJB
    component's interface
    2.Abstract accessor/mutator methods are used to access and modify
    persistent state and relationship information for entity objects
    3.Abstract Accessor/Mutator methods do not throw exceptions
    4.The EJB developer must implement the Accessor/Mutator methods
    5.Abstract accessor methods may or may not be exposed in the EJB
    component's interface
    2.Which ONE of the following is true?
    Choose the best answer:
    1.Local interfaces cannot have a relationship with other Entity
    components
    2.Local interfaces cannot be used for Stateless Session EJB
    3.Local interfaces can be a part of Object's persistent state
    4.Local interfaces have the same functionality as that of a
    stateless Session EJB
    3.Which of the following describe the <cmr-field> in a EJB 2.0
    descriptor?
    Choose all correct answers:
    1.A Local interface/Entity can be a value of a <cmr-field>
    2.There is no <cmr-field> in EJB 2.0 descriptor
    3.It is used to represent one meaningful association between any
    pair of Entity EJBs, based on the business logic of the Application
    4.It provides a particular mapping from an object model to a
    relational database schema
    5.It allows the Local Entity interfaces to participate in
    relationships
    4.Which of the following are the advantages of using Local interfaces
    instead of dependent value classes?
    Choose all correct answers:
    1.Local Entity Interfaces can participate in Relationships
    2.The life cycle of Local Entity Interfaces is managed by EJB
    container, intelligently
    3.Local Entity Interfaces can be used in EJB QL Queries
    4.Local Entity Interfaces can be a part of the <cmp-field> but not
    <cmr-field>
    5.Which of the following are true about Local interfaces
    1.A local interface must be located in the same JVM to which the EJB
    component is deployed
    2.Local calls involve pass-by-reference.
    3.The objects that are passed as parameters in local interface
    method calls must be serializable.
    4.In general, the references that are passed across the local
    interface cannot be used outside of the immediate call chain and must
    never be stored as part of the state of another enterprise bean.
    6.Which of the following specifies the correct way for a client
    to access a Message driven Bean?
    Choose the best answer:
    1. via a Remote interface
    2. via Home interface
    3. Message driven bean can be accessed directly by the client
    4. both 1 & 2
    5. none of the above
    ------------------------------------------------------------------------7.Which of the following statements are true about message-driven
    bean Clients?
    ------------------------------------------------------------------------Choose all correct answers:
    They can create Queue and QueueConnectionFactory objects
    They can create Topic and TopicConnectionFactory objects
    They can lookup the JNDI server and obtain the references for
    Queue and Topic and their connection Factories
    Only 1 and 2 above

    Hi guys I'm beginner to EJB and i got some unanswered
    questions.
    Can any one of you please.. give answers?
    Thanks if you do...
    Which of the following are true about abstract methods
    in EJB 2.0
    CMP?
    Choose all correct answers:
    1. Abstract accessor methods should not be exposed
    d in the EJB
    component's interfacefalse
    2.Abstract accessor/mutator methods are used to
    access and modify
    persistent state and relationship information for
    entity objectstrue
    >
    3.Abstract Accessor/Mutator methods do not throw
    exceptionstrue
    >
    4.The EJB developer must implement the
    Accessor/Mutator methodsfalse
    5.Abstract accessor methods may or may not be exposed
    in the EJB
    component's interfacetrue
    2.Which ONE of the following is true?
    Choose the best answer:
    1.Local interfaces cannot have a relationship with
    other Entity
    componentsfalse
    2.Local interfaces cannot be used for Stateless
    Session EJBfalse
    3.Local interfaces can be a part of Object's
    persistent statefalse
    4.Local interfaces have the same functionality as
    that of a
    stateless Session EJBtrue
    3.Which of the following describe the <cmr-field> in a
    EJB 2.0
    descriptor?
    Choose all correct answers:
    1.A Local interface/Entity can be a value of a
    <cmr-field>true
    2.There is no <cmr-field> in EJB 2.0 descriptorfalse
    3.It is used to represent one meaningful association
    between any
    pair of Entity EJBs, based on the business logic of
    the Applicationtrue
    4.It provides a particular mapping from an object
    model to a
    relational database schematrue
    5.It allows the Local Entity interfaces to
    participate in
    relationshipstrue
    4.Which of the following are the advantages of using
    Local interfaces
    instead of dependent value classes?
    Choose all correct answers:
    1.Local Entity Interfaces can participate in
    Relationshipsis
    2.The life cycle of Local Entity Interfaces is
    managed by EJB
    container, intelligentlyis
    3.Local Entity Interfaces can be used in EJB QL
    Queriesnot
    4.Local Entity Interfaces can be a part of the
    <cmp-field> but not
    <cmr-field>not
    >
    >
    5.Which of the following are true about Local
    interfaces
    1.A local interface must be located in the same JVM
    M to which the EJB
    component is deployedtrue
    2.Local calls involve pass-by-reference.true
    3.The objects that are passed as parameters in local
    l interface
    method calls must be serializable.false
    4.In general, the references that are passed across
    s the local
    interface cannot be used outside of the immediate
    e call chain and must
    never be stored as part of the state of another
    r enterprise bean.true
    >
    6.Which of the following specifies the correct way for
    a client
    to access a Message driven Bean?
    Choose the best answer:
    1. via a Remote interfacefalse
    2. via Home interfacefalse
    3. Message driven bean can be accessed directly by
    the clientfalse
    4. both 1 & 2false
    5. none of the abovetrue.
    >
    ----------------7.Which of the following statements
    are true about message-driven
    bean Clients?
    ----------------Choose all correct answers:
    They can create Queue and QueueConnectionFactory
    objectsthe container can, dunno bout clients
    >
    They can create Topic and TopicConnectionFactory
    objectsthe container can, dunno bout clients
    >
    They can lookup the JNDI server and obtain the
    references for
    Queue and Topic and their connection Factories
    true
    Only 1 and 2 abovefalse
    somebody correct me if i'm wrong

Maybe you are looking for

  • How to open a document from a known path from Plugin, I am using CS4

    Hi I have some files in one of the location and wanted to open through plugin I have a piece of code which does not throw any error nor opens the document I get the message "Before" and "After" i would like to know where am i going wrong Code below: 

  • Serial Number. Production Order Confirmation. GR. UD. Sales Delivery

    Hi Gurus, Please help on this issue to get any user exits ..... As part of Serial number management, we have a certain issues on serial number confirmation, goods receipt from production order and quality inspection with UD. Master data: Finished pro

  • Not charging or syncing now

    SImilar issue. iPAD is 2 weeks old..been working great except from last night after 2 hours of use, i plugged it in for the night after the battery died completely. this morning, it was at 8% charge which surprised me. I took it to the office used it

  • How to find implemented notes in a program.

    Hi Experts, In a program I found some code is written in betwwen two comments and the comments are the number of the note. Please tell me how I can find weather that note is already released for tthe program or it is just mentioned over there. In the

  • Alphabetical list of names

    I have been able to make a name list and sort it alphabetical, but with 150 names it stretches over numerous pages.  How do I create a name list all on one page with multiple columns?