# Tutorial for creating-multi-project-builds needs help

**URL:** <https://discuss.gradle.org/t/tutorial-for-creating-multi-project-builds-needs-help/26675>\
**Category:** Help/Discuss\
**Created:** [April 22, 2018, 7:28am UTC](https://discuss.gradle.org/t/tutorial-for-creating-multi-project-builds-needs-help/26675 "2018-04-22T07:28:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Earthling999](https://avatars.discourse-cdn.com/v4/letter/e/ecae2f/32.png) [@Earthling999](https://discuss.gradle.org/u/Earthling999)\
**Post date:** [April 22, 2018, 7:28am UTC](https://discuss.gradle.org/t/tutorial-for-creating-multi-project-builds-needs-help/26675/1 "2018-04-22T07:28:46Z")

</div>

This must get old but a search didn’t find anything.  
I was doing the Gradle tutorials for creating-multi-project-builds and was unable to run the Greeter.java file from JME3/Netbeans IDE. It works from the command line because Gradle (gradlew) creates a groovy library for the run and then deletes it afterwords. I searched and found that I needed to make the (Groovy)Library jar. I did that, added it to my project and ran the greeter project again and get the ClassNotFoundException groovy.lang.GroovyObject error. It’s not in the library/jar. (Whine)

1. How can I add groovy.lang.GroovyObject?
2. In Library.groovy, you have  
‘’’

> ```
> boolean someLibraryMethod(){
> true
> }
> 
> ```

What does this do? Do you have to call one method so the compiler finds the right library? Can you add a constructor? What about a method without a return value?

---

<div class="post-metadata">

**Author:** ![jjustinic](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/jjustinic/32/9005_2.png) [@jjustinic](https://discuss.gradle.org/u/jjustinic)\
**Post date:** [April 23, 2018, 5:20am UTC](https://discuss.gradle.org/t/tutorial-for-creating-multi-project-builds-needs-help/26675/2 "2018-04-23T05:20:42Z")

</div>

> [@Earthling999](#):
>
> I was doing the Gradle tutorials for creating-multi-project-builds and was unable to run the Greeter.java file from JME3/Netbeans IDE.

After reading your post and questions, it doesn’t seem that any of them are actually related to the [Creating Multi-project Builds Guide](https://guides.gradle.org/creating-multi-project-builds/). If you follow the guide as written, you shouldn’t encounter any of the items that you’re asking about.

> [@Earthling999](#):
>
> It works from the command line because Gradle (gradlew) creates a groovy library for the run and then deletes it afterwords. I searched and found that I needed to make the (Groovy)Library jar.

Without seeing what you found, this at least sounds like some confusion about the implementation JARs Gradle generates for its own runtime. The JARs that are generated for this relate to the execution of Gradle. To run a Groovy application, you need Groovy, but that’s just a normal dependency JAR. You get that in your project by the line it tutorial that reads `compile 'org.codehaus.groovy:groovy:2.4.10'`.

> [@Earthling999](#):
>
> 1. How can I add groovy.lang.GroovyObject?

If you’re wanting to use NetBeans to work on Gradle projects with Groovy, you should activate the Gradle and Groovy plugins. If NetBeans is functioning properly, it will pull in all required dependencies declared by Gradle into the classpath when you run the file. It seems like your real question here is how to use a Gradle project in NetBeans. Your issue with GroovyObject will go away if that’s working.

> [@Earthling999](#):
>
> 1. In Library.groovy, you have
> 
> ```groovy
> boolean someLibraryMethod() {
> true
> }
> 
> ```

There is no `Library.groovy` in the guide. That file comes from `gradle init --type groovy-library`, which just creates a contrived sample project. The method simply returns `true` so that the sample has something to compile and run a sample test against. It’s pointless except as a sample. You’d replace that code with your actual code if you used `gradle init --type groovy-library` as a starting point for a library written in Groovy.

---

<div class="post-metadata">

**Author:** ![Earthling999](https://avatars.discourse-cdn.com/v4/letter/e/ecae2f/32.png) [@Earthling999](https://discuss.gradle.org/u/Earthling999)\
**Post date:** [April 23, 2018, 5:32pm UTC](https://discuss.gradle.org/t/tutorial-for-creating-multi-project-builds-needs-help/26675/3 "2018-04-23T17:32:03Z")

</div>

Thank you. That all makes sense. I shouldn’t try something new after midnight.
