How can I notice whether a class is loaded or not?

In the case of a instance, finallize() method can do it. But when it is a class?
Does anyone know the way?

In old JVM, the gc will collect any classes without any reference, however, JDK1.2 uses a new tech to collect classes, that is only if all classes that loaded by the same class loader do not have any reference to them, they are unloaded. So, in JDK1.2, if all you classes are loaded by the same class loader, once the class is loaded, it will be there untill you exit the program. Only if you use your own class loader to load some classes, or the application is a distributed application (that is, multiple JVMs are in use), the class unload and reload could be a problem.
There is no direct finalize thing for classes, maybe JVM profile could help, since some application can use it to analysis the running program's memory usage (includes classes loaded). Or maybe a customized class loader could help. I'm not sure. Also the static initial codes could let you know the class is re-loaded, though it can't tell you when the class is un-loaded.

Similar Messages

  • HT201328 how can I know whether my IME is blocked or not?

    How can I know whether my IME is blocked or not?

    Ask your wireless carrier.
    Where did you acquire this iPhone? Common scam
    is to sell iPhone in working condition so buyer can see
    it works, then seller reports iPhone as stolen/lost for
    insurance claim. Insurance company works with
    cellular provider to blacklist the iPhone and suddenly
    it no longer works.
    Or is your iPhone still locked to a wireless carrier as
    you imply in https://discussions.apple.com/thread/5001327?tstart=0

  • How can we check whether a ResultSet is EMPTY or NOT ?

    i'm getting some data inside ResulSet (using JDBC inside Servlet).
    now i want to redirect response according to ResultSet...., if ResultSet is EMPTY then on diff page, else on different page...
    how can i check whether a ResultSet is empty or not...
    i've used next() , wasNull() methods ,,, but not solving the purpose...
    thanx in advance...

    What you could do is to ask the database fora
    record count and check that for zero.
    How?????You just do an SQL statement but instead of the list of fields after SELECT you put
    SELECT count(*) FROM ...... WHERE .....
    That returns a single integer value into the resultset giving the number of matching records currently in the database.
    The trouble is you can't be certain that when you subsequently access the records the number won't have changed, because databases are generally accessible to more than one process at a time and some other process might add or delete a record between counting and retrieving or, for that matter, during the process of retrieval.
    Also the count is likely to take more time than just doing rs.next() and seeing if you get a record.
    Since you seem to be in a servlet environment you should consider doing the database query and the first rs.next() at the top of the servlet/JSP that presents the results and, if there are no records, using getServletContext.getRequestDispatcher(...).forward(request, response) to swich to your error page if it returns false.
    So the stucture looks like:
    rs = stmt.executeQuery(......);
    if(!rs.next())
          getServletContext().getRequestDispatcher("/noresultspage.jsp").forward(request, response);
    else {
         do   {
             .... display result data
          } while(rs.next());
        }

  • In Generic Extraction how can we know whether it is Delta Enabled or not?

    In Generic Extraction how can we know whether it is Delta Enabled or not?
    Thanks,
    Pramod.

    Hi Pramod,
    In R/3 use RSO2 tcode and enter your DS name and click "Change / Display" In this "Press F7 or Display Filed List" icon near to Generic Delta.In this Screen if Delta Update is Checked means it supports delta method  otherwise it won't support delta method.
    Note:Assign Points if it helps.
    -Arun.M.D

  • How can i check whether my phone is unlocked or not

    How can i check whether my phone is unlocked or not

    rozhan.m wrote:
    Im in srilanka, my sister brought me this phone from UK. i dont kwon how to call apple from here. pls help me
    Nothing we can do to help you.  If it was bought in the UK from an Apple store as unlocked, it is unlocked.  If it was bought anywhere else, it will be locked, and only the carrier it is locked to will be able to unlock it.
    If you've tried a local SIM and it has not worked, then you have your answer, it is locked.

  • Hi anybody there who can help me ha..? My phone 5s was stolen 1 month ago..Find my phone is no a big deal, How can i know whether my phone is in use??

    Hi anybody there who can help me ha..? My phone 5s was stolen 1 month ago..Find my phone is no a big deal bcz it seems to be wiped out all data including settings. it might be in use somewhere turning new fresh Gadget.  How can i know whether my phone is in use??

    You would know for a fact if the device is in use, but if you go back to the find my iPhone app in iCloud.com, you can either select to erase it, or place it in lost mode, in which case, once the device makes a connection to the internet, it will automatically go into that mode.

  • How can I run a a class file on the Apache server?

    Hi Guys and Gurus,
    I am seeking some favor all of experienced gurus, i.e.
    How can I run a a class file on the Apache server?
    Actually, I want to extract some records from a MySQL Database running on Apache Server. I wrote a program just to select the columns and show them. It is now a Class file, Now how can I run this class file from the Server???
    Please advise...
    VJ

    cross posted
    http://forum.java.sun.com/thread.jsp?thread=299137&forum=31&message=1184025

  • How can I see whether songs in iCloud are also on the PC locally (so I can sync them with a Classic)?

    How can I see whether songs in iCloud are also on the PC locally (so I can sync them with a Classic)?

    In iTunes, on the View menu select 'Hide Music in the Cloud'

  • URGENT PLEASE:How can I run a a class file on the Apache server?

    Hi Guys and Gurus,
    I am seeking some favor all of experienced gurus, i.e.
    How can I run a a class file on the Apache server? Can I run through an Applet?
    How can I set Environment variables in Windows2000 Professional Environment?
    Actually, I want to extract some records from a MySQL Database running on Apache Server. I wrote a program just to select the columns and show them. It is now a Class file, Now how can I run this class file from the Server???
    The code is here
    import java.sql.*;
    public class RecordShow {
    public static void main(String args[]) {
    String url = "jdbc:mysql://localhost/myhost";
    Connection con;
    String query = "select mytable.column," +
    "from mytable " +
    "where mytable.column = 1";
    Statement stmt;
    try {
    Class.forName("com.mysql.jdbc.Driver");
    } catch(java.lang.ClassNotFoundException e) {
    System.err.print("ClassNotFoundException: ");
    System.err.println(e.getMessage());
    try {
    con = DriverManager.getConnection(url,
    "myuser", "mypassword");
    stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery(query);
    ResultSetMetaData rsmd = rs.getMetaData();
    int numberOfColumns = rsmd.getColumnCount();
    int rowCount = 1;
    while (rs.next()) {
    System.out.println("Row " + rowCount + ": ");
    for (int i = 1; i <= numberOfColumns; i++) {
    System.out.print(" Column " + i + ": ");
    System.out.println(rs.getString(i));
    System.out.println("");
    rowCount++;
    stmt.close();
    con.close();
    } catch(SQLException ex) {
    System.err.print("SQLException: ");
    System.err.println(ex.getMessage());
    Please advise... THANKS
    VJ

    Ehm, I wasn't referring to you at all... read up,
    there's a comment by jschell saying that CGI might be
    easier/better for his purposes.
    Yep.
    I know PHP/Perl/whatever might be easier for some
    purposes, but only if you happen to know them and want
    to/are able to use them. Ok. But you aren't the one asking the question are you. And the person who asked the question seems to have absolutely no familiarity with Apache or applets.
    So whatever they do they are going to have to learn a lot.
    And that does indeed suggest that in all likelyhood they have not investigated the alternatives.
    And for the vast majority of internet applications, especially with smaller projects (obvious this person is not working with a large team), using perl, or something besides java, is going to be the best business solution. It is simpler, and more secure (probably due to the fact that it is simpler.)
    Since this is a Java forum, I
    answer under the assumption that people have made a
    choice one way or another to use a Java solution to
    their problem, so I try to solve it in Java first, and
    only when that fails (very seldom) do I turn to other
    solutions.You approach problems by arbritrarily deciding to try to solve it in java first and only if you fail do you then look to other solutions?
    My first step is to try to figure out which of the various avenues is going to cost less. (And a secondary, but non-trivial concern, is then to convince the customer that just because they have heard of a buzz word like 'enterprise bean' that it doesn't mean that is a cost effective solution.) We must come from different worlds.

  • How can I call a nonstatic class

    Hello All,
    I've wrote a simple bean for my testcase that count a value (e.g. site access):
    public class Bean1 {
    private int accessCount = 1;
    public int getAccessCount() {
    return (accessCount++);
    If I call the bean with a jsp-site, it works fine with different scope. e.g. session and application.
    With session scope different browser count different. With application scope different bowser count together. Thats the normal attitude.
    My jsp code:
    <jsp:useBean id="counter" class="ml.view.Bean1" scope="session" />
    <jsp:getProperty name="counter" property="accessCount" />
    This don't work with a static bean (normal too), but I can only call a static class in my UIX site.
    I call the bean from uix with the invoke element. Is that correct? How can I call a nonstatic class with a special scope? Which other solution ist possible?
    My uix code:
    <invoke method="getAccessCount" result="${uix.eventResult.getAccessCount}" instance="${sessionScope.myBean.getAccessCount}" exception="${uix.eventResult.error}" javaType="ml.view.myBean"/>
    Thank you for any solution!
    The error messages are:
    java.lang.NullPointerException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java)
    at oracle.cabo.servlet.event.InvokeEventHandler._invoke(Unknown Source)
    at
    and so forth...

    false in my uix code example: javaType="ml.view.myBean"
    correct: javaType="ml.view.Bean1"
    Sorry :-) that was only an error in my post not in the really example.

  • If someones is using my account/apple id can they receive calls or messages too?? and how can i notice  if someones using my apple id??

    if someones is using my account/apple id can they receive calls or messages too?? and how can i notice  if someones using my apple id??

    You cannot make your @icloud.com address the login address for the ID. However you can change your ID, currently a Gmail one, to any other functioning non-Apple email address. The Gmail address would then no longer access your account, and so even if someone were to obtain posession of it (is that even possible) it wouldn't allow them to get into your account.
    If you want to change your ID to another email address please follow the procedure outlined below, particularly noting the first step.
    Firstly, if you have 'Find My iPhone/iPad/iMac' enabled on any of your devices, turn it off.
    Create a new email address, for example  at Yahoo or Gmail, or anywhere convenient (or you can use an existing address as long as it has never been associated with an Apple ID).
    Go to http://appleid.apple.com and click 'Manage your Apple ID'. Sign in with the current ID.
    Where it says 'Apple ID and primary email address' and gives your current ID email address, click 'edit'.
    Enter your new address and click 'Save changes'.
    Now you will need to go to each of your devices and sign out in System Preferences (or Settings)>iCloud - 'Sign out' on a Mac, 'Delete this account' on an iOS device (this will not delete the account from the server).
    Then sign back in with your new ID. Your iCloud data will disappear from your devices when you sign out, but reappear when you sign back in.
    I re-iterate: before you start, turn off 'Find My Mac' (or whatever) or you will need the services of Support.

  • How can I know whether PI is ready to run

    Hi.
    How can I know whether PI is ready to run?
    ex)
    MMC status is green.
    J2EE Engine status is "10"(RUNNING)
    http://<host>:<port>/AFW/rtc returns some status
    I want to check the whether PI is ready to run periodcically.
    Can I use sapcontorl interface?
    regards,

    Gaspard,
    >MMC status is green.
    >J2EE Engine status is "10"(RUNNING)
    > Check the ABAP Stack
    If all this good, PI  is ready to go ahead
    Cheers
    Agasthuri Doss

  • How can I tell whether there is a Trojan on my Mac?  I downloaded two file that looked legit but I think they were not. They originated in theory from eFax . I am on OS X 10.6.8

    How can I tell whether there is a Trojan on my Mac?  I downloaded two file that looked legit but I think they were not. They originated in theory from eFax . I am on OS X 10.6.8

    You could try doing a scan with one of the tools mentioned here:
    http://www.thesafemac.com/mmg-antivirus

  • How can we block the asset class for company code

    Hi Experts,
    At what level we can define asset class and how can we block the asset class for particular company code in group company
    Regards,
    Harish

    Dear Harish,
    You can block the asset through OAOA at asset class level blocking at Asset Class level, and same you can block for creation at a chart of depreciation level from AM05.
    And for additional acquisition you can block from AS05. I hope this will solve your issue. If you have doubts feel free to share.
    Regards,
    Pankaj A Bhalerao.

  • How can I tell whether my iphone is a 4 or 5 ?

    How can I tell whether my phone is a 4 or 5 ?

    Identifying iPhone models
    iPhone 4 - Glass back, dock connector, 3.5" screen
    iPhone 5 - Aluminum back, lightning connector, 4" screen

Maybe you are looking for

  • Sort in Report not working correctly

    I have a report with many sorts selected as an option within the reports attributes. However, some of the columns does not seem to be sorting at all when Selected (Others do as expected) For example one column is a VARCHAR2 examples of values within

  • How can I Export dynamic table to bapi,  which is imported from BAPI.

    At first time execution of BAPI , I am getting Items(Table formate) . Again I have export these Items to BAPI. As a Input Table. How can transfer data export table to import table. And also I need delete some items, which are come form bapi. Then I n

  • WLAN in combination with company network.

    Afternoon, I work for a company where everyone works on a domain with an old server (NT4), DHCP enabled, so everyone on the domain gets an IP assigned. Since there is no network connection in the meeting room, the management team wanted a wireless ne

  • How to wait until html page is completely rendered

    I use a JEditorPane to display HTML and i want to print it to an image. so i tried to load the page (JEditorPane.setPage(URL url)) and wait until the property "page" is fired. Then i printed the component to an image. My problem is that the page wasn

  • ASM DATA MIGRATION

    We are looking to migrate our current 2 node rac cluster running 10.2.0.3 on the linux Itanium platform from using ocfs to ASM. We are considering building a new 2 node cluster with new storage and would like to use dataguard to facilitate the switch