Avoid *$1.class files after the compilation

Hi
i made an applet called ChatClientApplet.java ... As a result from the Compilation, I receive the classes
ChatClientApplet.class
ChatClientApplet$1.class
ChatClientApplet$2.class
I'd like to avoid these $ files or to choose a different character... How can i do that?
Thank's
Fabio
[email protected]

Don't use inner classes. If you use inner classes you always get classes with a $ inside it.
Use outer classes to avoid this naming.
Uwe

Similar Messages

  • Getting generated class files using the compiler api??

    I am writing a compiler/IDE for java, and i use the new JavaCompiler API
    (javax.tools.JavaCompiler)
    i want to ask, is it possible to get the generated class file(compiled file) names??
    can anyone help me with this, read at the documentation and i have no idea which one is used to do such thing..
    Or is it impossible??
    Thanks, please guide me on this..

    E.D.-inc wrote:
    I am writing a compiler/IDE for java, and i use the new JavaCompiler API
    don't.
    i want to ask, is it possible to get the generated class file(compiled file) names??
    yes, probably (after all, other tools can do it). Don't ask me how though, I've never had a need to.
    can anyone help me with this, read at the documentation and i have no idea which one is used to do such thing..
    no. Someone else reading the documentation for you won't help you any. Read it yourself, you might learn something.

  • How do i transfer a compilation photo file from iPhoto consisting of canon(img) and lumix(p..) in the order i compiled them to a usb stick as at the moment it is putting all the lumix files after the canon files?

    I have a macbook pro 15 inch retina 16 gb 1600mhz 2.7intel i7 osx 10.8.5
    I have just put together an iPhoto file of wedding photos consisting of a compilation of images from my canon(img files) and lumix(p..files) I want to know how to transfer them to a usb stick in the order i compiled them as at the moment it is putting all the lumix files after the canon files which is not how i want to present them to the newlyweds?

    Files are ordered by the file-viewer being used.  What viewer are you using, and what data field are you sorting by?
    In Finder, as in most applications, you can select the data field to sort by clicking a column header.  Clicking the selected header will reverse the sort.
    This is the Aperture forum, but what applies to Aperture is likely also true for iPhoto:  if you want to be able to sort your files in a specific order in a file-viewer, you should give them names that allow for sorting in that order when the name field is selected as the data field to sort by.  In Aperture, one creates new files by exporting, and one uses a File Naming Preset to name the files.  The File Naming Preset can start with an ordinal count or a sequence number.  Either of which will allow you to retain your order when viewing your files in a file viewer.

  • How to access a class file outside the package?

    created a two java files Counter.java and TestCounter.java as shown below:
    public class Counter
         public void print()
              System.out.println("counter");
    package foo;
    public class TestCounter
         public static void main(String args[])
              Counter c = new Counter();
              c.print();
    Both these files are stored under "D:\Test". I first compiled Counter.java and got Counter.class which resides in folder "D:\Test"
    when i compile TestCounter.java i got the following error message:
    D:\Test>javac -classpath "d:\Test" -d "d:\Test" TestCounter.java
    TestCounter.java:6: cannot find symbol
    symbol : class Counter
    location: class foo.TestCounter
    Counter c = new Counter();
    ^
    TestCounter.java:6: cannot find symbol
    symbol : class Counter
    location: class foo.TestCounter
    Counter c = new Counter();
    ^
    2 errors
    what could be the problem. Is it possible to access a class file outside the package?

    ya that's fine..if we have two java files where both resides in the same package works fine or two java files which donot have a package statement also works fine. But my doubt is, i have a Counter.class which does not reside in a package and i have a TestCounter.class which resides in a package "foo", in such a scenario, how do i tell to the compiler that "Counter.class resides in such a path, please look at that and give me TestCounter.class". i cannot use import statement to import Counter.class in TestCounter.java because i donot have a package for Counter.java.

  • How to find the location of controller class file on the server

    Hi OAF Experts,
    We have a extended controller in which we are making some changes. We have compiled the java file.
    Now we want to deploy the .class file on the server. When we search on the server where we need to deploy the class file, we find two to three paths. Is there a way from which we can decide which path is actually referred ?
    Is there a front end page available from where we will be gettng these details??
    Regards
    Samarth

    Hi,
    You can get the complete path from front end.
    On 'About this Page', there is a section for 'Business Components'. When you expand that, you can see all the controllers used with complete path.
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Two class files with $ on compile

    Hello friends, I have a simple java program, that consists of two classes, coded in the the same java file.
    One of hte classes extends Thread.
    When I compile the source file, I get one class file for the base class, and two for the other one - ClassName.class and ClassName$1.class.
    Why is the second one created?

    The ClassName$1.class is a class file for an anonymous inner class. You create them with code likebutton.addActionListener(new ActionListener() {
         actionPerformed(ActionEvent ae) {
              System.out.println("button was pressed");
    });This particular example is from the GUI world where event listeners are commonly created using anonymous inner classes. There's a separate file for it just because there's always exactly one class file for each class.

  • How to add class file to the project in netbean

    Hi,
    I am not sure if it is the right place to put the question. I just cannot find the way to add my existing java class file into the project in net bean.
    Anyone can help?
    Thanks a lot

    Look at the "classpath" entry on the Index tab in NB's Help. There are entries there that explain how to add existing classes and libraries to a project.

  • 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

  • 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 use Auto Import to name files after the folder they are dropped into?

    I'm camera tethered on a new Macbook Pro Retina, Lightroom 5, all latest software and OS. Using  EOS Utility to connect and drop into a DROP folder. When Lightroom Autoimports, I would like it to rename the file after the destination folder. Capture One has this feature and I could have sworn I saw a drop down menu on one of the naming tokens in LR5 about a month ago.  ANY IDEAS?

    The closest you can come is to create a File Naming Template that includes "Custom Text" as a part of the file name.  Then, you will have to change the Auto Import Settings to use this Template when auto-importing and manually type that folder name in every time you change folders.  There is no "Folder" token of which I am aware.

  • Creation of class files on the spot

    I have read in an article that a class loader (generally a subclass of the abstract class ClassLoader can load classes from the local disk, fetch them across a net using a protocol, or it can just create the byte code on the spot.
    How can a class loader create files on the spot? Or, better: why would a class loader create a class file on the spot?

    It's rare, here's an admittedly contrived example.
    You have a database table, and you'd like to create a collection of objects that mirrors the collection of rows in the table. So you collect all of the types and names of each column, and create a new Java class with getter/setter methods for these columns, along with the private member variables themselves. If this class followed the JavaBean style, you could manipulate these objects and use them dynamically using bean tools.

  • Running class files from the windows command line...

    Hello Everyone,
    My instructor showed us a way to run class files from the windows command line. However every time I try to run the class file from the command line using a command like: java CruiseHelper.class
    I get an error that states "Exception in thread "main" java.lang.NoClassDefFoundError: CruiseHelper/class"

    Hello Everyone,
    My instructor showed us a way to run class files from
    the windows command line. However every time I try
    to run the class file from the command line using a
    command like: java CruiseHelper.class
    I get an error that states "Exception in thread
    "main" java.lang.NoClassDefFoundError:
    CruiseHelper/class"Classes are not file names. You don't have a class named "CruiseHelper.class", that's a file name. The class name is just CruiseHelper (if you have no package statement in it).
    So,
    java -classpath . CruiseHelper

  • [svn] 1091: compiler: class renaming in the compiler package

    Revision: 1091
    Author: [email protected]
    Date: 2008-04-03 13:32:09 -0700 (Thu, 03 Apr 2008)
    Log Message:
    compiler: class renaming in the compiler package
    * flex2.compiler:Context to CompilerContext
    * flex2.compiler.util:Console to ConsoleLogger
    Bugs: n/a
    QA: No
    Doc: No
    Modified Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/API.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/CompilationUnit.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/CompilerSwcContext.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/PersistenceStore.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/Source.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/SymbolTable.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/abc/Compiler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/Compiler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/EmbedExtension.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/StyleExtension.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/SyntaxTreeEvaluator.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/DataBindingExtension. java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/DataBindingFirstPassE valuator.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/TypeAnalyzer.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/genext/GenerativeSecondPassEv aluator.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/ASDocExtension.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/Compiler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/i18n/Compiler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationCompiler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/AbstractDocumentBuil der.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/MxmlDocument.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/tools/oem/internal/OEMConsole.java
    Added Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/CompilerContext.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/ConsoleLogger.java
    Removed Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/Context.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/Console.java

    Out of curiosity, do you have a directory called WEB-INF inside of
    MyPortal\portalApp\portlets\WFWeb? If so, can you try removing/renaming it?
    "Gavin" <[email protected]> wrote in message
    news:40581f2e$[email protected]..
    >
    I create a Application naming "MyPortal" in WorkShop.
    And create a Project naming "portalApp".
    In folder "portalApp", I create a folder "portlets"
    And create a PageFlow in folder "portlets", so I get a jpf naming"WFWebController.jpf"
    >
    >
    W:\bea\user_projects\applications\MyPortal\portalApp\portlets\WFWeb\WFWebCon
    troller.jpf
    >
    But I add some java code in the method of WFWebController.jpf
    when I run the WFWebController.jpf from workshop
    the compiler throws a ERROR message "A PageFlowController at the root ofthe web
    application must be in the default package."
    Have any solution about this ERROR ?
    Thanks,
    Gavin.

  • Will the MacBook Pro w/retina display continue to download a file after the screensaver comes on?

    does the Mac book Pro w/ retina continue to download a file after the screensaver comes on?

    Hi scootsmama,
    Network connections should still continue if the computer has only gone to the screensaver or display sleep. On a portable machine, when the machine goes to sleep it closes the network connection. You may find the following article helpful:
    What happens when the Mac goes to sleep (not just into idle mode or display sleep)?
    On all Macs:
    The microprocessor goes into a low-power mode
    Video output is turned off, and a connected display may turn off or enter its own idle state
    Apple-supplied hard disks spin down; third-party hard disks may spin down
    On portable Macs:
    The Ethernet port turns off, if applicable (see note below)
    Expansion card slots turn off
    The built-in modem, if present, turns off (see note below)
    An AirPort card, if present, turns off (see note below)
    The USB ports only responds to the power key on an external keyboard (see below)
    The optical media drive, if present, spins down
    Audio input and output turns off
    Keyboard illumination, if a feature of your portable computer, turns off
    A computer uses considerably less power when in sleep mode than when awake. The computer will continue to power RAM in sleep mode, so that whatever was in RAM when the computer went to sleep will still be there when the computer wakes. This also means that computers with more RAM use slightly more power in sleep mode.
    Note: Portable computers have no network connectivity when in sleep mode, but can wake if the Energy Saver option "Wake for network access" is enabled. If you wish to use file sharing or don't want to interrupt your Internet connection, you should not manually put the computer to sleep, and you should drag the "Computer sleep" slider to Never.
    Apple Support: About Energy Saver sleep and idle modes in Mac OS X
    http://support.apple.com/kb/ht2412
    Regards,
    - Brenden

  • Hello. Can I still use the forms central to modify my pdf.-files after the software is not supported by adope?

    Hello. Can I still use the forms central to modify my pdf.-files after the software is not supported by adope?

    Formscentral isn't designed to allow for the modification of PDF files, forms or otherwise. If you have saved forms created in Formscentral as PDF you will continue to be able to modify them in a program like Acrobat. Hope this helps.
    Andrew

Maybe you are looking for

  • How do i find the version for my garage band software?

    How do i find the version of my Garage Band software?

  • Logs for LO extraction

    Hi , How to find the logs for the LO extraction that have been done already ? Is there a provision to see date wise ? What does the Log file convey to us ? How we can we the log file effectively ? Regards kumar

  • Query - Performance plzz help

    Hi All, I would like to tune the following query in a better manner SELECT hou.NAME organization_name        ,haou.name parent_org_name        ,msi.secondary_inventory_name sub_inventory_code        ,msi.availability_type nettable_sub_inventory      

  • Null handling with greatest function

    Hi , My oracle version is 10.2 and I am trying to get max value from three dates. col1,                col2,               col3                                max_date *12/4/2007 12/5/2009 7:14:57 PM* col1 value is null . so when I use below sql sele

  • Lightroom has stopped opening up images into PS

    Hello,<br /><br />All of a sudden Lightroom has developed a new problem for me. In the Develop module when I right click on an image and go to open in Photoshop, I get this message:<br /><br />Lightroom was unable to prepare the the selected file at