tag:infinitekind.tenderapp.com,2009-01-14:/discussions/moneydance-development/7039-extension-development-in-eclipseInfinite Kind: Discussion 2022-05-21T02:20:20Ztag:infinitekind.tenderapp.com,2009-01-14:Comment/502075522022-02-18T08:10:23Z2022-02-18T08:10:23ZExtension Development in Eclipse<div><p>You seem to have basic Java modules undefined - e.g. javax.swing. I would start by creating a new Java project with defaults etc and check that basic Java links. Only then add in MD.</p>
<p>I can’t help exactly, but for me using IntelliJ, with Jython, I had trouble initially getting Java linked and it took some playing with the settings to get the project settings, sources, and Java libraries set up properly.</p>
<p>To set my Jython project up, I had to create a Project with Python 2.7 as the SDK (yours would be Java 15 or 17, add a moneydance.jar as a Library, add a Java Module called Moneydance (link the Library, and assign the SDK adopt-openjdk-15 (Hotspot) (or Java 17 azul/zulu).</p>
<p>Lastly, whilst directed at Jython, some of this may be of interest:<br>
<a href="https://yogi1967.github.io/MoneydancePythonScripts/">https://yogi1967.github.io/MoneydancePythonScripts/</a><br>
<a href="https://raw.githubusercontent.com/yogi1967/MoneydancePythonScripts/master/source/extension_tester/readme.txt">https://raw.githubusercontent.com/yogi1967/MoneydancePythonScripts/...</a></p>
<p>Sorry not of more help.</p></div>Stuart Beesley (Mr Toolbox)tag:infinitekind.tenderapp.com,2009-01-14:Comment/502075522022-02-18T09:26:22Z2022-02-18T09:27:22ZExtension Development in Eclipse<div><p>Hi, as Stuart has pointed out your build path seems to be lacking the basic jars. As suggested create a Java project from Eclipse. Copy your source files to the newly created source directory. Do this from with in Eclipse so it creates the packages correctly. You will get a file structure like this:</p>
<p>src<br>
--com</p>
<p>----moneydance</p>
<p>-----modules</p>
<p>-------features</p>
<p>---------extensionname</p>
<p>-------------source files</p>
<p>Right click on your new project, select 'properties', select 'Java Build Path/Libraries'</p>
<p>Make sure there is a JRE System Library listed, if not add a Library</p>
<p>You need to add the Moneydance jars.</p>
<p>Add External Jars under Classpath, do this by selecting the jars from your Moneydance installation, they are in the directory lib.</p>
<p>By doing this your project should build within Eclipse. You will still need to build your extension outside of Eclipse using ant and the build file.</p>
<p>Once built, run Moneydance outside of Eclipse andd add your extension to it.</p>
<p>In Eclipse select Run/run Configurations.<br>
Create a new entry selecting your new project as the Project, enter 'Moneydance' as the class.<br>
Save<br>
Click on Run and select your project. This should run Moneydance from within Eclipse. Once this works you can then set breakpoints within your extension and run it using Debug.</p>
<p>Hope this helps, let me know if you run into issues. Please provide as much information as you can. At least I will need to know the OS you are using, version of Eclipse, version of Moneydance and screen shots of the errors you are encountering.<br>
Regards<br>
Mike</p></div>Mike Bray (Quote Loader Author)tag:infinitekind.tenderapp.com,2009-01-14:Comment/502075522022-02-19T02:12:26Z2022-02-19T02:12:29ZExtension Development in Eclipse<div><p>Stuart & Mike,</p>
<p>Thank you for getting me pointed in the right direction. The issue was two-fold. First, when I installed Eclipse, I only had the "regular" consumer version of Java installed, 1.8. I then replaced that with Java 17, and I thought I'd told Eclipse where the new source files were, but something wasn't right. I eventually completely removed eclipse, all the workspace directories and started again. To solve the moneydance references, I had originally entered the moneydance under Modulepath. Once I changed that and placed them in Classpath, that pretty much fixed things.</p>
<p>A couple of last items, under Run Configurations, I had to select "Include system libraries when searching for a main class", otherwise, it would not run 'cus it couldn't find a main class.</p>
<p>I'm going to summarize all of this in a new post as a reference for others.</p>
<p>Thanks again.</p></div>Quercus47