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

    PlayFriik

    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:
    http://i.imgur.com/zpRyN6k.png
     
  2. Offline

    DJSkepter

    @PlayFriik These files are inner classes. For example, when you create a new runnable, you may use
    Code:
    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

    _Filip

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

    1Rogue Retired Staff

    You're thinking of:

    Code:java
    1. public class SomeClass {
    2.  
    3. private static class InnerClass {
    4.  
    5. //...
    6.  
    7. }
    8.  
    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

    PlayFriik

    @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