{"id":2746,"date":"2022-01-16T08:41:32","date_gmt":"2022-01-16T08:41:32","guid":{"rendered":"https:\/\/mindfusion.eu\/blog\/?p=2746"},"modified":"2022-02-05T16:14:30","modified_gmt":"2022-02-05T16:14:30","slug":"3-ways-to-add-a-local-jplanner-jar-to-your-project-in-apache-netbeans","status":"publish","type":"post","link":"https:\/\/mindfusion.dev\/blog\/3-ways-to-add-a-local-jplanner-jar-to-your-project-in-apache-netbeans\/","title":{"rendered":"3 Ways to Add a Local JPlanner.jar to Your Project in Apache NetBeans"},"content":{"rendered":"<p>In this blog post we will look at 3 different ways to add the JPlanner.jar library to your project in the NetBeans IDE. The projects are:<\/p>\n<ul>\n<li>Java Application with Maven<\/li>\n<li>Java Application wtih Gradle<\/li>\n<li>Java Appliation with Ant<\/li>\n<\/ul>\n<p>We assume you have downloaded the JPlanner.jar either with the <a href=\"https:\/\/mindfusion.dev\/JPlannerTrial.zip\" title=\"Download Scheduling for Java Swing Trial Version\">trial version of Scheduling for Java Swing<\/a> or with <a href=\"https:\/\/mindfusion.dev\/products\/java\/scheduling\/samples\" title=\"Scheduling for Java Swing: Samples\">one of the samples<\/a>.<\/p>\n<p><strong>I. Java Application with Maven<\/strong><\/p>\n<p>Right click on the &#8220;Dependencies&#8221; node in your project tree and choose &#8220;Add Dependency&#8221;:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/mindfusion.dev\/samples\/java\/NetBeans\/maven_add_dependency.png\" title=\"Add Dependency in a Maven Project\"><br \/>\n<!--more--><br \/>\nIn the dialog that appears you can type the data for the JPlanner.jar. You can check <a href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/jplanner\/CC_What_s_New_in_this_Release_19.htm\" title=\"Scheduling for Java Swing: Online Documentation\">the online documentation<\/a> for the current version.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/mindfusion.dev\/samples\/java\/NetBeans\/add_scheduler.png\" title=\"Describe the Java Scheduler Data\"><\/p>\n<p>You can edit directly the pom.xml file of the project. Make sure you declare the JPlanner dependency inside the dependencies XML element:<\/p>\n<pre>&lt;dependencies&gt;\n        &lt;dependency&gt;\n         &lt;groupId&gt;eu.mindfusion&lt;\/groupId&gt;\n         &lt;artifactId&gt;scheduling&lt;\/artifactId&gt;\n         &lt;version&gt;2.1.3&lt;\/version&gt;\n     &lt;\/dependency&gt;\n&lt;\/dependencies&gt;\n<\/pre>\n<p>The pom.xml file is in the &#8220;Project Files&#8221; folder of your project:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/mindfusion.dev\/samples\/java\/NetBeans\/maven_pom.png\" title=\"The pom.xml file in your project\"><\/p>\n<p>Now you should see the JPlanner.jar under the Dependencies tree node. Now you should load it from your local jar file. Right-click on the dependency and choose &#8221; The last step you should make to load the JPlanner file now is right-click on the dependency and choose &#8220;Manually install artifact&#8221;:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/mindfusion.dev\/samples\/java\/NetBeans\/manually_install.png\" title=\"Manual install the Java Scheduler artifact from the local JPlanner.jar\"><\/p>\n<p>If the version you have downloaded is the same as the version you&#8217;ve described, the installation must be successful and you have now a reference to your local JPlanner file in your maven project in Eclipse Net Beans.<\/p>\n<p align=\"center\"><a href=\"https:\/\/mindfusion.dev\/samples\/java\/NetBeans\/SimpleSchedulerMaven.zip\" title=\"Download Scheduler Project with Maven\">Download a sample Scheduler project for NetBeans with Maven loading a local JPlanner.jar file<\/a><\/p>\n<p><strong>II. Java Application with Gradle<\/strong><\/p>\n<p>Choose a place in the directory of your Gradle project where you want to store the JPlanner.jar file. For our sample project we have chosen to create a new libs folder in the same directory where the src and build folders are located. We have copied the JPlanner.jar there. The build.gradle script is also located there. Since we have to edit it, we can easily specify the location of the JPlanner.jar relatively to the script location.<\/p>\n<p>In NetBeans or directly from your hard drive, open the build.gradle script. In NetBeans it is located in the &#8220;Build Script&#8221; folder:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/mindfusion.dev\/samples\/java\/NetBeans\/open_build_script.png\" title=\"Edit the build.gradle script in NetBeans\"><br \/>\nFind the dependencies section and add the line that loads the JPlanner:<\/p>\n<pre>dependencies {\n    \n    .....................................    \n\n    implementation files('libs\/JPlanner.jar')\n\n}\n<\/pre>\n<p>This is the Groovin syntax. If you are using Kotlin your line should be:<\/p>\n<pre>implementation(files(\"libs\/JPlanner.jar\"))<\/pre>\n<p>If the location of your JPlanner.jar is specified correctly, the file should load successfully now and the scheduling namespaces should be accessible in your code.<\/p>\n<p align=\"center\"><a href=\"https:\/\/mindfusion.dev\/samples\/java\/NetBeans\/GradleScheduler.zip\" title=\"Download Scheduler Project with Gradle\">Download a sample Scheduler project for NetBeans with Gradle loading a local JPlanner.jar file<\/a><\/p>\n<p><strong>III. Java Application with Ant<\/strong><\/p>\n<p>When you create a Java project with Ant you are asked to name the location of library files. The default is lib. Copy the JPlanner.jar into the folder that holds your library files. It appears in the project tree as &#8220;Libraries&#8221; though its name on the physical drive could be different.<\/p>\n<p>Right-click the Libraries node in the project tree in NetBeans. Choose &#8220;Add JAR\/Folder&#8221;.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/mindfusion.dev\/samples\/java\/NetBeans\/ant_add_library.png\" title=\"Add the JPlanner.jar in Ant\"><\/p>\n<p>Navigate to the folder where you have placed the JPlanner.jar and choose it. After that, you should be able to import the scheduling packages.<\/p>\n<p align=\"center\"><a href=\"https:\/\/mindfusion.dev\/samples\/java\/NetBeans\/ScheduleApplicationAnt.zip.zip\" title=\"Download Scheduler Project with Ant\">Download a sample Scheduler project for NetBeans with Ant loading a local JPlanner.jar file<\/a><\/p>\n<p>If you need help using the Java Scheduler with NetBeans, please contact our support team at support@mindfusion.dev or write <a title=\"Support Forum\" href=\"https:\/\/mindfusion.dev\/Forum\/YaBB.pl?board=scheduling_swing\">at the support forum.<\/a><\/p>\n<p><em>About MindFusion Scheduling for Java Swing:<\/em> The library provides extensive feature-set for creating and customizing all sorts of calendars, task lists, time-management tables, resource allocation tables and other. It boasts various options for customizing appearance and numerous events for handling user actions. The distribution archive includes a lot of samples and detailed documentation. Learn more at <a href=\"https:\/\/mindfusion.dev\/java-scheduler.html\">https:\/\/mindfusion.dev\/java-scheduler.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this blog post we will look at 3 different ways to add the JPlanner.jar library to your project in the NetBeans IDE. The projects are: Java Application with Maven Java Application wtih Gradle Java Appliation with Ant We assume &hellip; <a href=\"https:\/\/mindfusion.dev\/blog\/3-ways-to-add-a-local-jplanner-jar-to-your-project-in-apache-netbeans\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[61,95,535,104,163],"tags":[57,614,688,687,689,682,119],"class_list":["post-2746","post","type-post","status-publish","format-standard","hentry","category-charting-2","category-diagramming-2","category-java-swing","category-scheduling-2","category-spreadsheet","tag-java-swing","tag-java-tutorial","tag-local-jar","tag-maven","tag-mindfusion","tag-netbeans","tag-scheduler"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3RlKs-Ii","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/posts\/2746","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/comments?post=2746"}],"version-history":[{"count":3,"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/posts\/2746\/revisions"}],"predecessor-version":[{"id":2757,"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/posts\/2746\/revisions\/2757"}],"wp:attachment":[{"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/media?parent=2746"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/categories?post=2746"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/tags?post=2746"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}