Profile native code that JAVA application runs

our application is suffers from a severe memory leak. the application runs on Weblogic that uses the severe container and access Oracle DB.
the JAVA heap was monitored for several weeks (using the verbose gc flag) and no leak was discovered. we monitored the native heap (by using the pmap command) and we saw that the heap size increasing. therefor we think the problem is in the native code that runs in this process (the major suspect is the OCI, Oracle client).
after reading the man page of collect and your Article (Profiling Java Appl with Sun Studio 11) I'm confused. I would like to monitor the native heap (with -H option) but in the man page it's written that "Heap profiling is not supported for java programs" so i wheni set the flag -j off i got a warning that this process is java and i might use the -j on.
please advice what are the values of the flags -j an -H in case of i need to monitor the native code of java application.
thanks
yahav

thanks again for the additional article about the Weblogic.
in the startManaged script I added the following prefix:
collect -H on -j off -d /tmp/ java...
when i typed leaks on er_print, i got a list of possible leaks and allocs.
some activities were made on the application so i assume that data should be collected. as the size of the experiment folder slightly increased.
so far we can assume that the data that is relegated to the non java process was collected.
when i typed leaks again within the er_print tool i got the same results.
it means that no native heap activities was made.
is it correct analysis?
regards the leak that was discovered above, how one can identify the function that cause this leak. i can see calls like:
malloc, ReadKnownVMs, CreateExecutionEnvironment. this functions relate to the JVM. i would expect to see some trace (allocs) regards the other native code that runs such as the Oracle OCI client.
I'm suspecting i'm collecting this info.
is there any other flags to set for such collection? or any other commands in the analysis command

Similar Messages

  • Calling Customer code in java application

    Hi,
    in my java application running on WAS 6.40 I want to call some customer code.
    Basically I create a data structure (DOM XML tree) and want to pass this to customer code to be able to modify it as needed.
    My idea would be to define an interface which would than be implemented by customer java classes. But how do I load these classes?
    In theory I would create a configuration table in my app where the customer would specify the classname of his classes implementing this interface and I would do a Class.forName("...")
    But those classes will be unknown to my application'S classloader, right? Because they won't be deployed with my application and I can't have references as I do not know if and what the customer will deploy. What's the best approach to this? WOuld EJBs help better?
    Thanks
    Bruno

    Hi Bruno,
    We did this for our application.  We needed a weak reference from our deployable DC to a specific DC (e.g. DC\customerExit)  The customer then creates this DC and adds their classes to it.  Since it is a weak reference,  it does not need to exist for your application to work. You can use the customizing to be able to lookup the specific class name that they created. 
    hope this helps,
    Rich

  • Can u tell some  source codes of java application

    can u tell some source codes of java application?
    i want to get some source codes .such as a proxy source code .
    any help will be appreciated.

    hi
    check www.rgagnon.com for more source code in java.
    regards
    Pradheep

  • Integrating java application running on OC4J server with EP Iview

    Hi,
         I Want to Integrate Java Application running on OC4J server with my Enterprise portal
    Can any one please help me out in this??
    Regards
    Padma N

    Hi Padma
    Its possible to integrate a java application running in the other server with enterprise portal.In portal i think there is a IView template call Java application template.Using this generally we can do this.But in you case what type of a java application is it?Just a class or webapplication or a server side application.This you can also acheive using a webdynpro applications as these are very flexible with integration into EP.In webdynpro you can use suspend and resume plugs to navigate from one application to other application.I have given my ideas how to implement.But integration mainly depends upon your landscape and version compatibilities and type of the application you need to integrate.
    Hope this answer helps you in implementation.
    Regards
    Kalyan

  • How to run 64-bit native code with Java Web Start

    This question has probably been asked many times, but I couldn't find anything in my searches.
    How can I get Java Web Start on a Solaris client (Solaris 10 in this case, with JRE 1.5) to run a java application that includes a 64-bit native code library? The application downloads fine, including the jar file that has the native shared object, but when the native library is loaded by the java application, I get a "wrong ELF class: ELFCLASS64" error.
    I assume that is because Web Start is invoking the 32-bit java VM, which can't load a 64-bit library. I tried configuring Java Web Start to use the 64-bit VM (by setting the path to java to ".../jre/bin/sparcv9/java" in the javaws console) but then I get an error that says "Can't load library: .../jre/lib/sparcv9/libdeploy.so".
    Does Java Web Start support 64-bit native code, and if so, what do I need to do differently?
    Thanks.

    No it can't. On the Sun download page of the JRE it says that 64 Bit systems need to use the 32 Bit JRE to execute Plugins - this might be the same for Web Start apps.

  • Make native code and Java VM interact

    Hi all,
    I am building a native components (Delphi and C++) using JNI.
    Currently my components involve a Java GUI.
    It loads the JVM, then request for that Java Object GUI.
    When the interface is created, I need to get back information
    from what the user can type in.
    However, the native code doesn't wait. It runs and continues right after
    the creation of the GUI, thus causing me trouble (trying to get
    null objects).
    Is there a way to make the native code wait for a java command from
    the interface, or is there a way to make both part of the component
    (java / native) to communicate and interact ?
    Any help would be appreciated.
    Thanks
    Regards,
    Florent

    There are quite a few options here, and this may not
    be the best, per se, but you could make a blocking
    call from the JNI to a Java method. That Java method
    will only return after whatever you want done in the
    interface has completed.Thanks for your reply. Is there other solution in the JNI itself,
    using the JNIEnv Object ?
    Else, I'll try to use that solution.
    Regards,
    Florent

  • Pass return code from Java application to a .bat file.

    I have a .bat file which will execute a Java application. I want to pass the return code from the java application to the ".bat" file.
    Could you please let me know, how can I accomplish this.

    I tried that, but it doesn't return the value...
    In my Java app, I had System.exit(returnCode) and in the '.bat' file
    I have
    @echo off
    java <myApp>
    set returnCd=%?%
    echo %returnCd
    and it didn't return any value. What should I specify in set returnCd=%?% instead of ?

  • Can Web dynpro Java application run as background application

    Hi Experts,
    Is it possible to execute the Web dynpro java application in background without opening the application in a web browser.
    We just want the WD java application deployed on the SAP Web AS server to be invoked and get executed as a background application by some external web application. It should not get open at any point of time in a web browser.
    Can anyone suggest if it is possible?
    Thanks & Regards,
    Anurag

    Hi Anurag,
    Since Web Dynpro is "SAPu2019s standard UI technology based on MVC for developing user interfaces" (see http://www.sdn.sap.com/irj/sdn/nw-wdjava) it is by design not possible to run 'in the background'.
    There are other possibilities to develop server processes per your requirements, such as developing web services or servlet development.
    Web services are the de facto standard for executing business logic on a remote server. However, as I understand your external web application is not capable of sending web service requests, have you tried the servlet approach?
    See http://help.sap.com/saphelp_nwce711core/helpdata/en/3f/f8bc3d8af79633e10000000a11405a/frameset.htm for more info on how to develop a servlet using NWDS.
    Take particular attention to the sub-topic 'Servicing Client Requests' of the above guide
    Hope this helps!
    Best regards,
    Robin van het Hof

  • Can J2ME or Java application run on Pocket PC?

    Hi everyone,
    I got myself recently an iPAQ, I was wondering whether I can develop Java applications on my PC and run it on my iPAQ for usage?
    What's needed and the procedure to implement this?
    Thanks.
    regards,
    Aldrick

    You can create J2ME applications in some IDE like Websphere Device Developer. Then you need to configure j9 on your PocketPC and build and run the application on the device. All these steps can be done easily in Websphere Device Developer (WSDD)
    atikku

  • Java application running non-Java programs

    Greetings,
    I'd like to have an application start up another non-Java application. How do I do this? For example, how would I execute the following commands from a java application?
    Unix: "ls > /tmp/ls.dat"
    NT: "dir > c:\temp\dir.dat"
    TIA,
    --Paul Galvin

    You can use Runtime.exec. You'll have to do the redirection manually, by getting the Process from the exec method, opening the output stream, and writing the results to the file you want to redirect the output to. See the many posts on Runtime.exec in this and other forums.

  • Java Applications runs on Mobile

    Dear Digital Dreamers
    I would like to know how to load Simple Java Applciations in Mobile. S0 that it runs in Mobile.

    hi!,
    First you have to go through these link which is given by sun.
    http://developers.sun.com/techtopics/mobility/getstart/
    and for this
    http://developers.sun.com/techtopics/mobility/midp/articles/wtoolkit/
    here you get the code of HelloMIDlet class follow the instruction they said in document.
    in j2me wireless toolkit there is option : project -> run via ota .you have click on this after build your app. It makes a html ,jad , jar and manifest file in bin directory of you app package.now you have to change/edit the html file where the full path is written like link
    connect your mobile through data cable and copy the bin folder in you mobile and open the html file in browser.it ask to click on link after that it install the application.
    bye

  • How can I view native code in Java?

    I am trying to write a program to find the log of a number. I looked for Java's implementation in Math.log(x), but it is a native method. How can I see the code in the other language(C or C++)? I have looked at JNI, but i don't think it is what i need. Any Ideas??

    Before the Mustang release, i don't believe sun
    released the source code to the native binaries.Actually, I'm pretty sure they did, but I don't know off the top of my head where to get it. You'd have to search.

  • My java application runs quite slowly.

    My application is just for creating a data structure(like map<double,link<Object>>) and then search in the it and delete some element or add some,
    the application reads data from a file, and every 5000 lines, it will compute once, and here is the finish time of each roll:(ms)
    94
    187
    234
    297
    344
    11828
    22354
    32761
    obviously, after five rolls, the application becomes slower, and after that keep going in the slow speed.
    in each roll the overhead of computing should be the same
    I just do not get the idea why it becomes slow.

    private BuyBook buyBook = new BuyBook();
         private SellBook sellBook = new SellBook();
         TreeMap<Double,ArrayList<IOrderEntity>>tmpSellBook;
         IOrderEntity tmpSellOE;
         IOrderEntity tmpBuyOE ;
         IOrderEntity tmp;
         Double buyPrice;
         Double sellPrice;
         ReversedTreeMap<Double,ArrayList<IOrderEntity>>tmpBuyBook;
         Iterator it1;
         Iterator it2;
    public /*synchronized*/ void synchronizeBooks(IOrder o){
                   if(o.getType()==1){
                        if(((LimitOrderEntity)o).isBuy()){
                             getBuyBook().sync((LimitOrderEntity)o);
                        }else{
                             getSellBook().sync((LimitOrderEntity)o);
                   }else if(o.getType()==3){
                        getSellBook().update((CancelLimitOrderEntity)o);
                        getBuyBook().update((CancelLimitOrderEntity)o);
                   }else{
                        println("illegal param"+o);
    public void exchange(IOrderEntity order) {
              if(order.getType()==2){
                   while(order!=null){
                        if(order.isBuy()){
                             sellPrice = findProperOrderInSell(order);
                             if(sellPrice.isNaN()||getSellBook().getSellList().get(order.getSymbol()).isEmpty())
                                  return;
                             tmpSellBook = getSellBook().getSellList().get(order.getSymbol());
                             tmpSellOE = (IOrderEntity)tmpSellBook.get(sellPrice).get(0)/*firstEntry().getValue()*/;
                             if(order.getQuantity().intValue()>tmpSellOE.getQuantity().intValue()){
                                  order.setQuantity(order.getQuantity()-tmpSellOE.getQuantity());
                                  println("transaction of "+order.getSymbol()+" :"+order.getOrderId()+" with "+tmpSellOE.getOrderId()+" on "+tmpSellOE.getQuantity()+" shares at price "+tmpSellOE.getPrice());
                                  it1 = tmpSellBook.get(sellPrice).iterator();
                                  if(it1.hasNext()/*&&it1.next()!=null*/){
                                       it1.next();
                                       it1.remove();
                                       if(tmpSellBook.get(sellPrice).isEmpty()){
                                            Iterator it2 = tmpSellBook.entrySet().iterator();
                                            it2.next();
                                            it2.remove();
                             }else if(order.getQuantity().intValue()==tmpSellOE.getQuantity().intValue()){
                                  //order.setQuantity(order.getQuantity()-tmpSellOE.getQuantity());
                                  println("transaction of "+order.getSymbol()+" :"+order.getOrderId()+" with "+tmpSellOE.getOrderId()+" on "+tmpSellOE.getQuantity()+" shares at price "+tmpSellOE.getPrice());
                                  it1 = tmpSellBook.get(sellPrice).iterator();
                                  if(it1.hasNext()/*&&it1.next()!=null*/){
                                       it1.next();
                                       it1.remove();
                                       if(tmpSellBook.get(sellPrice).isEmpty()){
                                            it2 = tmpSellBook.entrySet().iterator();
                                            it2.next();
                                            it2.remove();
                                  return;
                             }else{
                                  println("transaction of "+order.getSymbol()+" :"+order.getOrderId()+" with "+tmpSellOE.getOrderId()+" on "+order.getQuantity()+" shares at price "+tmpSellOE.getPrice());
                                  tmp = tmpSellBook.get(sellPrice).get(0);
                                  tmp.setQuantity(tmpSellBook.get(sellPrice).get(0).getQuantity()-order.getQuantity());
                                  /*tmp.setTime(order.getTime());
                                  Iterator it1 = tmpSellBook.get(sellPrice).iterator();
                                  if(it1.hasNext()&&it1.next()!=null){
                                       it1.next();
                                       it1.remove();
                                       if(tmpSellBook.get(sellPrice).isEmpty()){
                                            Iterator it2 = tmpSellBook.entrySet().iterator();
                                            it2.next();
                                            it2.remove();
                                  synchronizeBooks(tmp);*/
                                  return;
                        }else{
                             buyPrice = findProperOrderInBuy(order);
                             if(buyPrice.isNaN()||getBuyBook().getBuyList().get(order.getSymbol()).isEmpty())
                                  return;
                             tmpBuyBook = getBuyBook().getBuyList().get(order.getSymbol());
                             tmpBuyOE = (IOrderEntity)tmpBuyBook.get(buyPrice).get(0)/*firstEntry().getValue()*/;
                             if(order.getQuantity().intValue()>tmpBuyOE.getQuantity().intValue()){
                                  order.setQuantity(order.getQuantity()-tmpBuyOE.getQuantity());
                                  println("transaction of "+order.getSymbol()+" :"+order.getOrderId()+" with "+tmpBuyOE.getOrderId()+" on "+tmpBuyOE.getQuantity()+" shares at price "+tmpBuyOE.getPrice());
                                  it1 = tmpBuyBook.get(buyPrice).iterator();
                                  if(it1.hasNext()/*&&it1.next()!=null*/){
                                       it1.next();
                                       it1.remove();
                                       if(tmpBuyBook.get(buyPrice).isEmpty()){
                                            it2 = tmpBuyBook.entrySet().iterator();
                                            it2.next();
                                            it2.remove();
                             }else if(order.getQuantity().intValue()==tmpBuyOE.getQuantity().intValue()){
                                  //order.setQuantity(order.getQuantity()-tmpSellOE.getQuantity());
                                  println("transaction of "+order.getSymbol()+" :"+order.getOrderId()+" with "+tmpBuyOE.getOrderId()+" on "+tmpBuyOE.getQuantity()+" shares at price "+tmpBuyOE.getPrice());
                                  it1 = tmpBuyBook.get(buyPrice).iterator();
                                  if(it1.hasNext()/*&&it1.next()!=null*/){
                                       it1.next();
                                       it1.remove();
                                       if(tmpBuyBook.get(buyPrice).isEmpty()){
                                            it2 = tmpBuyBook.entrySet().iterator();
                                            it2.next();
                                            it2.remove();
                                  return;
                             }else{
                                  println("transaction of "+order.getSymbol()+" :"+order.getOrderId()+" with "+tmpBuyOE.getOrderId()+" on "+order.getQuantity()+" shares at price "+tmpBuyOE.getPrice());
                                  tmp = tmpBuyBook.get(buyPrice).get(0);
                                  tmp.setQuantity(tmpBuyBook.get(buyPrice).get(0).getQuantity()-order.getQuantity());
                                  /*tmp.setTime(order.getTime());
                                  Iterator it1 = tmpBuyBook.get(buyPrice).iterator();
                                  if(it1.hasNext()&&it1.next()!=null){
                                       it1.next();
                                       it1.remove();
                                       if(tmpBuyBook.get(buyPrice).isEmpty()){
                                            Iterator it2 = tmpBuyBook.entrySet().iterator();
                                            it2.next();
                                            it2.remove();
                                  synchronizeBooks(tmp);*/
                                  return;
    public Double findProperOrderInBuy(IOrderEntity order){
              if(getBuyBook().getBuyList()!=null&&!getBuyBook().getBuyList().isEmpty()){
                   tmpBuyBook = getBuyBook().getBuyList().get(order.getSymbol());
                   if(tmpBuyBook!=null&&!tmpBuyBook.isEmpty()){
                        return tmpBuyBook.firstKey();
              return Double.NaN;
          * find a proper price for a sell order
          * @param order
          * @return the price, if NaN, means no proper price
         public Double findProperOrderInSell(IOrderEntity order){
              if(getSellBook().getSellList()!=null&&!getSellBook().getSellList().isEmpty()){
                   tmpSellBook = getSellBook().getSellList().get(order.getSymbol());
                   if(tmpSellBook!=null&&!tmpSellBook.isEmpty()){
                        return tmpSellBook.firstKey();
              return Double.NaN;
    .......this is buybook
    private Map<String,ReversedTreeMap<Double,ArrayList<IOrderEntity>>> buyList =
              new HashMap<String,ReversedTreeMap<Double,ArrayList<IOrderEntity>>>();
         Iterator it1;Object test1;Iterator it2;Object test2;Iterator it3;Object test3;IOrderEntity tmp;
          * get the buybook in a map
          * @return the map
         public Map<String,ReversedTreeMap<Double,ArrayList<IOrderEntity>>> getBuyList() {
              return buyList;
          * set the buybook
          * @param buyList
         public void setBuyList(Map<String,ReversedTreeMap<Double,ArrayList<IOrderEntity>>> buyList) {
              this.buyList = buyList;
          * synchronize the list with a list of IOrderEntity
          * @param loe: the list
         public void sync(List<IOrderEntity> loe){
              for(IOrderEntity x:loe){
                   sync(x);
          * synchronize the with an IOrderEntity object
          * @param x the IOrderEntity
         public void sync(IOrderEntity x){
              if(x.getSymbol()!=null&&x.getQuantity()>0&&x.getTime()>=0){
                   //if the entity is well-formated
                   if(getBuyList().containsKey(x.getSymbol())){
                        //if the symbol exist in list already
                        if(getBuyList().get(x.getSymbol()).containsKey(x.getPrice())){
                             //if the price has been there
                             getBuyList().get(x.getSymbol()).get(x.getPrice()).add(/*put(x.getTime(), */x);
                        }else{
                             //else the price is new
                             ArrayList<IOrderEntity> tmpTreeMap1 = new ArrayList<IOrderEntity>();
                             tmpTreeMap1.clear();
                             tmpTreeMap1.add(/*put(x.getTime(), */x);
                             getBuyList().get(x.getSymbol()).put(x.getPrice(), tmpTreeMap1);
                   else{
                        ReversedTreeMap<Double,ArrayList<IOrderEntity>> tmpTreeMap2 = new ReversedTreeMap<Double,ArrayList<IOrderEntity>>();
                        //else the symbol is new
                        ArrayList<IOrderEntity> tmpTreeMap1 = new ArrayList<IOrderEntity>();
                        tmpTreeMap2.clear();
                        tmpTreeMap1.clear();
                        tmpTreeMap1.add(/*put(x.getTime(), */x);
                        tmpTreeMap2.put(x.getPrice(), tmpTreeMap1);
                        getBuyList().put(x.getSymbol(), tmpTreeMap2);
          * update the book with a cancelListmitorderenetity
          * @param cloe:cancellimitorderentity
         public void update(CancelLimitOrderEntity cloe){
              it1 = getBuyList().entrySet().iterator();
              test1 = null;
              while(it1.hasNext()&&(test1 = it1.next())!=null){
                   it2 = ((Map.Entry<String,ReversedTreeMap<Double,ArrayList<IOrderEntity>>>)test1).getValue().entrySet().iterator();
                   test2 = null;
                   while(it2.hasNext()&&(test2 = it2.next())!=null){
                        it3 = ((Map.Entry<Double,ArrayList<IOrderEntity>>)test2).getValue().iterator();
                        test3 = null;
                        while(it3.hasNext()&&(test3 = it3.next())!=null){
                             tmp = ((IOrderEntity)test3);
                             if(cloe.getOrderId().equals(tmp.getOrderId())){
                                  if(cloe.getQuantity().intValue()<tmp.getQuantity().intValue()){
                                       tmp.setQuantity(tmp.getQuantity()-cloe.getQuantity());
                                       tmp.setTime(cloe.getTime());
                                       //delete
                                       it3.remove();
                                       //add
                                       ((Map.Entry<Double,ArrayList<IOrderEntity>>)test2).getValue().add(tmp);
                                       return;
                                  }else if(cloe.getQuantity().intValue() == tmp.getQuantity().intValue()){
                                       it3.remove();
                                       if(((Map.Entry<Double,ArrayList<IOrderEntity>>)test2).getValue().isEmpty()){
                                            it2.remove();
                                            if(((Map.Entry<String,ReversedTreeMap<Double,ArrayList<IOrderEntity>>>)test1).getValue().isEmpty()){
                                                 it1.remove();
                                       return;
                                  }else{
                                       //System.out.println(cloe.getOrderId()+":cancel quantity>current quantity.");
                                       return;
    ....and this is sell book
    private Map<String,TreeMap<Double,ArrayList<IOrderEntity>>> sellList =
              new HashMap<String,TreeMap<Double,ArrayList<IOrderEntity>>>();
         Iterator it1;Object test1;Iterator it2;Object test2;Iterator it3;Object test3;IOrderEntity tmp;
          * get the buybook in a map
          * @return the map
         public Map<String,TreeMap<Double,ArrayList<IOrderEntity>>> getSellList() {
              return sellList;
          * set the buybook
          * @param buyList
         public void setSellList(Map<String,TreeMap<Double,ArrayList<IOrderEntity>>> sellList) {
              this.sellList = sellList;
          * synchronize the list with a list of IOrderEntity
          * @param loe: the list
         public void sync(List<IOrderEntity> loe){
              for(IOrderEntity x:loe){
                   sync(x);
          * synchronize the with an IOrderEntity object
          * @param x the IOrderEntity
         public void sync(IOrderEntity x){
              ArrayList<IOrderEntity> tmpTreeMap1 = new ArrayList<IOrderEntity>();
              TreeMap<Double,ArrayList<IOrderEntity>> tmpTreeMap2 = new TreeMap<Double,ArrayList<IOrderEntity>>();
              if(x.getSymbol()!=null&&x.getQuantity()>0&&x.getTime()>=0){
                   //if the entity is well-formated
                   if(getSellList().containsKey(x.getSymbol())){
                        //if the symbol exist in list already
                        if(getSellList().get(x.getSymbol()).containsKey(x.getPrice())){
                             //if the price has been there
                             getSellList().get(x.getSymbol()).get(x.getPrice()).add(/*put(x.getTime(), */x);
                        }else{
                             //else the price is new
                             tmpTreeMap1.clear();
                             tmpTreeMap1.add(/*put(x.getTime(), */x);
                             getSellList().get(x.getSymbol()).put(x.getPrice(), tmpTreeMap1);
                   else{
                        //else the symbol is new
                        tmpTreeMap2.clear();
                        tmpTreeMap1.clear();
                        tmpTreeMap1.add(/*put(x.getTime(), */x);
                        tmpTreeMap2.put(x.getPrice(), tmpTreeMap1);
                        getSellList().put(x.getSymbol(), tmpTreeMap2);
          * update the book with a cancelListmitorderenetity
          * @param cloe:cancellimitorderentity
         public void update(CancelLimitOrderEntity cloe){
              it1 = getSellList().entrySet().iterator();
              test1 = null;
              while(it1.hasNext()&&(test1 = it1.next())!=null){
                   it2 = ((Map.Entry<String,TreeMap<Double,ArrayList<IOrderEntity>>>)test1).getValue().entrySet().iterator();
                   test2 = null;
                   while(it2.hasNext()&&(test2 = it2.next())!=null){
                        it3 = ((Map.Entry<Double,ArrayList<IOrderEntity>>)test2).getValue()./*entrySet().*/iterator();
                        test3 = null;
                        while(it3.hasNext()&&(test3 = it3.next())!=null){
                             tmp = ((/*Map.Entry<Long, */IOrderEntity/*>*/)test3)/*.getValue()*/;
                             if(cloe.getOrderId().equals(tmp.getOrderId())){
                                  if(cloe.getQuantity().intValue()<tmp.getQuantity().intValue()){
                                       tmp.setQuantity(tmp.getQuantity()-cloe.getQuantity());
                                       tmp.setTime(cloe.getTime());
                                       //delete
                                       it3.remove();
                                       //add
                                       ((Map.Entry<Double,ArrayList<IOrderEntity>>)test2).getValue().add(tmp);
                                       return;
                                  }else if(cloe.getQuantity().intValue() == tmp.getQuantity().intValue()){
                                       it3.remove();
                                       if(((Map.Entry<Double,ArrayList<IOrderEntity>>)test2).getValue().isEmpty()){
                                            it2.remove();
                                            if(((Map.Entry<String,TreeMap<Double,ArrayList<IOrderEntity>>>)test1).getValue().isEmpty()){
                                                 it1.remove();
                                       return;
                                  }else{
                                       //System.out.println(cloe.getOrderId()+": cancel quantity>current quantity.");
                                       return;
         }here is how the application start
    AbstractExchangeDelegate ed3 = new ExchangeDelegate("largetest");
                   input = zipFile.getInputStream(entry);
                   IStockDataSource sdsd1 = new StockDataSourceDelegate(input);
                   if(sdsd1!=null){
                        int counter = 0;
                        //ed.sychronizeBooks(sdsd.getAllOrderEntityAsList(), sdsd.getCancelLimitOrderEntityList());
                        for(IOrder x:sdsd1.getAllOrderEntityAsList()){
                             if(!(x.getType()==2))
                                  ed3.synchronizeBooks(x);
                             else{
                                  ed3.exchange((MarketOrderEntity)x);
                                  counter++;
                        if(counter>5000){
                             System.gc();
                   }

  • Cannot open MSWord while running java application

    Hi everyone
    I'm not sure if anyone has encountered this problem before.. I'm running a java application under Windows NT and when I try to open an office document it won't run until that java application has been shutdown. I don't even get an error message for this. Nothing happens at all until the application is shutdown and then MSWord just opens as if nothing had ever happened.
    Anyone have any ideas as to what this problem might be?

    As a guess.....
    1. Run a "hello world" java application. Use task manager and take a snap shot of the processes window.
    2. Run nothing else but the java application. Use task manager and take a snap shot of the processes window.
    3. Compare the two and eliminate any that are the same.
    4. Run nothing else but word. Use task manager and take a snap shot of the processes window.
    5. Compare it with 3. Note the ones that appear both times.
    6. Run the java application - use task manager to kill what you found in 5. Run word.
    Step 6 will probably cause the java app to fail in some odd way. But now you know why it doesn't work.
    Of course if nothing is the same in 5 above then that would be odd.

  • Run windows services from java application

    can java application run a windows server
    i have a web server that runing using tomcat and mysql
    can i make a icon in the systray
    that give me the option to (using a menu)
    run the server ,wicth means : tomcat and mysql are runing
    stop the server
    get tomcat stacktrace in a window
    i was thinking about runing tomcat and mysql as services
    and write the systray application using java,
    the systray application should acces window services ,
    and run/stop requierd services.
    what happend on a machine thar runs linux?
    thanks
    shay

    Ok .so it's will be a diffrent way under linux..
    for systray i will use http://systray.sourceforge.net/
    and for services i'll use the
    "net start <Service>" and "net stop service"
    i need to keep track on the service status
    so my Systray status will be updated
    what is the command for getting the status of the proccess
    thanks shay

Maybe you are looking for