Results 1 to 8 of 8
  1. #1
    tilleyrw is offline Member
    Join Date
    Jan 2012
    Posts
    3
    Rep Power
    0

    Default How generic is this class? Where can I get a copy?

    As part of my daughter's science project on Astronomy, I wish to use the software, CODES (Comet Orbit Determination and Ephemeris Software).

    While the main website is gone, the Internet Wayback machine allowed me to download the project files minus one. The missing file is GUI$1.class.

    Google returns so many references to "GUI$1.class" that I am led to think it's a generic file. Where can I find a copy of this .class file?

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,846
    Rep Power
    19

    Default Re: How generic is this class? Where can I get a copy?

    That's an inner class of GUI.
    It's not generic in any way.

    Does the wayback machine have the source code? I notice the link to it on that page.

  3. #3
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,371
    Blog Entries
    7
    Rep Power
    20

    Default Re: How generic is this class? Where can I get a copy?

    GUI$1.class is the compiled form of an anonymous class; the compiler generates a name for it (here: GUI$1). If you have the sourses, don't bother about it because it will be generated again if you compile the GUI.java class source again.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,846
    Rep Power
    19

    Default Re: How generic is this class? Where can I get a copy?

    In fact yes it does.
    I'd recompile it, which shouldn't be a problem since you have the other classes.
    Get the GUI.java into the same directory as the other class files you've managed to get hold of then, in a cmd prompt in that directory:
    javac -cp . GUI.java

  5. #5
    tilleyrw is offline Member
    Join Date
    Jan 2012
    Posts
    3
    Rep Power
    0

    Default Re: How generic is this class? Where can I get a copy?

    I am a complete newcomer to Java. A slew of errors arise when issuing a ":tilleyrw$ javac -cp . GUI.java" command, the following errors occur.

    Without even reading the code I think that the errors seem related as from the one "GUI.java:510" error about not finding the symbol, the rest of the errors are of a similar nature lower down. As though a class was not found.

    Searching on the web (Google) indicates that these are well-established and error-free codings, so I am hesitant to declare the code has errors.


    robert-tilleys-imac:CODES tilleyrw$ javac -cp . GUI.java
    GUI.java:510: cannot find symbol
    symbol : class Graphing
    location: class GUI
    Graphing gp = new Graphing();
    ^
    GUI.java:510: cannot find symbol
    symbol : class Graphing
    location: class GUI
    Graphing gp = new Graphing();
    ^
    GUI.java:11018: cannot find symbol
    symbol : variable include_asteroid_ring
    location: class MinorPlanet
    else if ((mp.number_of_planets == 310) && (mp.include_asteroid_ring == false))
    ^
    GUI.java:11020: cannot find symbol
    symbol : variable include_asteroid_ring
    location: class MinorPlanet
    else if ((mp.number_of_planets == 310) && (mp.include_asteroid_ring == true))
    ^
    GUI.java:11119: cannot find symbol
    symbol : variable include_asteroid_ring
    location: class MinorPlanet
    mp.include_asteroid_ring = false;
    ^
    GUI.java:11123: cannot find symbol
    symbol : variable include_asteroid_ring
    location: class MinorPlanet
    mp.include_asteroid_ring = false;
    ^
    GUI.java:11127: cannot find symbol
    symbol : variable include_asteroid_ring
    location: class MinorPlanet
    mp.include_asteroid_ring = false;
    ^
    GUI.java:11131: cannot find symbol
    symbol : variable include_asteroid_ring
    location: class MinorPlanet
    mp.include_asteroid_ring = true;
    ^
    8 errors

  6. #6
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: How generic is this class? Where can I get a copy?

    Are you at the root of the source tree when you use -cp . ? If the classes are in a package, you'd need to be. For example, if the class is some.package.GUI, you would need to be in the directory containing the /some/package directory tree, not in the /some/package directory itself.

    Is there a Graphing.java file in the same package as GUI.java? Or is there an import statement at the top of GUI.java that mentions the Graphing class, and if so, is there an error about that?
    Get in the habit of using standard Java naming conventions!

  7. #7
    tilleyrw is offline Member
    Join Date
    Jan 2012
    Posts
    3
    Rep Power
    0

    Default Re: How generic is this class? Where can I get a copy?

    Yes, I am in the directory "CODES" which contains all the program files.

    In the file "GUI.java", the first instance of "Graphing" in the program is:

    /* Define gp to be an instance of the Graphing class; it can then be used to trigger graphs of results. */
    Graphing gp = new Graphing();

    There is no import statement with "Graphing". How can I find where this class should be defined?

    As I'm missing "GUI$1.class" I think I may be out of luck here.

  8. #8
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: How generic is this class? Where can I get a copy?

    That implies that there should be a Graphing.java in the same directory.

    You need not be concerned with GUI$1.class. That file will be created if GUI.java ever compiles successfully.
    Get in the habit of using standard Java naming conventions!

Similar Threads

  1. Map<T,T> possible in non-generic class?
    By Tim99 in forum New To Java
    Replies: 9
    Last Post: 01-12-2012, 04:49 PM
  2. help with implementing Generic Array class
    By aqeel2010 in forum New To Java
    Replies: 2
    Last Post: 11-29-2011, 08:40 AM
  3. Writing generic array class
    By aqeel2010 in forum New To Java
    Replies: 6
    Last Post: 11-29-2011, 06:01 AM
  4. How to check instance of a generic class?
    By chan_nguyen in forum New To Java
    Replies: 7
    Last Post: 09-08-2010, 04:20 AM
  5. A simple generic class
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-17-2008, 07:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •