Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7513965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T00:21:03+00:00 2026-05-30T00:21:03+00:00

I am building my project using maven and eclipse. I am using the command

  • 0

I am building my project using maven and eclipse. I am using the command mvn assembly:single which runs quite happily. However when I attempt to run the jar using:

java Iris-1.0-SNAPSHOT-jar-with-dependencies.jar

I get:

Exception in thread "main" java.lang.NoClassDefFoundError: target/Iris-1/0-SNAPSHOT-jar-with-dependencies/jar
Caused by: java.lang.ClassNotFoundException: target.Iris-1.0-SNAPSHOT-jar-with-    dependencies.jar
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

Also the manifest doesn’t contain the class path. The manifest that is produced looks like

Manifest-Version: 1.0
Built-By: maxgarfinkel
Build-Jdk: 1.6.0_29
Created-By: Apache Maven
Main-Class: com.maxgarfinkel.iris.commandLine.CommandLineTools
Archiver-Version: Plexus Archiver

and the pom looks like this:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.maxgarfinkel.iris</groupId>
<artifactId>Iris</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Iris</name>
<url>http://maven.apache.org</url>
<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <skipTests>true</skipTests>
</properties>
<build>
    <plugins>
        <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <version>2.3</version>
            <configuration>
                <descriptorRefs>
                    <descriptorRef>jar-with-dependencies</descriptorRef>
                </descriptorRefs>
                <archive>
                    <manifest>
                        <addClasspath>true</addClasspath>
                        <mainClass>com.maxgarfinkel.iris.commandLine.CommandLineTools</mainClass>
                    </manifest>
                </archive>
            </configuration>
        </plugin>
    </plugins>
</build>

<dependencies>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.10</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.swinglabs</groupId>
        <artifactId>swing-layout</artifactId>
        <version>1.0.3</version>
    </dependency>
    <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.16</version>
    </dependency>
    <dependency>
        <groupId>org.apache.xmlrpc</groupId>
        <artifactId>xmlrpc-client</artifactId>
        <version>3.1.3</version>
    </dependency>
    <dependency>
        <groupId>org.apache.xmlrpc</groupId>
        <artifactId>xmlrpc-server</artifactId>
        <version>3.1.3</version>
    </dependency>
    <dependency>
        <groupId>org.jfree</groupId>
        <artifactId>jfreechart</artifactId>
        <version>1.0.14</version>
    </dependency>
    <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-all</artifactId>
        <version>1.8.5</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>net.sf.jung</groupId>
        <artifactId>jung2</artifactId>
        <version>2.0.1</version>
        <type>pom</type>
    </dependency>
    <dependency>
        <groupId>net.sf.jung</groupId>
        <artifactId>jung-graph-impl</artifactId>
        <version>2.0.1</version>
    </dependency>
    <dependency>
        <groupId>hbase</groupId>
        <artifactId>hbase</artifactId>
        <version>0.20.1</version>
    </dependency>
    <dependency>
        <groupId>hadoop</groupId>
        <artifactId>hadoop</artifactId>
        <version>0.20.1</version>
    </dependency>
    <dependency>
        <groupId>hadoop-commons-cli-1.2</groupId>
        <artifactId>commons-cli-1.2</artifactId>
        <version>1.2</version>
    </dependency>
    <dependency>
        <groupId>hadoop-commons-codec-1.3</groupId>
        <artifactId>commons-codec-1.3</artifactId>
        <version>1.3</version>
    </dependency>
    <dependency>
        <groupId>hadoop-commons-el-1.0</groupId>
        <artifactId>commons-el-1.0</artifactId>
        <version>1.0</version>
    </dependency>
    <dependency>
        <groupId>hadoop-commons-httpclient-3.0.1</groupId>
        <artifactId>commons-httpclient-3.0.1</artifactId>
        <version>3.0.1</version>
    </dependency>
    <dependency>
        <groupId>hadoop-commons-net-1.4.1</groupId>
        <artifactId>commons-net-1.4.1</artifactId>
        <version>1.4.1</version>
    </dependency>
    <dependency>
        <groupId>hadoop-core-3.1.1</groupId>
        <artifactId>core-3.1.1</artifactId>
        <version>3.1.1</version>
    </dependency>
    <dependency>
        <groupId>hadoop-hsqldb-1.8.0.10</groupId>
        <artifactId>hsqldb-1.8.0.10</artifactId>
        <version>1.8.0.10</version>
    </dependency>
    <dependency>
        <groupId>hadoop-jasper-compiler-5.5.12</groupId>
        <artifactId>jasper-compiler-5.5.12</artifactId>
        <version>5.5.12</version>
    </dependency>
    <dependency>
        <groupId>hadoop-jasper-runtime-5.5.12</groupId>
        <artifactId>jasper-runtime-5.5.12</artifactId>
        <version>5.5.12</version>
    </dependency>
    <dependency>
        <groupId>hadoop-jets3t-0.6.1</groupId>
        <artifactId>jets3t-0.6.1</artifactId>
        <version>0.6.1</version>
    </dependency>
    <dependency>
        <groupId>hadoop-jetty-6.1.14</groupId>
        <artifactId>jetty-6.1.14</artifactId>
        <version>6.1.14</version>
    </dependency>
    <dependency>
        <groupId>hadoop-jetty-util-6.1.14</groupId>
        <artifactId>jetty-util-6.1.14</artifactId>
        <version>6.1.14</version>
    </dependency>
    <dependency>
        <groupId>hadoop-kfs-0.2.2</groupId>
        <artifactId>kfs-0.2.2</artifactId>
        <version>0.2.2</version>
    </dependency>
    <dependency>
        <groupId>hadoop-oro-2.0.8</groupId>
        <artifactId>oro-2.0.8</artifactId>
        <version>2.0.8</version>
    </dependency>
    <dependency>
        <groupId>hadoop-slf4j-api-1.4.3</groupId>
        <artifactId>slf4j-api-1.4.3</artifactId>
        <version>1.4.3</version>
    </dependency>
    <dependency>
        <groupId>hadoop-slf4j-log4j12-1.4.3</groupId>
        <artifactId>slf4j-log4j12-1.4.3</artifactId>
        <version>1.4.3</version>
    </dependency>
    <dependency>
        <groupId>hadoop-xmlenc-0.52</groupId>
        <artifactId>xmlenc-0.52</artifactId>
        <version>0.52</version>
    </dependency>
    <dependency>
        <groupId>hadoop-zookeeper</groupId>
        <artifactId>zookeeper</artifactId>
        <version>3.2.1</version>
    </dependency>
    <dependency>
        <groupId>colt</groupId>
        <artifactId>colt</artifactId>
        <version>1.2.0</version>
    </dependency>
    <dependency>
        <groupId>com.inamik.utils.tableformatter-0.9.1</groupId>
        <artifactId>com.inamik.utils.tableformatter-0.9.1</artifactId>
        <version>0.9.1</version>
    </dependency>
    <dependency>
        <groupId>Voronoi</groupId>
        <artifactId>voronoi</artifactId>
        <version>1.1</version>
    </dependency>
    <dependency>
        <groupId>net.sf.jung</groupId>
        <artifactId>jung-algorithms</artifactId>
        <version>2.0.1</version>
    </dependency>
    <dependency>
        <groupId>net.sf.jung</groupId>
        <artifactId>jung-visualization</artifactId>
        <version>2.0.1</version>
    </dependency>
    <dependency>
        <groupId>net.sf.jung</groupId>
        <artifactId>jung-io</artifactId>
        <version>2.0.1</version>
    </dependency>
    <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-all</artifactId>
        <version>1.1</version>
    </dependency>
    <dependency>
        <groupId>com.explodingpixels</groupId>
        <artifactId>mac_widgets</artifactId>
        <version>0.9.5</version>
    </dependency>
    <dependency>
        <groupId>com.miglayout</groupId>
        <artifactId>miglayout</artifactId>
        <version>3.7.4</version>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>1.6.4</version>
    </dependency>
</dependencies>
</project>

1. How can I get the classpath to show up?
2. WIll that make the jar runnable?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T00:21:05+00:00Added an answer on May 30, 2026 at 12:21 am

    You need to do this

    java -jar Iris-1.0-SNAPSHOT-jar-with-dependencies.jar.
    

    For more information see this link
    http://docs.oracle.com/javase/tutorial/deployment/jar/run.html

    Also there is no need for the manifest to contain the classpath (I think).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having problem building my project (using maven 2) which references some jars
I created a j2ee-simple project using the maven template with following command-line mvn archetype:create
We are using maven with eclipse. We have a multi module project, quite big.
I'm using Spring 2.5.6 and building my project with Maven 2.2.1. We use PropertyPlaceholderConfigurer
I am building a project using Maven. In the Pom.xml i have added dependency
I've got a Java/Flex project that I'm building using Maven. After doing some research
I have a huge multi-module project , which is being built using maven. Most
I'm building my project using the following POM: <project xmlns=http://maven.apache.org/POM/4.0.0 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd> <modelVersion>4.0.0</modelVersion>
I am using Maven 3 for build Dashboard project After building my web application
Jenkins build 1.411. Building the multimodule project with maven 2 works, but using maven

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.