Problem with CLASSNAME + $1, $2 etc.

Discussion in 'Plugin Development' started by PlayFriik, Jun 15, 2015.

Thread Status:
Not open for further replies.
  1. Offline


    Hey. I am having problem with Eclipse what is creating class files named as ClassName.class, ClassName$1.class etc in his \bin folder. Is there any way of disabling him for creating this kind of files? Because these $$$ files are creating NoClassDefFound errors... :/

    Picture of what I mean:
  2. Offline


    @PlayFriik These files are inner classes. For example, when you create a new runnable, you may use
    Bukkit.getScheduler().schedule(new Runnable() {
        public void ..... etc.
    These are important and can be solved by creating them separately and referring to these instead of nested classes.
  3. Offline


    @DJSkepter Those aren't inner classes. Those are anonymous classes.
    DJSkepter and 1Rogue like this.
  4. Offline

    1Rogue Retired Staff

    You're thinking of:

    1. public class SomeClass {
    3. private static class InnerClass {
    5. //...
    7. }
    9. }

    This is a part of java, if you're getting NoClassDefFoundErrors your classes are either unable to initialize or they're not being moved into the jarfile.
    DJSkepter likes this.
  5. Offline


    @DJSkepter Hmm, okay, that's so weird, because my listener is working nicely, the only problem is that it is throwing errors.. :eek:
Thread Status:
Not open for further replies.

Share This Page