Name$1.class - what is it ?

Hello.
Some java source files are compiled to xxx.class and xxx$1.class.
What is $1 file ?
WinXP + SP1 has built in JRE. However applets with $1 files doesn't work. I don't know why.
Have you any idea ?
Regards from POLAND. Jack

They are anonymous inner classes, usually as a result of coding some kind of an event handler. They are not stand-alone classes.

Similar Messages

  • What are "Name$1.class" files and how do I generate them in Eclipse

    I have the source code of a rather large java application and I want to set up an Eclipse project for it.
    After diffing the WEB-INF directory generated by Eclipse with the one generated by the original maven build script I noticed that there are several files of the form "Name$1.class" which do not exist in the Eclipse output.
    My questions are, what is the purpose of this $1 string in the class file name and how do I generate those in Eclipse?

    ok, but why are they generated in the Maven environment but not in the Eclipse environment?
    To be exact, Eclipse does create inner class files, however when diffing both output directories I have some extra inner class files generated by Maven that are not there in the Eclipse output.
    Maybe there are some java compiler settings for this?

  • Bytecode class names (nested classes)

    Hi,
    with my JVMTI agent on a 1.5 JVM I found class names like this:
    Lsun.misc.URLClassPath$JarLoader
    Ljava.util.HashMap$Entry
    which show nested classes inside of other classes. The point is, that those nested classes (behind '$') here have a name.
    But what about those:
    Lsun.misc.Launcher$AppClassLoader$1
    Ljava.util.zip.ZipFile$2
    Ljava.lang.Class$1
    Ljava.lang.ref.ReferenceQueue$Null
    They dont have a name? How is this possible? Is it inline creation of an abstract class for example which results in unnamed (and then numbered) nested classes? And what about that "Null" ?
    Robert

    Cross-posted.
    http://forum.java.sun.com/thread.jspa?threadID=738470
    Robert: do not ask your question repeatedly in different areas. At the very least post a link to your question in other areas. Otherwise you waste peoples time, if the question has already been answered somewhere else.

  • Where is the Package Name and Class Name for Android to Facebook SSO?

    Where is the Package Name and Class Name for Android to Facebook SSO?
    I am trying to fill these fields http://developers.facebook.com/docs/mobile/android/build/#ref for Facebook but i can't figure out what to place in Android Package Name and Andorid Class Name,
    same thing for the Android Key Hash, I followed this guide http://www.skoobalon.com/blog/2012/06/13/getting-the-android-key-hash-for-facebook-from-an -air-app/ but I am not sure if it is the right thing to do.
    I was thinking maybe the Pakage Name is air.com.myname.myappname (where com.myname.myappname is also the id used in the application.xml) and the Class name is  air.com.myname.myappname.MyDocumentClass ?
    Is there an official guide somewhere?
    Also do you guys know if there is somewhere a library we can use within AIR to do SSO on Facebook from Andorid?

    For what it's worth, I don't think a WiFi connection would be reliable enough. You wouldn't want your picture to freeze just because a neighbour has turned on their baby monitor. WiFi uses the same frequencies as a myriad of other devices, as well as all your neighbours' WiFi.

  • User Name/Password class for MySQL -- it almost works ... almost

    I'm working on creating a user name/password class called Login that will get the information that is required to log into a MySQL database (This program is not an applet, by the way).
    In brief this class does following:
    * It creates a JFrame with JTextFields and a JPasswordField and a login button. All compents have ActionListener.
    * I am able to read the info from the fields (I tested this using System.out.println)
    * Another program calls this Login class (see code at end of post)
    I want the program to close the frame (I figured that out) and return the values to the calling program. I can't figure out how to have it return a cat string ( of "host|port|username|password" ). If this was one large piece of java source code, it'd be a piece of cake, but the code is broken into several java source components and I'm trying to figure out how to get the ActionListener to return the string.
    One web page mentioned using an ejector but haven't been able to find any information about that. Another thought was maybe putting some kind of code in the windowClosing event for the Login class.
    Ex:
      public void windowClosing(WindowEvent e)
         setVisible(false);
         dispose();
         // return value to calling function somehow
      }Any help would be greatly appreciated. I'm teaching myself this so I'm sure there are better ways to do the JFrame formatting, but here's the code anyway. I'll post the additional changes (in context) when I get a working version of this.
    //Login.java
    import java.awt.*;
    import java.awt.event.*;
    import java.lang.Object;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import javax.swing.*;
    import javax.swing.border.TitledBorder;
    public class Login extends JFrame implements ActionListener
       JTextField serverHost;
       IntTextField port;
       JTextField userName;
       JPasswordField password;
       JButton login;
       Canvas canvas;
       String ServerHost_String;
       String Port_String;
       String UserName_String;
       String Password_String;
       String Login_String;
       Font ssb10 = new Font("Sans Serif", Font.BOLD,10);
       Font hb30 = new Font("Helvetica", Font.BOLD,30);
       Integer rc;
       //public void init()
       public Login()
          // Set up buttons
          login = new JButton("Login");
          serverHost = new JTextField("localhost",10);
          port = new IntTextField(3306, 4);
          userName = new JTextField("root",10);
          password = new JPasswordField(10);
          // Draw Screen
          Canvas horizontal_spacer1 = new Horizontal_Spacer(420,15);
          Canvas horizontal_spacer2 = new Horizontal_Spacer(420,15);
          Canvas horizontal_spacer3 = new Horizontal_Spacer(420,15);
          Canvas horizontal_spacerA = new Horizontal_Spacer(100,45);
          Canvas horizontal_spacerB = new Horizontal_Spacer(100,45);
          Canvas vertical_spacer1 = new Vertical_Spacer();
          Canvas vertical_spacer2 = new Vertical_Spacer();
          Canvas vertical_spacerA = new Vertical_Spacer();
          Canvas vertical_spacerB = new Vertical_Spacer();
           * Top
          canvas = new Top_Logo();
          JPanel top = new JPanel();
          top.add(canvas);
          //top.add(horizontal_spacer1);
          add(BorderLayout.NORTH,top);
           * Middle
          Box p1 = Box.createHorizontalBox();
          Box p2 = Box.createHorizontalBox();
          Box p3 = Box.createHorizontalBox();
          JPanel bp = new JPanel();
          JLabel rbp = new JLabel();
          p1.setFont(ssb10);
          p2.setFont(ssb10);
          p3.setFont(ssb10);
          p1.setAlignmentX(Component.LEFT_ALIGNMENT);
          bp.setAlignmentX(Component.LEFT_ALIGNMENT);
          p3.setAlignmentX(Component.LEFT_ALIGNMENT);
          rbp.setLayout(new BoxLayout(rbp,BoxLayout.X_AXIS));
          rbp.setBorder(new TitledBorder("Connection to MySQL Server Instance"));
          JLabel lString = new JLabel("Server Host: ");
          lString.setFont(ssb10);
          // Setup server Host and Port JPanel
          p1.add(lString);
          p1.add(serverHost);
          lString = new JLabel("  Port: ");
          lString.setFont(ssb10);
          p1.add(lString);
          p1.add(port);
          // Setup username JPanel
          lString = new JLabel("Username:    ");
          lString.setFont(ssb10);
          p2.add(lString);
          p2.add(userName);
          // Setup password JPanel
          lString = new JLabel("Password:    ");
          lString.setFont(ssb10);
          p3.add(lString);
          p3.add(password);
          // Draw the big Jpanel
          //bp.add(horizontal_spacerA);
          bp.add(p1);
          bp.add(p2);
          bp.add(p3);
          //bp.add(horizontal_spacerB);
          rbp.add(vertical_spacerA);
          rbp.add(bp);
          rbp.add(vertical_spacerB);
          add(BorderLayout.WEST,vertical_spacer1);
          add(BorderLayout.CENTER,rbp);
          add(BorderLayout.EAST,vertical_spacer2);
          // Bottom
          JPanel bot = new JPanel();
          bot.setLayout(new BoxLayout(bot,BoxLayout.Y_AXIS));
          bot.add(horizontal_spacer2);
          bot.add(login);
          bot.add(horizontal_spacer3);
          add(BorderLayout.SOUTH,bot);
          // Draw JFrame
          setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          setSize(420,280);
          setResizable(false);
          setVisible(true);
          // Listen for buttons being clicked
          login.addActionListener(this);
          serverHost.addActionListener(this);
          userName.addActionListener(this);
          port.addActionListener(this);
          password.addActionListener(this);
       class Horizontal_Spacer extends Canvas
          Horizontal_Spacer(int X, int Y)
             setSize(X,Y);
             setVisible(true);
       class Vertical_Spacer extends Canvas
          Vertical_Spacer()
             setSize(25,10);
             setVisible(true);
       class Top_Logo extends Canvas
          Top_Logo()
             setBackground(Color.white);
             setSize(420,65);
             setVisible(true);
          public void paint(Graphics g)
               g.setFont(hb30);
               g.drawString("MySQL Login",20,45);
       public void actionPerformed(ActionEvent event)
          Object source = event.getSource();
          ServerHost_String=serverHost.getText();
          Port_String=port.getText();
          UserName_String=userName.getText();
          Password_String=new String(password.getPassword());
          if ((ServerHost_String.compareTo("")!=0) &&
              (Port_String.compareTo("")!=0) &&
              (UserName_String.compareTo("")!=0) &&
              (Password_String.compareTo("")!=0))
               Login_String=ServerHost_String + "|" +
                            Port_String + "|" +
                            UserName_String + "|" +
                            Password_String;
               setVisible(false);
               dispose();
          public void windowClosing(WindowEvent e)
            setVisible(false);
            dispose();
    //Login_Test.java
    import javax.swing.*;
    public class Login_Test extends JFrame
       //public void run()
       public static void main(String [] args)
          Login f = new Login();
    }Doc

    Let me get this clear.
    You want a login dialog.
    Some program calls the dialog and waits untile user respond
    once the user press ok or cancel it reutrn the users input to the caller.
    You can do this directly using JFrame
    but you can do it wil JDialog if you use it as aModal dialog.
    it will look like this
    class LogInDialog  extends JDialog implements ActionListener{
       String value;
       public LogInDialog(){
          setModel(true);
        // This is what you invoke
        public String loadDialog(){
            setVisible(true);
            return value;
        public void actionListener(..... e){
            if (e.getSource() == bCancel)
               value = null;
            else if (e.getSource() == bOk)
               value = //generate the string
            dispose();
    }

  • Name.class and Name$1.class

    Hi there !
    When I compile certain source codes, I've noticed that the result contains two (or more) classes which are named for example Name.class and Name$1.class.
    What does that $1 mean ?
    Thanks,
    - Miika -

    The Name$1.class is an anonymous inner class of the Name1 class. Its just a naming convention in java.

  • Object Custom Program Name of class RE and language EN does not exist

    Hi All,
             We are getting this bbelow error while running a custome program ,
    Object <Custom Program Name> of class RE and language EN does not exist
    Do any one has faced this similar issue earlier.
    Regards,
    Sen

    Hi,
    How did you resolve this problem ?
    Re: Object <Custom Program Name> of class RE and language EN does not exist.
    I am also encountering the same issue when I am executing the report.
    Regards,
    SSR.

  • Error in File name or class name not found during Automation operation: 'CreateObj​ect'

    Hello Team,
    When I am trying to execute the below code i am getting the following error. Any help would be greatly appreciated.
    Set oFSO = CreateObject("Scripting.FileSystemObject")
    If Not oFSO.FolderExists(SavePath) Then
    Set f = oFSO.CreateFolder(SavePath)
    Else
    End If
    53 4/11/2014 12:27:22 PM Error:
    Error in <NoName(4).VBS> (Line: 9, Column: 1):
    File name or class name not found during Automation operation: 'CreateObject'
    I have googled through the error and tried to re-register the scrrun.dll using regsvr32 eventhogh it is successfully registered, i am getting the following error. My PC is windows 7 32bit OS.
    any help is greatly appreciated.

    The following script class will write a log file entry. See if it will run for you.
    The script is using a class object that you might not have seen before. A little intro:  The top section is just for testing the class. Normally I just comment this out after the class is working well.  It should run right way. I would save the vbs file in the editor, That way when you are using autoactpath or currentscriptpath variables they will be able resolve the paths.
    Paul
    Attachments:
    LoggingCode_V2.VBS ‏5 KB

  • Why java file name and class name are equal

    could u explain why java file name and class name are equal in java

    The relevant section of the JLS (?7.6):
    When packages are stored in a file system (?7.2.1), the host system may choose to enforce the restriction that it is a compile-time error if a type is not found in a file under a name composed of the type name plus an extension (such as .java or .jav) if either of the following is true:
    * The type is referred to by code in other compilation units of the package in which the type is declared.
    * The type is declared public (and therefore is potentially accessible from code in other packages).
    This restriction implies that there must be at most one such type per compilation unit. This restriction makes it easy for a compiler for the Java programming language or an implementation of the Java virtual machine to find a named class within a package; for example, the source code for a public type wet.sprocket.Toad would be found in a file Toad.java in the directory wet/sprocket, and the corresponding object code would be found in the file Toad.class in the same directory.
    When packages are stored in a database (?7.2.2), the host system must not impose such restrictions. In practice, many programmers choose to put each class or interface type in its own compilation unit, whether or not it is public or is referred to by code in other compilation units.

  • I'm in Final Draft (screenwriting prgram) and hit Save as PDF and a window opens stating that the printer name is invalid - what am I doing wrong?

    I'm in Final Draft (screenwriting prgram) and hit Save as PDF and a window opens stating that the printer name is invalid - what am I doing wrong?

    Final Draft, Inc. - Search: printer name invalid

  • Object Program Name of class RE and language EN does not exist

    Hi,
    I'm encoutering this problem.
    Object <Custom Program Name> of class RE and language EN does not exist
    This appears when i am executing the report .
    Has anyone encoutered this? How did you resolve this problem?
    Any pointers in this regard are appreciated.
    Regards,
    SSR.

    Hi,
    This must be coming from the one of the function module exceptions that you are calling in the method. Put break points at all function module calls and find out the reason.
    Thanks,
    Naveen Inuganti.

  • If i want to install any software or update it is asking administrator name and password. what is administrator name

    if i want to install any software or update it is asking administrator name and password. what is administrator name

    When the computer was first set up you created an account and assigned a password to it. That first account is your admin account.

  • Change Prg name in classes using abap code

    Hello Experts,
    I'm having following req:-
    I need to change program name using abap code .
    I have prepared report which changing prg name & also it is replecting target name into T-code & Programes where source prg name is being used.
    My next req is i want to replace sorce prg name in Classes usinf abap coding.
    <Priority normalized by moderator>
    Thanxs in Advance.
    Moderator message : Requirements dumping not allowed, thread locked.
    Edited by: Vinod Kumar on Feb 7, 2012 12:32 PM

    The application name is not necessarily uniqueue! Customers may create two applications with same name in different systems/clients and transport them into the same target system/client!
    You do the mapping with the query:
    CL_FDT_FACTORY=>GET_INSTANCE( )->GET_QUERY()->...
    There are two methods. One for mapping ID to name and one for name to ID.
    There is also a sample report in package SFDT_DEMO_OBJECTS.

  • Wrong class name inside class file

    Hi@all!
    I wrote a normal applet, and there are no compiling errors.
    But if I try to run it in my netscape 4.77 following exception occurs:
    >>
    Applet exception: error: java.lang.ClassFormatError: Wrong class name inside class file
    >>
    Does anybody know, where the problem is?
    Please help!!!!!
    Thank you!

    I'm not sure but here's a couple ideas. If the class is a public class, then the name of the .class file and the class must be identical and remember that java is case sensitive. Second thought is a class that is defined to be part of a package must reside in a directory that matches the package name.
    If you post more info, you might get a better answer.

  • If I know a name of class , how can I get it's attribute and methods

    If I know a name of class , how can I get it's attribute and methods as well as it's detail information by ABAP code ?
    Best regards ,

    HI, Chandra ,
    Thank you very much , I can get the result
    Best regards,
    DATA lo_class TYPE REF TO cl_oo_class.
    DATA lt_attribs TYPE seo_attributes.
    FIELD-SYMBOLS: <attrib> TYPE vseoattrib.
    TRY.
        CREATE OBJECT lo_class
          EXPORTING
            clsname = 'CLASS_NAME'.
      CATCH cx_class_not_existent .
    ENDTRY.
    lt_attribs = lo_class->get_attributes( ).
    BREAK-POINT.

Maybe you are looking for

  • Route is not getting updated in billing

    Hi all, I have a freight condition type which is having the key combination of plant & Route (werks/route). we give route manually in the delivery document header but it is not getting updated in billing item and because of that billing item is not p

  • Netra T1 105, Unresponsive after installing LOM 2.0

    I recently purchased a used Netra T1 105, which is running SunOS 5.9. After purchasing the server, I attempted to install the "Lights Out Management 2.0" software. I then proceeded to attempt to upgrade the LOM firmware, by running "lom -G default".

  • Dynamic queries in weblogic

    In case of dynamic queries, I found out that the finder method can not be defined in the Home class. I defined the finder method in the Bean. In my Bean, this is the code: public Collection findAllActivities(String filter, Object[] arguments) throws

  • PI best practice and integration design ...

    Im currently on a site that has multiple PI instance's for each region and the question of inter-region integration has been raised my initial impression is that each PI will be in charge of integration of communications for its reginal landscape and

  • Change Description of a Query

    Hi, I made a copy of a query. I want to change the description of the query. How do I do this? Thanks NEWBW