Moneydance.class in top-level directory (unnamed package)

Carlos Silveira's Avatar

Carlos Silveira

27 Jul, 2019 09:40 AM

Hello. I am trying to set up Eclipse IDE for extensions debugging in a Mac. I've followed all the instructions on the posts of this forum. However, no matter the way I change the configurations of Eclipse, when I try to run the application (using the provided myextension), I always get the following error:

Error occurred during initialization of boot layer
java.lang.module.FindException: Unable to derive module descriptor for /Applications/Moneydance.app/Contents/Java/moneydance.jar
Caused by: java.lang.module.InvalidModuleDescriptorException: Moneydance.class found in top-level directory (unnamed package not allowed in module)

Google searchs of this error lead to several posts saying that you indeed cannot put a class in the default (unnamed package). Inspecting the moneydance.jar file, I've found that the moneydance.class is actually in the default package (see attached file). I believe that is the cause of the error, but, at the same time, I guess I must be doing something wrong, since many others have succeeded in setting up Eclipse, using this same moneydance.jar file.

Any help would be greatly appreciated.

Thank you,
Carlos

  1. Support Staff 1 Posted by Sean Reilly on 27 Jul, 2019 07:06 PM

    Sean Reilly's Avatar

    Hi Carlos,
    Great question! The top level Moneydance class actually shouldn't be used
    and is just a shortcut which invokes the
    com.infinitekind.apps.md.controller.Main class. If you use that
    package+class it should start Moneydance.

    Thanks,
    Sean

  2. 2 Posted by Carlos Silveira on 28 Jul, 2019 09:32 AM

    Carlos Silveira's Avatar

    Hi Sean,

    Thanks for the prompt reply! I was referencing the Moneydance Main class in the Run/Debug configurations of Eclipse, as per the references I found (e.g.: https://infinitekind.tenderapp.com/discussions/moneydance-development/824-debugging-moneydance-extensions-in-eclipse). I tried your suggestion above, but got the same result: Eclipse complains about the Moneydance Main class in the default package, even using com.moneydance.apps.md.controller.Main.

    However, It occurred to me to try it on Intelli J IDEA and guess what? It works both ways! Apparentely, Eclipse is more strict with the structure of the project.

    On the other hand, in spite of the fact that Moneydance actually launched on Intelli J, it starts in demo mode, with no extensions installed, as if it was the first time I was opening it. Any thoughts on that?

    Thanks,
    Carlos

  3. Support Staff 3 Posted by Sean Reilly on 28 Jul, 2019 10:06 PM

    Sean Reilly's Avatar

    Hmm... maybe Eclipse requires all classes to be in modules and we just haven't started using them in Moneydance yet.

    As for the app showing up in demo mode and with no extensions when run from IDEA, that would happen when run from a mac, because our shipping version of Moneydance is packaged as a sandboxed app which stores its documents, preferences, and extensions in a different location. If you're also on a mac then the folder used for documents, preferences, and extensions will be under ~/Library/Application Support/Moneydance/

    Thanks,
    Sean

  4. 4 Posted by Carlos Silveira on 29 Jul, 2019 09:46 AM

    Carlos Silveira's Avatar

    Yes, maybe Eclipse requires that. I will stick to Intelli J, it is working just fine.

    Thanks for the explanation about the way Moneydance works on a mac. It solved the demo mode issue. Now I can start working on the extension I need :).

    Thanks and best regards,
    Carlos

  5. System closed this discussion on 28 Oct, 2019 09:50 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac