PAYPAL $5: Debugging a runtime problem in my QuadTree inplementation...

The following is a QuadTree implementation. It splits a map into four quadrants (and nodes) determined by a split point. The split point is the middle of two points clicked by the user. If a sub-quadrant (child node) already has a point, and you've selected another point in that quadrant, that quadrant is split into four quadrants (the kids on the tree).
Almost Everything works fine except every once in a while you have to click twice to split a quadrant already containing a point (totally 3 points).
I cannot figure out why it is skipping over a node that already contains a point, as if it doesn't exist. any help is appreciated, the one who helps me lose this headache/problem gets $5 cash through paypal.
The insert method is the meat of what I'm doing. TIA.
public class QuadTree {
    public QuadTree(Rectangle range) {
        mRoot = new QTNode(range);
     * insert the point into the tree
     * assume all inseted points are distinct
    public void insert(Point point) {
        mRoot.insert(point);
    } // insert()
private QTNode  mRoot;
} // class QuadTree
class QTNode {
     * constructor
    QTNode() {
        mParent = null;
        mKids   = new QTNode[4];
        mDataPoint  = null;
        mRange      = null;
        mSplitPoint = null;
     * the constructor used by the QuadTree class
    QTNode(Rectangle range) {
        this();
        mRange = range;
     * inser the point to the subtree rooted at "this" node
     * @param  point the point to be inserted
    void insert(Point point) {
        int j;
        System.out.println(point);
        if ( mSplitPoint != null ) {
             if ((point.getX()) >= (mSplitPoint.getX())){
                  if ((point.getY()) >= (mSplitPoint.getY())){ j=3; }
                  else { j=1; }
             else {
                  if ((point.getY()) < (mSplitPoint.getY())){ j=0; }
                  else { j=2; }
               mKids[j].insert(point);
               System.out.println("Point inserted in" + j);
          else {
               if ( mDataPoint != null ){
                  //sets the split point of the next layer of nodes    
                  Point tempSplit = new Point();
                  tempSplit.setLocation(((mDataPoint.getX()+(point.getX()))/2),((mDataPoint.getY()+point.getY())/2));              
                         setSplitPoint(tempSplit);
                  for (int k=0; k<4 ; k++){
                       mKids[k] = new QTNode();
                       mKids[k].setParent(this);
                       Rectangle tempRange = (getRange());
                       Rectangle tempRect = new Rectangle();
                       if (k == 0) {
                       tempRect.setRect(tempRange.getX(),tempRange.getY(),(mSplitPoint.getX()-tempRange.getX()),(mSplitPoint.getY()-tempRange.getY()));
                       mKids[k].setRange(tempRect);
                       System.out.println("rect0" + tempRect);
                       if (k == 1) {
                       tempRect.setRect(mSplitPoint.getX(),tempRange.getY(),(tempRange.getWidth()-(mSplitPoint.getX()-tempRange.getX())),(mSplitPoint.getY()-tempRange.getY()));
                       mKids[k].setRange(tempRect);
                       System.out.println("rect1" + tempRect);
                       if (k == 2) {
                       tempRect.setRect(tempRange.getX(),mSplitPoint.getY(),(mSplitPoint.getX()-tempRange.getX()),(tempRange.getHeight()-(mSplitPoint.getY()-tempRange.getY())));
                       mKids[k].setRange(tempRect);
                       System.out.println("rect2" + tempRect);
                       if (k == 3) {
                       tempRect.setRect(mSplitPoint.getX(),mSplitPoint.getY(),(tempRange.getWidth()-(mSplitPoint.getX()-tempRange.getX())),(tempRange.getHeight()-(mSplitPoint.getY()-tempRange.getY())));
                       mKids[k].setRange(tempRect);
                       System.out.println("rect3" + tempRect);
                       if ((mKids[k].getRange().contains(point)) == true){
                                 mKids[k].setDataPoint(point);
               else { mDataPoint = point; }
    // FILL ANY METHOD AS NEEDED
    private void setSplitPoint(Point split) {
        mSplitPoint = split;
    private void setParent(QTNode parent) {
        mParent = parent;
    private void setRange(Rectangle range) {
        mRange = range;
    private void setDataPoint(Point point) {
        mDataPoint = point;
    QTNode getParent() {
        return mParent;
    QTNode getChild(int pick) {
        return mKids[pick];
    Point getDataPoint() {
        return mDataPoint;
    Rectangle getRange() {
        return mRange;
    private final int eTR = 0;  // index of the Top    Right  region/kid
    private final int eTL = 1;  // index of the Top    Left   region/kid
    private final int eBR = 2;  // index of the Buttom Right  region/kid
    private final int eBL = 3;  // index of the Buttom Left   region/kid
     * All the point data are stored in the leaf nodes of the quadtree.
     * That is, after a node splitted (then it has four kids)
     * the point data originally stored has been moved to one of its kid
     * whose range covers the point.
    QTNode    mParent;      // reference to the parent
    QTNode    mKids[];      // reference to the 4 kids
    Point     mDataPoint;   // the point data if any
    Rectangle mRange;       // the range covered by this node
    Point     mSplitPoint;  // where the vertical and horizontal
                            //   split lines meet
} // class QTNodeThe area is question is in bold, it has been coded by myself.

selfbump, please hellp me :-)

Similar Messages

  • How to debug a runtime stack underflow error?

    I'm really struggling to resolve a stack underflow that I'm getting.  The traceback I get at runtime is:
    VerifyError: Error #1024: Stack underflow occurred.
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()
    This is particularly difficult to debug because when I run in debug mode it does not happen at all.  It only happens when compiled as a release.
    Does anyone have any tips on how to debug a Stack Underflow?  Are have a clean explanation of what that means for Flash?
    In case it helps, this error is occurring when I click a button whose handler makes an RPC call, which uses a URLLoader, an AsyncToken, and then invokes the set of AsyncResponder instances associated with the AsyncToken.  With some server-side logging as well as some logging hacked into the swf, I know that the UrlLoader is successfully doing and GET'ing a crossdomain.xml file, is correctly processing it (if I wreck it, I get a security error), and is also successfully completing the "load" request (the server sends the data)... the underflow seems to be happening in the Event.COMPLETE listening/handling process (as is, of course, implied by the traceback as well).
    mxmlc used = from flex_sdk_4.5.0.20967
    Example player (I've tried a few) = 10.2.153.1

    Peter Blazejewicz wrote:
    crossposted:
    http://stackoverflow.com/questions/6270837/how-to-debug-a-runtime-stac k-underflow-error
    Yes... I intended to say so here but didn't get to it yet.  View traffic was extremely low here and I thought I'd see how stackoverflow compared.  I tend to check there first for most languages usually, but thought I'd try here as well to see if I should break that habit.
    As per the SO post, my specific problem was resolved by switching my variable initialization routine from the "initialize" application event, to the onCompletion event.  Although I am obviously "happy" about this since this issue cost me a lot of time and hair, it does not really indicate how I would go about debugging such an internal error in the future, so the question is technically unanswered.
    As to the question from Flex harUI, I am compiling indirectly via the MXMLC in the SDK, through the Amethyst Visual Studio plugin (which I'm auditioning).  The only libraries involved are from the flex_sdk_4.5.0.20967 SDK.  The project is quite small (a test project), consisting only of 1 MXML file and 2x .AS files.

  • ++ Debugging ACR Installation Problems ++

    If Photoshop CS2/Bridge is not working correctly after you attempt to install ACR (Adobe Camera Raw) 3.1 or higher, here a some hints on how to debug common installation problems.
    1. Make sure that "Camera Raw" appears exactly once in Photoshop's "About Plug-in" menu. If it appears zero times, you did not install the plug-in in a correct location. The correct location is shown below. If it appears more than one time, you have multiple copies of the plug-in installed.
    The new location for Adobe Camera Raw 3.x and 4.x is:
    >Mac: /Library/Application Support/Adobe/Plug-ins/CS2/File Formats/
    b Note: that the Library folder refered to above is that found at root level and NOT the User/Library folder.
    >Win: \Program Files\Common Files\Adobe\Plug-ins\CS2\File Formats\
    2. If "Camera Raw" appears exactly once in the "About Plug-in" menu, then pick that item and make sure the Camera Raw about box shows version 3.1 or higher. If not, you have the wrong version of Camera Raw installed.
    3. Run Bridge and pick "Camera Raw Preferences..." from the Bridge(Mac) or Edit(Win) menu. If the command is grayed out, then you don't have Camera Raw installed in the correct place. If the Camera Raw preferences dialog does not have "Version 3.1 or higher" in the title bar, you have the wrong version of Camera Raw installed.
    If after you verify that that 1, 2 and 3 are correct, and you are still having problems (e.g. generic raw image icons in lieu of thumbnail previews), then next step is to purge the Adobe Bridge cache for any folders you are having problems with. The command to use is:
    "Tools->Cache->Purge Cache for this Folder".

    Understood guys. But let me make a few points.
    1. Clearly I'm not the only one who had this problem. In fact, I wasn't the first person in this THREAD to have the problem.
    2. I'm fairly computer savvy, and have worked with Photoshop for several years.
    3. Yes, it does say c: in point 3, but I find it odd that in point 4 it does say Program Files/.... A very strange way to write it. Also, the c: drive is the default installation drive, so it's not idiocy for someone to assume that the file would be located on the same drive as you selected for installation.
    4. This is not about technically right or wrong. I never said that the instructions were wrong. I merely was trying to make a suggestion that would help people avoid the same trap I fell into. Was it my mistake? Yes. Would my clarifying suggestion perhaps help others avoid making the mistake I did. I would hope so. Also, as someone else suggested in this thread, Adobe SHOULD have written an installation program for the ACR 3.1 upgrade that did the placing automatically. After all, EVERYONE knew that ACR3.1 would be released shortly after the release for CS2...in fact Mr. Knoll himself was quoted in other forums about when D2X compatibility would actually happen.
    5. The purpose of these forums is to be helpful to other users--not to be patronizing or rude. I'm a big Photoshop fan, and a loyal customer. I'm also in the service industry, and I would bet that customer service experts would raise an eyebrow or two about the tone contained in certain messages in this thread, including from an Adobe employee.
    Just my two cents. Flame away if you must. But you might want to take a look at what I actually suggested in my last message before lighting up the torch.

  • Have CS5 and after installing yosemite is asking to install Java SE6 Runtime, problem is Java has a ton of version 6 and none for Mac, why hasnt adobe provide the right version download?

    Adobe needs to get their act together, be specific as to what version of Java SE6 Runtime is needed to open CS5  (InDesing, Illustrator, etc.)and if possible offer a direct download, since Oracle has a ton of version of SE6 and none of them for Mac specific platform. This short sight on behalf of Adobe and carelessness on behalf of apple is the kind of garbage, this companies will never get!

    I'm pretty sure this post has the link in it...
    Dreamweaver and Java SE 6 Runtime problem on MAC Mountain Lion OSX
    If not, do a search of the DW forum for Java SE 6, there has been a lot of discussion about it and the download link for it is floating around here somewhere.

  • Mix of different runtime problems on a mac.

    Hi,
    I'm on a mac 10.3 and have no intentions of upgrading. When I try to start some demo's I get a lot of different errors, all as far as I can tell related to the JRE. I installed everything from the apple website:
    Java webstart 2.3.0 (modified the May 2007)
    Applet Launcher 1.4 (modified the May 2007)
    Here's 2 of them: I give the info I get from the console:
    1. An error occurred while launching/running the application.
    Title: jME (v0.11) Test [curve.TestBezierCurve]
    Vendor: jMonkeyEngine, LLC
    Category: Invalid Argument error
    The application has requested a version of the Java 2 platform (JRE) that is currently not locally installed. Java Web Start was unable to automatically download and install the requested version. The JRE version must be installed manually.
    launch file
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+"
    codebase="http://www.jmonkeyengine.com/webstart/"
    href="jmedemo.php/curve.TestBezierCurve">
    <information>
    <title>jME (v0.11) Test [curve.TestBezierCurve]</title>
    <vendor>jMonkeyEngine, LLC</vendor>
    <homepage href="http://www.jMonkeyEngine.com"/>
    <icon href="jme_logo.jpg"/>
    <description>jME (0.11) JNLP Test - curve.TestBezierCurve</description>
    <description kind="short">jME Technology Preview</description>
    <offline-allowed/>
    </information>
    <security>
    <all-permissions/>
    </security>
    <resources>
    <j2se version="1.5+"/>
    <jar href="jmetest.jar" main="true"/>
    <jar href="jmetest-data.jar"/>
    <extension name="jme" href="http://www.jmonkeyengine.com/webstart/jme.jnlp" />
    </resources>
    <property key="java.library.path" value="." />
    <application-desc main-class="jmetest.curve.TestBezierCurve"/>
    </jnlp>
    exception
    JNLPException[category: Invalid Argument error : Exception: null : LaunchDesc: null ]
         at com.sun.javaws.Launcher.handleApplicationDesc(Launcher.java:259)
         at com.sun.javaws.Launcher.handleLaunchFile(Launcher.java:199)
         at com.sun.javaws.Launcher.run(Launcher.java:167)
         at java.lang.Thread.run(Thread.java:552)
    console
    Java Web Start 1.4.2_12 Console, started Thu May 03 10:23:16 NZST 2007
    Java 2 Runtime Environment: Version 1.4.2_12 by Apple Computer, Inc.
    Example 2:
    An error occurred while launching/running the application.
    Title: Tower Of Hanoi
    Vendor: J�rgen Failenschmid
    Category: Launch File Error
    Unsupported JNLP version in launch file: 1.5+. Only version 1.0 is supported with this version. Please contact the application vendor to report this problem.
    launch file
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!-- Tower Of Hanoi Webstart Configuration -->
    <jnlp spec="1.5+"
    codebase="http://projects.anycpu.com/toh/"
    href="toh.jnlp">
    <information>
    <title>Tower Of Hanoi</title>
    <vendor>J�rgen Failenschmid</vendor>
    <homepage href="http://www.anycpu.com/Java3DExample.htm"/>
    <description>Tower Of Hanoi</description>
    <description kind="short">Animated implementation of the Tower Of Hanoi puzzle using Java 3D.</description>
    <description kind="tooltip">Tower Of Hanoi</description>
    <!-- Gif or Jpeg: 64x64 during download; 32x32 as icon. Automatically resized. -->
    <icon href="icon.gif"/>
    <!-- Splash screen during launch -->
    <icon kind="splash" href="splash.jpg"/>
    <offline-allowed/>
    <shortcut online="false">
    <desktop/>
    <menu submenu="Anycpu"/>
    </shortcut>
    </information>
    <!--
    Java 3D will not run with minimum security.
    Therefore, the application JARs have to be signed.
    -->
    <security>
    <all-permissions/>
    </security>
    <resources>
    <j2se version="1.5+"/>
    <jar href="toh.jar" main="true"/>
    <jar href="jars/commons-logging.jar"/>
    <jar href="jars/log4j.jar"/>
    <extension href="http://download.java.net/media/java3d/webstart/release/java3d-latest.jnlp"/>
    </resources>
    <application-desc main-class="net.pacbell.jfai.toh.util.Launcher">
         <argument>net.pacbell.jfai.toh.TowerOfHanoi</argument>
         <argument>splash.jpg</argument>
    </application-desc>
    </jnlp>
    exception
    JNLPException[category: Launch File Error : Exception: null : LaunchDesc:
    <jnlp spec="1.5+" codebase="http://projects.anycpu.com/toh/" href="http://projects.anycpu.com/toh/toh.jnlp">
      <information>
        <title>Tower Of Hanoi</title>
        <vendor>J�rgen Failenschmid</vendor>
        <homepage href="http://www.anycpu.com/Java3DExample.htm"/>
        <description>Tower Of Hanoi</description>
        <description kind="short">Animated implementation of the Tower Of Hanoi puzzle using Java 3D.</description>
        <description kind="one-line">Tower Of Hanoi</description>
        <description kind="tooltip">Tower Of Hanoi</description>
        <icon href="http://projects.anycpu.com/toh/icon.gif" kind="default"/>
        <icon href="http://projects.anycpu.com/toh/splash.jpg" kind="splash"/>
        <offline-allowed/>
      </information>
      <security>
        <all-permissions/>
      </security>
      <resources>
        <j2se initial-heap-size="-1" max-heap-size="-1" version="1.5+"/>
        <jar href="http://projects.anycpu.com/toh/toh.jar" download="eager" main="true"/>
        <jar href="http://projects.anycpu.com/toh/jars/commons-logging.jar" download="eager" main="false"/>
        <jar href="http://projects.anycpu.com/toh/jars/log4j.jar" download="eager" main="false"/>
        <extension href="http://download.java.net/media/java3d/webstart/release/java3d-latest.jnlp"/>
      </resources>
      <application-desc main-class="net.pacbell.jfai.toh.util.Launcher">
        <argument>net.pacbell.jfai.toh.TowerOfHanoi</argument>
        <argument>splash.jpg</argument>
      </application-desc>
    </jnlp> ]
         at com.sun.javaws.Launcher.handleLaunchFile(Launcher.java:179)
         at com.sun.javaws.Launcher.run(Launcher.java:167)
         at java.lang.Thread.run(Thread.java:552)
    console
    Java Web Start 1.4.2_12 Console, started Thu May 03 10:17:25 NZST 2007
    Java 2 Runtime Environment: Version 1.4.2_12 by Apple Computer, Inc.
    Help greatly appreciated.

    You should contact Apple for this issue.

  • Dreamweaver and Java SE 6 Runtime problem on MAC Mountain Lion OSX

    I have a problem with dreamweaver. I really love dreamweaver for building web pages and have used it for years with a PC.  I recently switched from a PC to a MAC but I find that when I open the Dreamweaver app for the first time I get a prompt that says something like "You must download Java SE 6 runtime, would you like to install it now?"   I click yes, and the download fails.  I called Apple about it, they said the software resides on Oracle's Java web site, and its out of their control.  I go to the Oracle Java web site it says "Apple supplies their version of Java SE 6 runtime and there's no way to download it from the Java.com site.  All this means is that YOUR software does not work on my MAC because these two companies can't agree on who suppies this software.
    What I need to know is HOW DO I GET DREAMWEAVER TO WORK?  How do I get around this crazy *** catch 22 situation?  And why doesn't your software recognize Java SE 7 runtime?

    I'm in the same boat with you. I recently used Time Machine to backup my profile and then wiped my entire drive and installed Mountain Lion. After importing all of my data with the Migration Assitant, Dreamweaver will NOT open.
    SnakEyez02, Oracle's website does NOT have the dowload. The link you posted is to version 7. We've been down this road already. Martiantime is correct, neither Apple nor Oracle are providing Java SE 6, but Dreamweaver is crying to have it installed.
    So, Adobe, how do we get out of the hole that we did not dig?

  • Facing some runtime problem in new AIR 2.0Beta2 SDK and same application work in OLD AIR 2.0Beta1 SD

    Severity:
    Runtime Error
    Reproducibility:
    Every Time
    Discoverability:
    High
    Found in Version:
    SDK Flex 3 (Released)
    Affected OS(s):
    Windows              - XP
    Steps to Reproduce:
    « Hide
      Steps to reproduce:
    1. Run the Application 
    2. At the creation complete I am referring "StorageVolumeInfo" i.e. StorageVolumeInfo.storageVolumeInfo.addEventListener(StorageVolumeChangeEvent.STORAGE_VOL UME_MOUNT, onVolumeMount);
    3.
      Actual Results:
      I am getting runtime ERROR as below:
    VerifyError: Error #1014: Class flash.filesystem::StorageVolume could not be found.
    at _FreepandasV2WatcherSetupUtil$/init()
    at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::docFrameHandler()[C:\autobuild\3.4.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:3213]
    at mx.managers::SystemManager/docFrameListener()[C:\autobuild\3.4.0\frameworks\projects\fram ework\src\mx\managers\SystemManager.as:3065]
      Expected Results:
       I am using ADOBE AIR 2.0Beta2 version SDK.
    The same application is run in Last SDK i.e AIR 2.0Beta1
      Workaround (if any):
      I am using ADOBE AIR 2.0Beta2 version.
    Can you please help me out...
    Thank you

    My settings with air 3.3:
    <renderMode>gpu</renderMode>
    <aspectRatio>portrait</aspectRatio>
              <autoOrients>false</autoOrients>
            <fullScreen>true</fullScreen>
            <visible>true</visible>
            <softKeyboardBehavior>none</softKeyboardBehavior>
        </initialWindow>
    It only displays a white screen with a small gray square (1/5 of the screen size - top left).
    A scrollbar is visible if you drag the screen and the sound is playing...
    I tried this settings:
    <aspectRatio>portrait</aspectRatio>
            <renderMode>gpu</renderMode>
              <autoOrients>true</autoOrients>
            <fullScreen>true</fullScreen>
            <visible>true</visible>
            <softKeyboardBehavior>none</softKeyboardBehavior>
        </initialWindow>
    It won't work...
    Edit:
    I also tested the new sdk http://www.adobe.com/products/air/sdk/ with gpu mode.
    iPhone works fine but the iPad version always crashes.
    The app opened up but if I try to load a level created with box2d the app always closes (crashs).
    I think that is a gpu ram issue?
    Is this a iPad issue or air?
    Edit 2:
    I changed the creationcomplete event to viewactivate. The transition now looks really worse but the levels are loading.
    I also deleted all the elements before changing the view (removeElement and removeChild).
    The third step I made was to use weak eventListener obj.addEventListener("event, function, false,0,true);
    I think that iOS systems have the problem of less gpu ram than android devices ...

  • Possible Java Runtime problem

    I am an amatuer at best.
    I am receiving an error when trying to access any part of windows explorer now. I can't open folders at all.
    Included in picture format is the error.
    I'm running XP Home edition service pack 2
    more than enough ram/HD
    I recently un-installed AND re-installed java (from java.com). When java isn't installed - windows explorer works just fine.
    This problem is recent (last week or so) To my knowledge ZERO applications are been installed or modified. This computer is solely used for archiving pictures/video and web surfing (with the occasional video playback via VLC media player.
    Please let me know if you have any suggestions on how to combat this problem without having to re-install windows.
    If you need more information: please ask.
    Java is: 1.6.0_01
    http://img.photobucket.com/albums/v245/all2e_z/errormessage.jpg

    Hai create a batch file mode.bat
    in mode.bat write the code like dir > out.txt
    try {
                                  String line;
                                  Process p = Runtime.getRuntime().exec("mode.bat");
                                  BufferedReader input =  new BufferedReader(new InputStreamReader(p.getInputStream()));
                                  while ((line = input.readLine()) != null) {
                                  input.close();
                                catch (Exception err) {
                                }or if you need the in formation sbout the directory use the following code:
    import java.io.File;
    import java.io.IOException;
    public class FileUtil {
      public static void main(String[] a)throws IOException{
        showDir(1, new File("d:\\"));
      static void showDir(int indent, File file) throws IOException {
    File f=new     File("d:\\out.txt");
    FileWriter fw=new FileWrite(f);
    for (int i = 0; i < indent; i++)
          fw.write('-');
        fw.write(file.getName());
        if (file.isDirectory()) {
          File[] files = file.listFiles();
          for (int i = 0; i < files.length; i++)
            showDir(indent + 4, files);
    regards,
    Naga Raju

  • Pnp ce runtime problem

    Hallow I use pnpce and the runtime of program is to much
    Here Is my code what I doing wrong and if I can something to improve time because is to much
    regards
    START-OF-SELECTION.
    GET peras.
      PERFORM get_new_data.
    END-OF-SELECTION.
    wa_person_tab-pernr = pernr-pernr.
      rp_provide_from_last t_0001 ' '  sy-datum sy-datum.       "pa0001
    pn-begda pn-endda.
      wa_person_tab-stell = t_0001-stell.
      wa_person_tab-werks = t_0001-werks.
      wa_person_tab-persg = t_0001-persg.
      wa_person_tab-persk = t_0001-persk.
    wa_person_tab-orgeh = t_0001-orgeh.
      rp_provide_from_last t_0002 ' ' sy-datum sy-datum.        "pa0002
      wa_person_tab-lastname = t_0002-nachn.
      wa_person_tab-firstname = t_0002-vorna.
      wa_person_tab-perid = t_0002-perid.
      rp_provide_from_last t_0315 ' ' sy-datum sy-datum.        "pa0315
      wa_person_tab-lifnr = t_0315-lifnr.
      wa_person_tab-kostl = t_0315-kostl.
      wa_person_tab-yytariff_code = t_0315-yytariff_code.
      wa_person_tab-yytariff_total = t_0315-yytariff_total.
      wa_person_tab-yywaers = t_0315-yywaers.
      APPEND wa_person_tab TO person_tab.
      CLEAR wa_person_tab.
    IF person_tab[] IS NOT INITIAL.
       SELECT pernr stdaz begda plans  " Employee Numbers & Hours
       FROM pa2010
       INTO (wa_person_tab-pernr, wa_person_tab-stdaz,
             wa_person_tab-begda, wa_person_tab-orgeh)
       FOR ALL ENTRIES IN person_tab
       WHERE pernr = person_tab-pernr
       AND lgart = '9EXT'                        "  Wage Type (salary)
       AND begda GE pn-begda
       AND begda LE pn-endda
       GROUP BY pernr stdaz begda plans.
         IF sy-subrc = 0.
           APPEND wa_person_tab TO person_tab.
           CLEAR wa_person_tab.
         ENDIF.
       ENDSELECT.
    ELSE.
       MESSAGE i023.
       EXIT.
    ENDIF.

    Hi,
    The PNP database selects and filters the PERNRs according to the data selected on the Selection-Screen. If it shows 'no data found', there might not be any PERNR satisfying the conditions given.
    Pls search for the PERNRs in the respective Database tables(PA tables) of the Infotypes for the required selections. If there are soem PERNRs satisfying the conditions, it prog must be filtering the PERNRs in the GET PERNR event. Pls check where is the PERNR ignored in debug mode.
    Thanks,
    Teja.

  • Execute an external java program with Runtime, problem with classpath

    Hi,
    I m calling an external java program by the command:
    Runtime.getRuntime().exec("java -classpath \"library/*\" org.mypackage.TestMainProgram param1 c:/input/files c:/output/files");All my classes are stored in the relative directory "library", and it contains ONLY .jar files. However, I keep getting errors like:
    "java.lang.NoClassDefFoundError: library/antlr/jarCaused by: java.lang.ClassNotFoundException: library.antlr.jar     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)     at java.security.AccessController.doPrivileged(Native Method)     at java.net.URLClassLoader.findClass(URLClassLoader.java:188)     at java.lang.ClassLoader.loadClass(ClassLoader.java:307)     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)     at java.lang.ClassLoader.loadClass(ClassLoader.java:252)     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)Could not find the main class: library/antlr.jar. Program will exit.Exception in thread "main" where "antlr.jar" is a jar file in "library". It is there but still the program keeps complaining it cannot be found. The problem applies to any jars in "library", ie.., if i have "mylib.jar" then it will complain "NoClassDefFoundError: library/mylib/jar".
    Could anyone give some pointers please?
    Many thanks!
    Edited by: 836590 on 14-Feb-2011 09:03

    836590 wrote:
    Hi,
    I m calling an external java program by the command:
    Runtime.getRuntime().exec("java -classpath \"library/*\" org.mypackage.TestMainProgram param1 c:/input/files c:/output/files");All my classes are stored in the relative directory "library", and it contains ONLY .jar files. However, I keep getting errors like:
    "java.lang.NoClassDefFoundError: library/antlr/jarCaused by: java.lang.ClassNotFoundException: library.antlr.jar     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)     at java.security.AccessController.doPrivileged(Native Method)     at java.net.URLClassLoader.findClass(URLClassLoader.java:188)     at java.lang.ClassLoader.loadClass(ClassLoader.java:307)     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)     at java.lang.ClassLoader.loadClass(ClassLoader.java:252)     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)Could not find the main class: library/antlr.jar. Program will exit.Exception in thread "main" where "antlr.jar" is a jar file in "library". It is there but still the program keeps complaining it cannot be found. The problem applies to any jars in "library", ie.., if i have "mylib.jar" then it will complain "NoClassDefFoundError: library/mylib/jar".
    Could anyone give some pointers please?
    Many thanks!
    Edited by: 836590 on 14-Feb-2011 09:03First, if you run from the command line
    java -classpath "library/*" org.mypackage.TestMainProgram param1 c:/input/files c:/output/filesfrom the parent directory of library, does it work?
    Despite what I said to Kayaman about Runtime.exec not expanding the asterisk, it looks like that's what's happening, so that you're getting
    java -claspath library/aaaa_something_before_antlr.jar library/antlr.jar library/bbb.jar library/ccc.jar  org.mypackage.TestMainProgram param1 c:/input/files c:/output/filesThat is, it *is* expanding the asterisk to a list of files in the directory, and the first one is being taken as the classpath, and the second one--library/antlr.jar is being taken as the class to execute. I'm certain this doesn't happen on Linux, so it must be a Windows thing.
    Two suggestions:
    1) Try single quotes instead of double.
    2) Try the exec that takes an array
    Runtime.getRuntime().exec(new String[] {"java", "-classpath", "'library/*'", "org.mypackage.TestMainProgram", "param1", "c:/input/files", "c:/output/files");Edited by: jverd on Feb 14, 2011 9:41 AM

  • Runtime problem in custom program

    I have created a program awhile back that calculates the sales tax and total price for a product. I successfully compiled and ran the terminal version, but due to some problems, I decided to make a GI version. However, I'm having problems. After what felt like many trials and error, I finally got it to compile and show the window but after typing in the info to test my program, the dialog box will not show up with the results. here is the code I put into the program.
    import javax.swing.*;
    import java.text.*;
    import java.awt.*;
    import java.lang.*;
    import java.awt.event.*;
    class SwingWindow extends JFrame
              JLabel messageLabel;
              JLabel messageLabel2;
              JTextField num1;
              JTextField num2;
              JButton calcButton;
              JPanel panel;
         public SwingWindow()
              super("Sales Tax calculator");
              setSize(400, 150);
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              messageLabel = new JLabel("Enter your sales tax rate:");
              num1 = new JTextField(10);
              messageLabel2 = new JLabel("Enter the listed price of the product:");
              num2 = new JTextField(10);
              calcButton = new JButton("Calculate");
              calcButton.addActionListener(new CalcButtonListener());
              panel = new JPanel();
              panel.add(messageLabel);
              panel.add(num1);
              panel.add(messageLabel2);
              panel.add(num2);
              panel.add(calcButton);
              setVisible(true);
              Container contentArea = getContentPane();
              contentArea.setBackground(Color.white);
              contentArea.add(panel);
              setContentPane(contentArea);
         private class CalcButtonListener implements ActionListener
              public void actionPerformed(ActionEvent e)
                   NumberFormat cf = NumberFormat.getCurrencyInstance();
                   String str1;
                   String str2;
                   float rate;
                   float total;
                   str1 = num1.getText();
                   str2 = num2.getText();
                   rate = Float.parseFloat(str1) * Float.parseFloat(str2);
                   total = rate + Float.parseFloat(str2);
                   JOptionPane.showMessageDialog(null, cf.format(str2) + "is the listed price and" + str1 + "is your sales tax rate and" + cf.format(rate) + "is the sales tax for the product and" + cf.format(total) + "is the overall cost for the product.");
    public class Salestax
         public static void main(String[] args)
              SwingWindow Salestax = new SwingWindow();
    }What can I do or need to do to make that dialog box appear when the Calculate button is clicked? I looked at a tutorial on frames from Sun, but I had troubles compiling afterwards. I'm using Java version 6, if that helps any.
    Edited by: gotenks05 on Sep 18, 2008 11:54 AM

    Hello, I'm the one who posted this thread this is just a different name because I could not figure out how to get back under the name I posted as. I know that when compiling being syntax error free does not guarantee an error free runtime, but nobody can run a program if it is not or cannot be compiled. This is why I need help. I want the dialog box to appear and the code to be syntax error free. When I ran the program from terminal, I got the following:
    Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Cannot format given Object as a Number     at java.text.DecimalFormat.format(DecimalFormat.java:487)
         at java.text.Format.format(Format.java:140)
         at SwingWindow$CalcButtonListener.actionPerformed(Salestax.java:51)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.Component.processMouseEvent(Component.java:6126)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
         at java.awt.Component.processEvent(Component.java:5891)
         at java.awt.Container.processEvent(Container.java:2102)
         at java.awt.Component.dispatchEventImpl(Component.java:4497)
         at java.awt.Container.dispatchEventImpl(Container.java:2160)
         at java.awt.Component.dispatchEvent(Component.java:4327)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4366)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4030)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3960)
         at java.awt.Container.dispatchEventImpl(Container.java:2146)
         at java.awt.Window.dispatchEventImpl(Window.java:2440)
         at java.awt.Component.dispatchEvent(Component.java:4327)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:300)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:210)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:200)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:195)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:187)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)>
    I know there is something that needs to be done with the source, but I don't what it is, especially since I did not get this problem when I compiled the text based version.
    update: I got the dialog box to show, but I want the numbers in currency format.
    update 2: I finally got the result I wanted, with a bit of tweaking thanks for the help so far given. I just made another variable to show the number as a float, then used cf.format for currency.
    Edited by: realgotenks05 on Sep 18, 2008 1:55 PM
    Edited by: realgotenks05 on Sep 18, 2008 2:10 PM

  • Runtime problem , please help,

    public class execInput {
    public static void main(String Argv[]) {
    try {
    String output;
    String[] cmd ={"c:\\xpdf\\pdftotext.exe", "c:\\pdfFile\\dispatching.pdf"};
    Process pr = Runtime.getRuntime().exec(cmd);
    }catch (IOException e) {
    System.exit(0);
    Above program is run in Ms-DOS : c�F\xpdf\pdftotext.exe
    no problem. But I ran it in Java, compiles is fine.
    when I run it. it let me press any key to continue.
    and a GUI apper to tell me an error:
    16bit MS-DOS subsystem
    C�F\WINDOWS\system32\ntvdm.exe
    Error while setting up environment for the application
    choose "close" to terminate the application.
    Please help me solve it, I hava tried on different machine and I re-install the WinXP system, but the problem still appears,
    many many Thanks!

    Cross posted. All posts:
    http://forum.java.sun.com/thread.jspa?threadID=664225&messageID=3890448#3890448
    http://forum.java.sun.com/thread.jspa?threadID=664226&messageID=3890449#3890449
    http://forum.java.sun.com/thread.jspa?threadID=664227&messageID=3890450#3890450
    http://forum.java.sun.com/thread.jspa?threadID=664228&messageID=3890452#3890452
    http://forum.java.sun.com/thread.jspa?threadID=664229&messageID=3890453#3890453

  • Java runtime problem Internet Sales

    I am getting a runtime error in the SAP Internet Sales Shop Management tool when I try to create a new shop. I am quite sure my problem is java related because the SAP generated webform fails too fast. There doesn't seem to be any time for abap processing.
    Has anyone experienced this before. How can I find out where the problem is?
    Thanks very much,

    Hi Pankaj,
    you can try with the first patch of the SP 9 - for example try the file ISAWAC40SP09_0-10002109.SAR. Extract the file using the sapcar program and search for docs.sar file where the documents are.
    I hope this will help you.
    Regards
    Borislav

  • Compiling with debug and runtime performance degradation

    Just a quick question: Does including debug information in class files degrade runtime performance in any way?
    Thanks!

    Quick answer: it depends on what your application does.
    Mostly, it shouldn't matter but you should always profile and time your
    application to find the truth.

  • Debugging JNLP security problems

    As we all know, the latest Java update changed the JNLP security around a bit, and I, like many others, am having trouble with it.
    I'm not really here to ask for help with my specific problem, however. It's not the first time I've had trouble with JNLP security, and almost every time, I've only gotten around it with the help of mere guess-work and a fair bit of luck, and I'm still far from sure I've actually solved the problems correctly. The main problem I experience is that the security messages I get from the JNLP client are oriented towards end-users and thus not very helpful at all for tracking down the root cause of the issues. For instance, after this latest update, the JNLP client is just telling me that "The Java security settings have prevented this application from running. You may change this behavior in the Java Control Panel."
    Is there any good way to find out what security problems it is that I'm actually having? "Read the documentation" is of course the easy answer, but the security model seems rather complex and incorporates many parts. Is there some kind of "lint" tool for JNLP out there that can list the problems I'm having? Or is there some way to run the JNLP client in some kind of debug mode?

    Understood guys. But let me make a few points.
    1. Clearly I'm not the only one who had this problem. In fact, I wasn't the first person in this THREAD to have the problem.
    2. I'm fairly computer savvy, and have worked with Photoshop for several years.
    3. Yes, it does say c: in point 3, but I find it odd that in point 4 it does say Program Files/.... A very strange way to write it. Also, the c: drive is the default installation drive, so it's not idiocy for someone to assume that the file would be located on the same drive as you selected for installation.
    4. This is not about technically right or wrong. I never said that the instructions were wrong. I merely was trying to make a suggestion that would help people avoid the same trap I fell into. Was it my mistake? Yes. Would my clarifying suggestion perhaps help others avoid making the mistake I did. I would hope so. Also, as someone else suggested in this thread, Adobe SHOULD have written an installation program for the ACR 3.1 upgrade that did the placing automatically. After all, EVERYONE knew that ACR3.1 would be released shortly after the release for CS2...in fact Mr. Knoll himself was quoted in other forums about when D2X compatibility would actually happen.
    5. The purpose of these forums is to be helpful to other users--not to be patronizing or rude. I'm a big Photoshop fan, and a loyal customer. I'm also in the service industry, and I would bet that customer service experts would raise an eyebrow or two about the tone contained in certain messages in this thread, including from an Adobe employee.
    Just my two cents. Flame away if you must. But you might want to take a look at what I actually suggested in my last message before lighting up the torch.

Maybe you are looking for

  • Buying an external hard drive

    I just learned that memory and hard disk capacity are not the same thing. Anyway, since I've just increased my memory from 2 to 4 GB, while since my computer is now telling me that my "Starter Drive?" is full, I've decided to buy an external hard dri

  • Need to create a block based on procedure

    We can create a block based on procedure...but whats the need to do so...please can anybody explain.

  • Claim digger not working on P6 v7 SP1

    I have used claim digger fairly regularly but suddenly has stopped working. Ever since I upgraded to v7 SP1 It has not worked. Anyone else had this problem Regards

  • No icons in New Project at start-up

    When I start GB 09, there are no icons listed as far as starting a new project. I saw them when I first installed GB, but just reinstalled after a complete OS reinstall. Anyone else have this issue?

  • Sales process- questions

    Hi SAP Prof, Iam a fresher and joined in SAP Company. and we r dealing with power batteries , The client is sells the batteries to other customers , for govt bodies, export sales, OEM Sales r there. My question is that I want a list of questions on t