0

I'm trying to install j-text-utils to make a table. When I click on the jar file, nothing happens. So I tried make a .bat file and run the file from cmd. However, this shows up: no main manifest attribute, in j-text-utils-0.3.3.jar

I searched around and the problems were mainly with pom.xml and MANIFEST.MF. I dragged the file in Eclipse and the thing did have both pom.xml and MANIFEST.MF. Here is what the pom.xml looks like:

<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>
    <groupId>dnl.utils</groupId>
    <artifactId>j-text-utils</artifactId>
    <packaging>jar</packaging>
    <version>0.3.3</version>
    <name>Java Text Utilities</name>
    <url>http://code.google.com/p/j-text-utils</url>

    <dependencies>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.4</version>
        </dependency>
        <dependency>
            <groupId>net.sf.opencsv</groupId>
            <artifactId>opencsv</artifactId>
            <version>2.3</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>14.0.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.7</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <extensions>
            <extension>
                <groupId>org.jvnet.wagon-svn</groupId>
                <artifactId>wagon-svn</artifactId>
                <version>1.9</version>
            </extension>
        </extensions>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <distributionManagement>
        <repository>
            <uniqueVersion>false</uniqueVersion>
            <id>googlecode</id>
            <url>svn:https://d-maven.googlecode.com/svn/trunk/repo/</url>
        </repository>
    </distributionManagement>

</project>

Here is what the MANIFEST.MF looks like:

Manifest-Version: 1.0
Built-By: danielo
Build-Jdk: 1.7.0_45
Created-By: Apache Maven 3.1.0
Archiver-Version: Plexus Archiver

How may I fix this problem please? :(

I used the download link from Google Code: https://code.google.com/archive/p/j-text-utils/downloads

1 Answers1

1

This .jar file is to be used as a library, not a as an executable application. To access the functionalities, you should write your own application in Java and import the needed classes contained in the j-text-utils-0.3.3.jar file. To be able to compile your Java code, the j-text-utils-0.3.3.jar needs to be available on the classpath. See this question for more info : What is a classpath and how do I set it?

jeroen_de_schutter
  • 1,843
  • 1
  • 18
  • 21