Seeking Insight on Java GC Intracacies

Hi, I'm a technical QA, and I'm trying to help identify a memory leak in one of our applications. In order to better understand what the memory usage numbers on our system mean, I've been refreshing my knowledge about how the GC and Java memory management work. My question is, when the young generation fills up, will the JVM prefer to expand young memory in to virtual space, or will it prefer to run a minor GC and promote things in to tenured space if there isn't enough space in young memory before expanding in to virtual space?
Any help would be greatly appreciated. Thanks.

Look at the GC whitepaper at http://java.sun.com/j2se/reference/whitepapers/memorymanagement_whitepaper.pdf for a lot of background. That's for JDK-1.6.0, not JDK-1.4.1 but a lot of the principles apply.
In answer to your specific question: in JDK-1.4.1 the young generation is essentially fixed in size. When it fills up, a young generation collection copies all the live objects to either the survivor space or the old generation. In JDK-1.6.0 we can change the size of the eden and the survivor spaces to try to control the pause time and maximize throughput. It's the old generation that starts out small and commits additional virtual address space as needed, up to your maximum (-Xmx). As the old generation grows the young may grow to keep the ratio of young to old approximately constant, but I forget if that was in JDK-1.4.1 or was added later.

Similar Messages

  • Return seek position in Java Media Framework Player

    Im using a simple JPanel Player created with the JMF, but id like to be able to cut sections from the seek (slider) position. Does anyone know if there any way of returning the seconds value as an integer so i can then run it though a cutting class.

    JMF would be using DirectX DLL files from the OS as well. Maybe exe4J needs to be told to include those files as well? Otherwise some path information may need including.

  • Seeking recommendations for Java and servlet tutorials

    I am newbies in Java, except knowing some JavaScripts, JSP for web programming. Currently, I am using PHP, MySQL, Apache, and now I would like extend my skills to Java.
    I visited the java website, it seems to have many different packages and tech for different requirement. What should I learn for web programming? And which database is mostly fit for Java language? Mysql? oracle?

    If you want to do web programming, JSP and JavaScript is a good start. You'll also need to know servlets. Since you are new to Java, you'll also need to learn some of the basic classes. I would start with Sun's Java tutorial and when you have mastered that move on to their J2EE tutorial and focus on the chapters that deal with servlets, jsps and related technologies. The J2EE tutorial will include other topics that you may not want to learn right now.
    All major relational databases can be used with Java. The JDBC api can be used for all of them. There might be some minor differences in how you code you queries but the way you do things is the same regardless of the database.

  • Development of BPX Shared Service Center - Seeking Insight

    We are currently in the midst of our SAP G/L implementation and our current goal is to research into best practices for the duties typically performed within a Business Process Managment Shared Service Center. This information will be referenced as we begin to form our own business model; to attain that same level of maturity and leverage from its benefits as other organizations have successfully done.  Any feedback, expertise, literature/whitepapers will deeply be appreciated. Thx.
    Edited by: rnell80 on May 1, 2009 7:40 PM

    We are currently in the midst of our SAP G/L implementation and our current goal is to research into best practices for the duties typically performed within a Business Process Managment Shared Service Center. This information will be referenced as we begin to form our own business model; to attain that same level of maturity and leverage from its benefits as other organizations have successfully done.  Any feedback, expertise, literature/whitepapers will deeply be appreciated. Thx.
    Edited by: rnell80 on May 1, 2009 7:40 PM

  • Seeking insights regarding connecting SCSI external drive to G4 with OS X

    I have a couple of old external scsi hard drives from pre-OS X days which I need to get some old data from but am unable to access. I currently am running OS X 10.3.9 on a G4. (I also have an old Preforma 6300 and a Power Mac 9600 with OS 8.5 equipped with scsi cards but they will no longer mount the drives to the desk tops - I have tried reinstalling the FWB Hard Disk Tool Kit software ver 2.5 which I used originally to mount the drives but the old Macs keep freezing). The G4 does not have a scsi card installed and even if it did, I doubt I could find a driver for the mount software that would work with 10.3.9 (FWB does not appear to exist any longer). I saw a SCSI to USB converter (MICROTECH DB25 USB to SCSI CABLE CONVERTER)and wondered if that might work. Has anyone had any experience with this converter and do you know if it will work with OS X 10.3.9? Failing that, any other suggestions or guidance? TX!

    Hi Tom. TX for the reply! The IDs are set correctly. Interestingly, on the units with OS 8.5 the system acknowledges that the drive is attached - When FWB Hard Disk Tool Kit is run, it checks the drive, reports no errors and identifies the partitions on the drive. However, when I try to mount it either the Hard Disk Tool Kit program freezes or the the computer freezes in general. I thought that possibly there was an extension conflicting with the mounting software so I tried rebooting with extensions off. This didn't work either.
    I will try SCSI Probe as you suggested.
    Again, TX!
    Rick

  • Enabling Silent Auto-update in Java 7.45 as a non-local administrator user, enterprise best practices?

    So I have been looking through forums, java help, and everywhere possible for more insight on java in an enterprise environment. What I have found so
    far is that there is no actual way to enable auto updates to install as a non-local admin user.
    I know you can turn on and off updates My company wants to install java JRE as a silent-autoupdate "always update" kind of installation, but all my users are domain users, without admin rights. When it finds an update - it prompts for credentials and obviously they are denied. Is this even possible?  If it is not possible to "auto-update" non local admins, I can make the case to management that java releases need to be QA'd and controlled releases. My environment is adminstudio/installshield and SCCM. I know auto-installing updates to java without QA per version , in a enterprise environment, is not good practice, but its not my decision right now.
    thank you very much!

    Hi and thank you very much for responding!
    I'd be interested in further answers:
    Our company is developing unsigned applets ...Why?Sufficient functionality. We dont want to e. g. access the customers local file system, we just wanted to use the applet as viewer sending data to and from the server where the applet was loaded from. Nothing else.
    1. What is the idea to show messages for unsigned applets running in a secure sandbox.. why when running in a sandbox, and why not also for potentially more dangerous signed applets?With a signed applet you know who is taking the responsibility.With unsigned applets, I rely on the sandbox responsibility. I actually couldn't do anything dangerous by accident.
    With signed applets, I'm fully responsible that nothing bad happens to the clients data. Preventing this is the main task for the java sandbox, so why not use it?
    Just to clarify: Is it right that each signed applet has full access rights?
    3. Is there any recommended strategy to sign an applet to work across browsers, platforms, JRE versions?Err, sign it?Does the signing scheme matter? According to http://mindprod.com/jgloss/signedapplets.html, there are lots of...
    Could you recommend a good tutorial? I'm an absolute beginner concerning signing of applets.
    4. Are there negative side-effects to sign an applet?Only that it forces you to sign all its components. Not sure what this question means.What about loading time and jar filesize?
    Does JarIndex work with multiple signed modular applet jars?
    Must javascript code also be signed to talk to signed applets?
    Is a client able to see a signed applet a) without see or interact with a confirmation window and b) without doing any prerequisites (like adding certificates or similar)?
    Thanks, Peter

  • Java script needed for premier elements 13

    Which version of java script is needed for Adobe premier elements 13 and for photoshop elements 13 on mac with OS X YOSEMITE? 
    And do I have to uninstall previous version of Java script?
    Any help Appreciated.   Thank You. 

    joeysudyka
    There may be, but I have not seen any reference to Java Scripting with regard to Premiere Elements.
    Consequently, you may make better gains posting your thread in the Adobe Photoshop Elements forum since Photoshop Elements is part of your workflow equation and is the most likely path to discovery of documentation in this area.
    Photoshop Elements
    Please review the following to determine if there is anything in it that is applicable to what you seek.
    Install Java (JRE) | Mac OS 10.7 and later
    Not sure of distinction for your purposes of Java and Java Scripting
    Java vs. JavaScript
    ATR

  • Runtime.exec() ... executing a java jar from within an NT command file

    Hello,
    I spent the better part of yesterday seeking insight to this with little success. So I hope someone here can direct me in a productive direction.
    I set-up my runtime.exec in a manner similar to the article on javaworld.com which is often referred to here, with two threads to empty the output and error streams of the NT command file I am executing.
    The command file works perfectly from the command line.
    I am currently attempting to build a gui which will automate regression testing for another application. This requires third party software to be running prior to the execution of the test suite. This third party software is started using an NT command file. The command file sets up an environment (classpath, server flags, etc.) and then executes a jar file. When this command file is run from my Gui, the output is identical to the command being run from the command line. Then when the jar file is to be executed, the command file output shows a "file not found" error, but only when executed from my Gui.
    My call to runtime exec looks like this.
    cmdString = new String("commandtoexecute");
    fileLoc = new String("Fully qualified path to command file");
    String [] envp = new String[0];
    testProcess = Runtime.getRuntime().exec(cmdString, envp, fileLoc);
    // some code to process the output streams of testProcess
    Other Info:
    Gui currently executed within Eclipse IDE
    BEA WebLogic is the third party software

    First, my app has the requirement of allowing the user to start WebLogic if it is not already running.Unfortunately, I can't change the requirement.
    But I would say that in a production environment WebLogic should always be running.
    I guess it's an assumption that I'd make a priori. You're jumping through too many hoops to accomplish something that is better solved with a phone call to the server admin: "Please start the WebLogic service."
    .... Side question ... any recommendations on detecting if it is already running? grin
    Yes, call the server admin and ask why you can't have 99.999% availability of a critical resource.
    Second, development is on a hardened system (i.e. very
    long time getting approval for additional software on
    the system).Cactus and JUnit are both open source. No fees involved. If you can install a JAR, you can use these tools.
    Better yet, you can drive them automatically as part of your Ant build process. A GUI implies a person in front of it to start and monitor the tests. JUnit and Ant are all about automating these things so they're run every time you rebuild and redeploy the code. You get XML reports on test results that are displayable in a browser. You can even e-mail the test summary to all developers so they can see if a test broke the build. If a test breaks, you don't deploy. That's the way to go, IMO.
    When you have a working Ant build.xml, the next step is to automate the build completely using a tool like ThoughtWorks' CruiseControl.
    Thank you for you suggestions though. I will read up on Cactus to see if it could help me here.You're welcome. Good luck. Sorry that I'm not more help.

  • OPA Implementation experience with Siebel - Discussions

    This is to seek insights into sucessful OPA integrations with Siebel. As the product is new and lot of confusing OPA with Haley's rules which is now a different and retired product, those who have project experience in OPA can please provide some valuable information about the general architecture, installation and challenges faced while integrating with Siebel.
    Edited by: user1597815 on Nov 26, 2009 1:40 AM

    The Oracle Policy Automation family consists of three primary products:
    1. Oracle Policy Modeling - desktop rule authoring and testing experience, integrated closely with Microsoft Word and Excel. Also provides the ability to author interactive decision-making interviews
    2. Oracle Policy Automation - suite of runtime components for deploying rulebases created with Oracle Policy Modeling
    3. Oracle Policy Automation Connector for Siebel - provides data mapping facility between Siebel and modeled rules, and integration with Siebel workflows to pass data to Oracle Determinations Server for making decisions
    There are two key runtime components of Oracle Policy Automation to be aware of:
    Oracle Determinations Server - SOAP-based web service that takes input data, and returns a response containing the results of applying rules to that data, and decision reports explaining how decisions were reached - this component runs on most Java Application Servers, and also on Microsoft IIS.
    Oracle Web Determinations - web application for deploying interactive interviews to external and internal facing users. Also runs on most Java Application Servers and Microsoft IIS.
    The product has been around for nearly 20 years - the latest major generation for over 5. There are many customers using it in high volume scenarios, integrated with Siebel and other enterprise applications.
    The main thing to be aware of when using OPA with Siebel is that you need to decide whether you will write your rules and the rule data model to match the source material, and then map to the Siebel data model within other "lower level" rules (or within Siebel); or whether to just write all your rules against a data model that closely aligns with the Siebel data model. Either works well. There is good getting started help provided with the OPA Connector for Siebel for how to get Determinations Server up and running with your Siebel environment.
    If you have other specific questions, feel free to post them here, and you should get a rapid response.

  • Dead Hard Drive in PB12?

    I'm a longtime Mac owner and have never experienced any serious hard drive problems, so I'm not sure what I'm dealing with on my PB12 right now. Lately, when I boot, my PB sounds like it has "marbles" inside pinging around. It still booted; just took longer. But now, it won't boot and just hangs at the initial gray screen as the "marbles" rattle around for 30 seconds or so until the hard drive stops - necessitating a hard shutdown.
    I can boot from Diskwarrior and have repaired the directory several times, but this hasn't solved the problem. I suspect the drive is dying/dead, but I'd appreciate any insights any PB owners can offer...
    MacBook, iMacG5 iSight, G5 1.8x2, G4 450x2, PB 12-inch, iBook 300, iMac SE   Mac OS X (10.4.7)  

    Thanks for the post. You actually touch on something that makes me wonder what's going on inside my PB: my drive still mounts/unmounts properly when using Diskwarrior, and its S.M.A.R.T. diagnostics (as well as those of Apple's Disk Utility) do not indicate that anything is wrong with the drive... In addition, after creating a new directory with DW and rebooting from the HD instead of DW, the crazy thing works. It's just the NEXT time that it won't boot.
    Obviously, there's a very real hardware-related problem causing the "marble" sound. Perhaps I should run Apple's Hardware Test? I guess I seek insight that would exhaust all "easier" repair options before I screw around buying/iinstalling a new HD.
    MacBook, iMacG5 iSight, G5 1.8x2, G4 450x2, PB 12-inch, iBook 300, iMac SE Mac OS X (10.4.7)

  • Oracle 8.1.7 and Red Hat Linux 7.1

    Hello!
    I'm trying to install Oracle 8.1.7 in one of our servers, but when invoking the ./runInstaller, the universal Installer cannot be run, it seeks for a Java Runtime Environment 1.1.8 on /bin/jre.
    I tried downloading jre1.1.8 and tried installing it on the server. After installing the jre, I included jre on the $PATH environment variable.
    I tried to re-run the universal installer, however I still encounter the same error. Are there any patches I missed to install on the linux side before installing Oracle8.1.7?
    Thanks.

    Hi.
    I'm using IBMJava118-SDKfrom rpm. You can find it there: http://www.thomasfly.com/Oranux/IBMJava118-SDK-1.1.8-5.0.i386.rpm
    After installing RPM I add JAVA_HOME and CLASSPATH in my /etc/profile. After that logout and login as oracle and run ./runInstaller. Everything work fine.
    BTW: http://www.thomasfly.com/Oranux/ -- fine manual for installing Oracle on Linux.
    Good luck.

  • JVM optimization of load driver forName and db getConnection

    I am working on a site that already had these jsp pages. There is very little java code to the site.
    Almost everything is done through the jsp page plus one main java class to store state data.
    The site's jsp page may do up to 7 queries on the database. On each query, the statements are these:
    Driver DriverDB = (Driver)Class.forName(db_DRIVER).newInstance();
    Connection ConnDB = DriverManager.getConnection(db_STRING,db_USERNAME,db_PASSWORD);
    PreparedStatement StatementDB = ConnDB.prepareStatement("SELECT * from table");
    ResultSet resultDB = StatementDB.executeQuery();My 2 questions are:
    Does the forName call to load the driver get optimized out? Clearly the driver need only load once.
    Does the getConnection reuse the same connection that was done in the previous call on the page?
    There are some performance problems and I'm wondering if I should try to clean the code up or if the jvm
    does it for me through optimization. It's running on Tomcat 5.5.x. and JVM 5.x.
    Thanks for any insight.

    import java.sql.*;
    public class MyJDBC{
         public MyJDBC(){
         public static void main(String args[]){
              System.out.println("Testing JDBC COnnection...");
              try{
                   Class.forName("com.mysql.jdbc.Driver").newInstance()
                   java.sql.Connection conn;
    conn =
    =
    DriverManager.getConnection("jdbc:mysql://localhost/bh
    c?user=dave&password=dave");
              } catch(Exception e){
                   System.out.println("Error" + e.toString());
    }Try this when you initialize your connection (conn) :
    Connection conn;
    conn = Drivermanager.getConnection(
    "jdbc:mysql://localhost/blc",
    "dave", // username
    "dave" // password
    but still include everything else... I think it may just be a problem with your formatting.

  • File Handling (Check for existing file)

    now my problems is that i need to have a code that upon a request checks for a file (in the home dir) and if the file exists reads the information and ouputs it. here is an example:
    check if file TEST.DATA exists?
    check approved TEST.DATA exists
    information outputed...
    if the file is missing i need to have an error message...
    PS. sorry if the question falls under "lame" but i am fairly new to java and i dont know the commands that well... thank you in advance!

    File.exists()
    Reading Text from a File
    Useful places to seek for information:
    - Java API documentation
    - The Java Tutorial
    - Code examples from Java developpers Almanac
    - Google
    - ...

  • Using Swing Parser locks up.

    I'm using the Swing Parser class to read all the text content of an HTML page off the web.
    I override the parse() method. I then setup my URL connection and setup my BufferedReader, and then I call super.parse(br);
    I run this code every 5 seconds in a thread. After some time my java.exe process consumes almost 100% of my CPU and my java program is blocked.
    It seems to me that my program is locking up somwhere inside the super class method parse().
    I'm open to any advice or suggestions. I'm using jdk1.3.1_01 and windows xp. I know XP isn't exactly Java friendly. I'm not sure if that is the cause.
    Any help or advice is gretly appreciated.

    Here is my entire program. I re-read the Swing article on HTML and as you can see, there is minimal code here.
    Could it be that the particular web site I'm trying to visit maybe denies me access if I keep hitting it?
    After awhile my java process stops running and is in some kind of loop and uses 90+% cpu.
    Thanks for any insight.
    import java.util.*;
    import javax.swing.text.html.parser.*;
    import javax.swing.text.html.parser.*;
    import java.util.Hashtable;
    import javax.swing.text.html.HTML.*;
    import javax.swing.text.html.HTMLEditorKit;
    public class HTMLToString {
         ArrayList     htmlTextContent;
         public Object[] getHtmlTextContent(String url) {
              htmlTextContent = new ArrayList();
              parse(url);
              return     htmlTextContent.toArray();
    // note: url can also just be a file name:
    public boolean parse(String addr) {
         HTMLEditorKit.ParserCallback callback = new HTMLEditorKit.ParserCallback () {
                                                                          public void handleText(char[] data, int pos) {
                                                                               //System.out.println("Test");
                                                                               htmlTextContent.add((String) new String(data));
                                                                               //System.out.println(data);
              try
              URL url = new URL(addr);
    URLConnection uconn = url.openConnection();
                   InputStream is = uconn.getInputStream();
                   InputStreamReader isr = new InputStreamReader(is);
                   new ParserDelegator().parse(isr, callback, false);
              catch (IOException ioe)
                   System.out.println(ioe);
              return true;
         public static void main(String[] argv) {
              HTMLToString hts;//= new HTMLToString();
              while(true) {
              try
                        hts = new HTMLToString();
                        Object[] page = hts.getHtmlTextContent("http://www.jossh.com/database/inventory/Solrain_Core.html");
                        Thread.sleep(100);
                        System.out.println("Html Read\n");
              catch (InterruptedException ie)

  • WRT54G Incoming Log Destination Port 520

    I am trying to understand why an [Incoming Log Table] entry that recurs, i.e. in the page that presents itself when I navigate to the [Administration] Panel / [Log] Tab, and then click the [Incoming Log] button:
    =================================
    Incoming Log Table
    Source IP = 178.33.xxx.yyy
    Destination Port Number = 520
    =================================
    After I clear the Log (i.e. turn it off, save settings, turn it on again, save settings) the entry will reappear after a few days.
    I have never seen any other incoming log entry.
    Since it has been pressed into service several years ago, my WRT54G has been configured to block any and all incoming connections. The settings as they continue to appear (under the [Security] Panel / [Firewall] Tab) are:
    =================================
    Checked (Yes) = [Block Anonymous Internet Requests]
    Checked (Yes) = [Filter Multicast]
    Checked (Yes) = [Filter Internet NAT Redirection]
    Checked (Yes) = [Filter IDENT (Port 113)]
    =================================
    I continue to have disabled all port forwarding, port triggering, the DMZ, and QoS, via the applicable tabs under the [Applications & Gaming] Panel. The WRT54G continues to be configured to operate as a Gateway (via the [Settings] Panel/[Advanced Routing] Tab). No static routes are defined. The routing table show four entries, none of which are remarkable or match in anyway the partial address identified above.
    So I am under the impression that my WRT54G should be ignoring everything from the WAN-side.
    Even pinging the WAN-side of my router from the outside internet times out.
    My WRT54G ver 6 is at firmware level 1.02.8, which, as far as I can tell is the latest issued by Cisco.
    I am completely perplexed how such a connection is being established, and do not know if it is or has the potential of causing any harm. My own research indicates port 520 is typically used for RIP protocol, but I have almost zero knowledge of such.
    I certainly appreciate any elucidation.
    My thanks for your attention.

    bonski wrote:
    Forgive me if I seem flippant, but I am not sure what kind of "glitch" you are looking to correct. If performing a factory reset procedure were already known to correct a specific problem, then I would seriously consider it. If performing a factory reset did not run the risk of injecting more problems through the process of having to redo firmware updates and settings, then I would seriously consider it. I am truly seeking insight into understanding the nature of the symptoms, and why they may be occurring. I am not looking for trial and accidental success.
    Thank you for you thoughts.
    Hi bonski,
    The log means that the IP:  178.33.xxx.yyy (which is from your ISP) sends logs to port 520. Port 520 is your router. I believe it is saying that you ISP simply sends data to your router. This is normal since your router gets internet connection from the ISP. This is by the way base on my understanding about the research I've made.
    This might help:
    http://www.pc-library.com/ports/tcp-udp-port/520/
    http://www.auditmypc.com/udp-port-520.asp
    http://www.iss.net/security_center/advice/Exploits/Ports/520/default.htm

Maybe you are looking for