Problem with something.class expression

when we write any expression like "x.class", what does it mean and what output it will show?? in which way it work?? can anyone help me please??

shashi_rajak wrote:
x.class can be used when obtaining a lock for static block or method. the lock will be on the class object.The "obtaining a lock for static block or method. the lock will be on the class object" part is meaningless.
x.class is only valid if x is one of the primitive types or a classname. It cannot be a variable or a string literal that evaluates to a class name.
As for "obtaining a log for a static block or method", again, irrelevant. When you obtain a lock, it is always on an object. Sometimes you want it to be on a class object. In these cases, this class literal expression may be useful. However, the meaning and general usage of the idiom have nothing whatsoever to do with synchronization.

Similar Messages

  • Getting problem with DOMImplementation classes method getFeature() method

    hi
    getting problem with DOMImplementation classes method getFeature() method
    Error is cannot find symbol getFeature()
    code snippet is like...
    private void saveXml(Document document, String path) throws IOException {
    DOMImplementation implementation = document.getImplementation();
    DOMImplementationLS implementationLS = (DOMImplementationLS) (implementation.getFeature("LS", "3.0"));
    LSSerializer serializer = implementationLS.createLSSerializer();
    LSOutput output = implementationLS.createLSOutput();
    FileOutputStream stream = new FileOutputStream(path);
    output.setByteStream(stream);
    serializer.write(document, output);
    stream.close();
    problem with getFeature() method

    You are probably using an implementation of DOM which does not implement DOM level-3.

  • Hello i have a problem with my airport express the music sizzles? Why?

    Hello i have a problem with my airport express the music sizzles? Why?
    What can i do?

    Does the game has the same iOS requirements that your phone has? Games needing iOS7 will not install on iOS6 and earlier.
    Did you try to download it to your computer and sync it to your phone after that?
    If you can't connect to the iTunes Store, try these suggestions:
    Can't connect to the iTunes Store

  • Problems with inner classes in JasminXT

    I hava problems with inner classes in JasminXT.
    I wrote:
    ;This is outer class
    .source Outer.j
    .class Outer
    .super SomeSuperClass
    .method public createrInnerClass()V
         .limit stack 10
         .limit locals 10
         ;create a Inner object
         new Outer$Inner
         dup
         invokenonvirtual Outer$Inner/<init>(LOuter;)V
         ;test function must print a Outer class name
         invokevirtual Outer$Inner/testFunction ()V
    .end method
    ;This is inner class
    .source Outer$Inner.j
    .class Outer$Inner
    .super java/lang/Object
    .field final this$0 LOuter;
    ;contructor
    .method pubilc <init>(LOuter;)V
         .limit stack 10
         .limit locals 10
         aload_0
         invokenonvirtual Object/<init>()V
         aload_0
         aload_1
         putfield Inner$Outer/this$0 LOuter;
         return
    .end method
    ;test
    .method public testFunction ()V
         .limit stack 10
         .limit locals 10
         ;get out object
         getstatic java/io/PrintStream/out  java/io/PrintStream;
         aload_0
         invokevirtual java/lang/Object/getClass()java/lang/Class;
         ;now in stack Outer$Inner class
         invokevirtual java/Class/getDeclaringClass()java/lang/Class;
         ;but now in stack null
         invokevirtual java/io/PrintStream/print (Ljava/lang/Object;)V
    .end methodI used dejasmin. Code was equal.
    What I have to do? Why getDeclatingClass () returns null, but in dejasmin code
    it returns Outer class?

    Outer$Inner naming convention is not used by JVM to get declaring class.
    You need to have proper InnerClasses attribute (refer to http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html#79996)
    in the generated classes. Did you check using jclasslib or another class file viewer and verified that your .class files have proper InnerClasses attribute?

  • Chroma Key problems with Final Cut Express 4

    I had no problems with the Chroma Key in Final Cut Express 4 before. It was working perfectly fine untill I brought anther Macbook Pro last year in August. I installed it on the new computer and then the Chroma Key didn't work. Final Cut opens up and the other filters work fine but I can't get the chroma key to work. Any possible reasons?

    I am experiencing an interseting problem with Final Cut Express on OSX Lion.  I teach in a Mac Lab at my school.  Today I was trying to teach Chroma Keying- which I have been doing for years - but for some reason the color selector would just not key out anything.   I tried it on four or five different machines, and it turns out that ONLY my machines that were running OSX Leopard would allow the Chroma Key to function.  I have two machines running Lion and the Chroma Key would not work on EITHER of them.  I followed the exact same steps, and all of the settings were identical.  The hardware was also the exact same package from machine to machine.  I feel like there must be an issue with OSX Lion that is breaking the Chroma Key filter.  Can anyone help?

  • Problem with email regular expression

    I found the following regular expression from this website : http://www.regular-expressions.info/email.html
    \b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\bor
    ^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$I am using the following website to check its success, as well as my java app. : http://www.regexplanet.com/simple/index.html
    of course java has a problem with the illegal escape character so i add another "/".
    In both of my testing scenarios the regex value seems to fail. Am I missing something here?
    If anyone could also test this regex and verify or correct my problem I would be very grateful.
    Edited by: rico16135 on Jun 5, 2010 4:01 PM
    Edited by: rico16135 on Jun 5, 2010 4:02 PM

    rico16135 wrote:
    of course java has a problem with the illegal escape character so i add another "/".I seem to be missing the distinction between a forward slash / which is not an escape character, and a backslash \ which is.
    Also, if you show your actual Java code (in code tags, of course), and describe clearly and precisely what's going wrong--pasting in the exact, complete error message and indicating clearly which line caused it, if there is one--people will be in a better position to help you.

  • Problem with JFrame class.

    To risolve my problem i need for few diferent frame
    ( for esample in one i put JTextFild that take the user input, in a nother one i need for program output ) . But, th problem is, all my frames using the same object.
    If i construct diferent JFrame window class i have problem that i don't acess in the same object from all the window. And if i dont use a object, i have static acess .
    I risolve the problem with 1 JFrame class with diferent constructors, but i wont a diferent way to risolve my problem, because there are few windows.
    Help me.....

    Make the class that extends JFrame an inner class of the the main class. You can then access all members of the outer class.

  • I have a problem with oracle 10g express edition

    Hello,
    I have just installed oracle 10g express edition and I have a problem with the script editor. I can write anything in the window that appears below buttons undo,redo and find, It is like disabled. I use windows XP, Firefox 2.0 ( I have also tried with Iexplorer and It does not work either). I have javascript enabled.
    anyone knows what is the problem?
    Later,I have installed it in a virtual machine of Windows 2003 Server and It works well but I`d rather use it in my Microsoft XP
    Thank you very much
    Fernando Martínez

    It looks like you can fix this if you replace the codearea.xbl.xml and codearea.iframe.html files in the
    /i/editor folder with files from an Apex 2.2.1 installation - such as the one on apex.oracle.com.
    Since I don't know what the licensing implications are, I will let you figure out the details.

  • Problems with java regular expressions

    Hi everybody,
    Could someone please help me sort out an issue with Java regular expressions? I have been using regular expressions in Python for years and I cannot figure out how to do what I am trying to do in Java.
    For example, I have this code in java:
    import java.util.regex.*;
    String text = "abc";
              Pattern p = Pattern.compile("(a)b(c)");
              Matcher m = p.matcher(text);
    if (m.matches())
                   int count = m.groupCount();
                   System.out.println("Groups found " + String.valueOf(count) );
                   for (int i = 0; i < count; i++)
                        System.out.println("group " + String.valueOf(i) + " " + m.group(i));
    My expectation is that group 0 would capture "abc", group 1 - "a" and group 2 - "c". Yet, I I get this:
    Groups found 2
    group 0 abc
    group 1 a
    I have tried other patterns and input text but the issue remains the same: no matter what, I cannot capture any paranthesized expression found in the pattern except for the first one. I tried the same example with Jakarta Regexp 1.5 and that works without any problems, I get what I expect.
    I am using Java 1.5.0 on Mac OS X 10.4.
    Thank to all who can help.

    paulcw wrote:
    If the group count is X, then there are X plus one groups to go through: 0 for the whole match, then 1 through X for the individual groups.It does seem confusing that the designers chose to exclude the zero-group from group count, but the documentation is clear.
    Matcher.groupCount():
    Group zero denotes the entire pattern by convention. It is not included in this count.

  • Problems with importing classes in Java

    Hello,
    i have some problems with a simple project.
    The structure is like this:
    web-inf/classes/databeans/loginexistinguserform.java
    web-inf/classes/formactions/loginexistinguseraction.java
    loginexistinguserform.java :
    package databeans;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionError;
    import org.apache.struts.action.ActionMapping;
    import javax.servlet.http.HttpServletRequest;
    public class LoginExistingUserForm extends ActionForm
         String userid;
         String password;
         public String getUserid(){return userid;}
         public void setUserid(String newUserid){userid=newUserid;}
         public String getPassword(){return password;}
         public void setPassword(String newPassword) {password=newPassword;}
         public ActionErrors validate(ActionMapping mapping, HttpServletRequest request){
              ActionErrors errors=new ActionErrors();
              if(this.userid==null||this.userid.equals(""))
                   errors.add("user",new ActionError("error.userid.required"));
              if(this.password==null||this.password.equals(""))
                   errors.add("pass",new ActionError("error.password.required"));
              return errors;
    }loginexistinguseraction.java
    package formactions;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import java.io.IOException;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import databeans.LoginExistingUserForm;
    public class LoginExistingUserAction extends Action
         public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
         throws IOException, ServletException
              LoginExistingUserForm loginData=(LoginExistingUserForm)form;
              if(loginData.getUserid().equals("Admin")&&loginData.getPassword().equals("Parola"))
                   return mapping.findForward("successLogin");
              else
                   return mapping.findForward("failureLogin");
    }I can complie succesfully loginexisitinguserform.java but problems appears when i want to compile the second file, loginexistinguseraction.java with command: javac loginexistinguseraction.java
    C:\ApacheGroup\Tomcat\webapps\PersonalWeb\WEB-INF\classes\formactions>javac loginexistinguseraction.java
    loginexistinguseraction.java:10: package databeans does not exist
    import databeans.LoginExistingUserForm;
    ^
    loginexistinguseraction.java:17: cannot find symbol
    symbol : class LoginExistingUserForm
    location: class formactions.LoginExistingUserAction
    LoginExistingUserForm loginData=(LoginExistingUserForm)form;
    ^
    loginexistinguseraction.java:17: cannot find symbol
    symbol : class LoginExistingUserForm
    location: class formactions.LoginExistingUserAction
    LoginExistingUserForm loginData=(LoginExistingUserForm)form;
    ^
    3 errors
    I have the CLASSPATH variable setup tu C:/Sun/Appserver/lib/j2ee.jar
    Can someone help me ? Thank you in advance !

    Thank you very much ! It worked. I'm really new in Jav a programming.
    Now i have encoutered another problem. When i want to login, and enter user name and password i am redirected to a login.do page, instead of Welcome.jsp
    Here is Login.jsp:
    <%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@page contentType="text/html; charset=ISO-8859-1"%>
    <html>
    <head><title>Login Form</title></head>
    <body>
    <html:errors/>
    <html:form action="/login">
    <table border="0" width="200">
    <tr>
         <td>User Name:</td>
         <td><html:text property="userid" maxlength="13"/></td>
    </tr>
    <tr>
         <td>Password:</td>
         <td><html:password property="password" maxlength="13"/></td>
    </tr>
    </table>
    <br />
    <html:submit value="Login"/>
    </html:form>
    </body>
    </html>and here is struts-config.xml :
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE struts-config PUBLIC
              "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
              "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
    <struts-config>
    <!--========================beans for HTML form data=======================-->
    <form-beans>
         <form-bean name="loginBean" type="databeans.LoginExistingUserForm"/>
    </form-beans>
    <!--========================Action Mappings================================-->
    <action-mappings>
         <action path="/login" type="formactions.LoginExistingUserAction" name="loginBean" input="/Login.jsp" scope="session">
              <forward name="succesLogin" path="/pages/Welcome.jsp" redirect="true"/>
              <forward name="failureLogin" path="/pages/Diverse.jsp" redirect="true"/>
         </action>
    </action-mappings>
        <message-resources parameter="MessageResources" />
    </struts-config>

  • Problem with launching 10g express edition

    Hi, i am from Czech Republic and i have big problem with launching Oracle database 10g Express Edition.
    After instal program i launch "Go to Database Home Page" and IE write to me "Page not found" (web adress is http://127.0.0.1:8080/apex).
    Please,can anyone help me what i have to do to launch it correctly?
    Thank you.
    Message was edited by:
    user628210
    Message was edited by:
    user628210

    hi again. first a have to apologize. i have oracle
    database express edition 10g from school,so i dont
    have registered version.When I said 'register' I didn't mean have it licensed, Oracle XE doesn't require any kind of license registration, it is free. By registering it I meant a technical issue. Once the database is started it tries to contact the listener at 1521 port, once contacted the oracle instance registers itself against it, and if it is successful you will have the administrator's page initialized and ready to access at the default 8080 port.
    when i type SQL commands, command line wrote me
    SP2-0734:unknown command beginning ENTERED COMMAND
    Could you please specify which command did you try to enter?
    >
    and when i open RUN DATABASE, command line wrote
    C:\OracleDatabase\app\oracle\product\10.2.0\server\BIN
    net started OracleServiceXE - system error 5, accessdenied
    What do you mean with 'RUN DATABASE'?
    ~ Madrid
    http://hrivera99.blogspot.com/

  • Problems with loading Classes from a Directory of a jar file.

    Hi Guys,
    i have a problem with my programm. It works greatly in my eclipse platform. but there are all classes in my default folder. I want to add a plugin function now. My Abstract classes are in in my default folder and my doughter classes are in my plugin-folder called plugin.
    I look what is in the pluginfolder -> all my doughter classes. but i every time get a Class Cast Exception and an ClassNotFoundException.
    How can i do that ? Current i do it with Class.forName(frames.substring(0,frames[i].indexOf(".class")));
    best regards flo

    http://java.sun.com/j2se/1.3/docs/tooldocs/win32/classpath.html

  • Inheritance problem with parent class calling child class

    I have a problem with inheritance with a parent class calling a child class method. Below is the example pseudocode code and my problem:
    public abstract class A {
        protected void function1 ( ) { }
        protected void function2 () {
             //calls function1();
             function1();
    public abstract class B extends A {
        protected void function1 ()  {
             // do stuff
    public class C extends B {
        protected void function1 ()  {
            // do stuff
            super.function1 ();
    }I have an object instance of class C created and its function2() is invoked.
    My problem is, while in function2(), which belongs to abstract class A and the method call to function 1() is called, the call invokes the function1() of class B. Shouldn't the call invoke function 1() of class C instead? And then function1() of class B will be called after due to the super.function1(). It's not behaving like I thought it would.
    Edited by: crono77 on Jan 10, 2008 8:13 PM

    Nevermind, i found my error :)

  • Has anyone experienced problems with their airport express since yosemite?

    Since updating to Yosemite, I am constantly having issues with my Airport Express.  It flashes yellow, indicating no connection.  I have attempted to:
    Soft Reset:  Unplug it (Airport Express) and plug in again
    Factory Reset:  Unplug it, push & hold the reset button with a paper clip while pulling it back in.
    A Tip From Another Site:  Unplug our Time Capsule we use as a router & the Airport Express, wait 3 minutes - then plug in the Time Capsule, wait another minute - then plug in Airport Express.  This worked for a very short amount of time, then the light started flashing yellow again.
    Again, I had no problems before updating to Yosemite.
    I look forward to & appreciate any help resolving this issue.

    Hi I have the same problem after upgrading to Yosemite
    I don't know why some times ping request to airport extreme is so long:
    64 bytes from 10.0.0.254: icmp_seq=3529 ttl=255 time=0.892 ms
    64 bytes from 10.0.0.254: icmp_seq=3530 ttl=255 time=0.875 ms
    64 bytes from 10.0.0.254: icmp_seq=3531 ttl=255 time=0.831 ms
    64 bytes from 10.0.0.254: icmp_seq=3532 ttl=255 time=0.802 ms
    64 bytes from 10.0.0.254: icmp_seq=3533 ttl=255 time=1.172 ms
    64 bytes from 10.0.0.254: icmp_seq=3534 ttl=255 time=0.951 ms
    64 bytes from 10.0.0.254: icmp_seq=3535 ttl=255 time=6.246 ms
    64 bytes from 10.0.0.254: icmp_seq=3536 ttl=255 time=26.014 ms
    64 bytes from 10.0.0.254: icmp_seq=3537 ttl=255 time=71.004 ms
    64 bytes from 10.0.0.254: icmp_seq=3538 ttl=255 time=117.939 ms
    64 bytes from 10.0.0.254: icmp_seq=3539 ttl=255 time=171.653 ms
    64 bytes from 10.0.0.254: icmp_seq=3540 ttl=255 time=207.489 ms
    64 bytes from 10.0.0.254: icmp_seq=3541 ttl=255 time=0.812 ms
    64 bytes from 10.0.0.254: icmp_seq=3542 ttl=255 time=0.670 ms
    64 bytes from 10.0.0.254: icmp_seq=3543 ttl=255 time=8.185 ms
    64 bytes from 10.0.0.254: icmp_seq=3544 ttl=255 time=0.935 ms
    64 bytes from 10.0.0.254: icmp_seq=3545 ttl=255 time=0.693 ms
    64 bytes from 10.0.0.254: icmp_seq=3546 ttl=255 time=0.793 ms
    64 bytes from 10.0.0.254: icmp_seq=3547 ttl=255 time=16.345 ms
    64 bytes from 10.0.0.254: icmp_seq=3548 ttl=255 time=62.348 ms
    64 bytes from 10.0.0.254: icmp_seq=3549 ttl=255 time=106.804 ms
    64 bytes from 10.0.0.254: icmp_seq=3550 ttl=255 time=152.399 ms
    64 bytes from 10.0.0.254: icmp_seq=3551 ttl=255 time=200.171 ms
    64 bytes from 10.0.0.254: icmp_seq=3552 ttl=255 time=1.027 ms
    64 bytes from 10.0.0.254: icmp_seq=3553 ttl=255 time=0.736 ms
    64 bytes from 10.0.0.254: icmp_seq=3554 ttl=255 time=1.033 ms
    64 bytes from 10.0.0.254: icmp_seq=3555 ttl=255 time=1.020 ms
    64 bytes from 10.0.0.254: icmp_seq=3556 ttl=255 time=0.981 ms
    64 bytes from 10.0.0.254: icmp_seq=3557 ttl=255 time=0.967 ms
    64 bytes from 10.0.0.254: icmp_seq=3558 ttl=255 time=0.866 ms
    64 bytes from 10.0.0.254: icmp_seq=3559 ttl=255 time=41.596 ms
    64 bytes from 10.0.0.254: icmp_seq=3560 ttl=255 time=86.209 ms
    64 bytes from 10.0.0.254: icmp_seq=3561 ttl=255 time=133.951 ms
    64 bytes from 10.0.0.254: icmp_seq=3562 ttl=255 time=180.552 ms
    64 bytes from 10.0.0.254: icmp_seq=3563 ttl=255 time=1.063 ms
    64 bytes from 10.0.0.254: icmp_seq=3564 ttl=255 time=1.345 ms
    64 bytes from 10.0.0.254: icmp_seq=3565 ttl=255 time=1.078 ms
    64 bytes from 10.0.0.254: icmp_seq=3566 ttl=255 time=0.945 ms
    64 bytes from 10.0.0.254: icmp_seq=3567 ttl=255 time=1.168 ms

  • Problem with loading classes!!!

    I am loading classes using
    // Open File
    InputStream jarFile = new BufferedInputStream(new FileInputStream(
    pluginPath));
    // Get Manifest and properties
    Attributes attrs = new JarInputStream(jarFile).getManifest().
    getMainAttributes();
    jarFile.close();
    // Read Main Class
    String mainClass = attrs.getValue("Protocol-Class");
    // Load all classes from jar file without giving classpath
    URL url = new URL("jar:file:" + pluginPath + "!/");
    JarURLConnection jarConnection = (JarURLConnection) url.openConnection();
    URL[] urls = new URL[] {
    url};
    ClassLoader classLoader = new URLClassLoader(urls);
    // Create new instance of protocol
    Protocol protocol = (Protocol) classLoader.loadClass(mainClass).
    newInstance();
    I am loading classes one by one say a order A, B, C. In my case class c extends class A. So I am loading class A first and later B and finally C. But I am getting exceptions when loading class C that Class A is unknown.The following exception is thrown
    java.lang.NoClassDefFoundError: com/a/A at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
    Please give me a solution to make it run.

    You create a new class loader for each class. The class loaders are independent, and so the class hierarchies they load are independent. Class A loader by classLoaderOne doesn't see class B loader by classLoaderTwo - they are loaded into their own sandboxes.
    Either load everything with one class loader or create the class loaders in a hierarchy. To create a hierarchy use the class loader constructor that takes a parent class loader as a parameter. One class loader may be easier because then you don't need to worry about loading order.

Maybe you are looking for

  • IDVD 6 and "menu duration" error

    I have created an iMovie and then an iDVD project. When I attempt to burn an .img file I got an error: "Total menu duration exceeds 15 minutes" The Loop Duration goes to 12:14 minutes. How do I correct this? I'm really getting frustrated on this. Pet

  • Adjusting Details on a Purchase Order.

    Folks i'm looking to make a change on our actual Purchase Order,i.e.Change the name on the Invoice Address. How does one go about doing this? Is it done in SE71?

  • Shared services installation problem

    Hi, i have installed and configured shared services, configuration was also successfull, when i am trying to luanch through user management or internet explorer, it is getting page is not displayed. when we install shared services java runtime enviro

  • CSS Rollover question

    Hi, I've created a menu using CSS that mkaes a nice rollover. The thing is - I can't figure ot how to close the gap. I want each button to but up to it's neighbor: http://www.daveblaker.com/rapidtest I'm thinking it's got something to do with the DIV

  • Wage type Creation Problem ( No values selected )

    Hi, I have a problem creating wagetype. when i go to transaction OH11, when i click on the dropdown list ORIGINAL WAGETYPE, it gives me the following error : "No values selected Maintain entries?" Since a wage type cannot be created from scratch and