# Build scripts generated with application plugin, task startScripts produces broken scripts

**URL:** <https://discuss.gradle.org/t/build-scripts-generated-with-application-plugin-task-startscripts-produces-broken-scripts/3721>\
**Category:** Old Forum Archive\
**Created:** [October 2, 2013, 1:34am UTC](https://discuss.gradle.org/t/build-scripts-generated-with-application-plugin-task-startscripts-produces-broken-scripts/3721 "2013-10-02T01:34:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Justin\_Rogers](https://avatars.discourse-cdn.com/v4/letter/j/57b2e6/32.png) [@Justin\_Rogers](https://discuss.gradle.org/u/Justin_Rogers)\
**Post date:** [October 2, 2013, 1:34am UTC](https://discuss.gradle.org/t/build-scripts-generated-with-application-plugin-task-startscripts-produces-broken-scripts/3721/1 "2013-10-02T01:34:00Z")

</div>

Gradle 1.7, 1.8

I’m using the ‘application’ plugin. When I run the ‘startScripts’ task and run the generated scripts, I get the following error:

```gradle
$ build/scripts/myJar.jar
Error: Could not find or load main class my.main.class.Main

```

This suggests a classpath error. Looking deeper into the generated script, I see this line:

```gradle
CLASSPATH=$APP_HOME/lib/myJar.jar

```

However, the path Gradle generates is actually ‘build/libs/myJar.jar’, ‘libs’ with an ‘s’. When I edit the script to say ‘libs’, the script works as expected.

Is this a bug in the plugin or am I doing something wrong?

---

<div class="post-metadata">

**Author:** ![Peter\_Niederwieser](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@Peter\_Niederwieser](https://discuss.gradle.org/u/Peter_Niederwieser)\
**Post date:** [October 2, 2013, 5:20am UTC](https://discuss.gradle.org/t/build-scripts-generated-with-application-plugin-task-startscripts-produces-broken-scripts/3721/2 "2013-10-02T05:20:00Z")

</div>

You need to create an application distribution with the ‘installApp’ or ‘distZip’ task, both of which will include the correct start scripts.
