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 8742355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:29:10+00:00 2026-06-13T11:29:10+00:00

Using batik-rasterizer.jar from version 1.7 of batik, I was wondering how to call the

  • 0

Using batik-rasterizer.jar from version 1.7 of batik, I was wondering how to call the jar correctly.

java -jar batik-rasterizer-1.7.jar -m image/png -q 0.8 $1

Which gave me:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/batik/i18n/LocalizableSupport

Therefore, I was looking for the correct MainClass and ClassPath to use. I’ll post a script I came up with as an answer in a minute …

  • 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-06-13T11:29:11+00:00Added an answer on June 13, 2026 at 11:29 am

    This script gets all necessary jars from the maven repository into a classpath variable. Probably there is a better way e.g. repacking using maven …

    #!/bin/bash
    #set -x
    batikdir=$HOME/.m2/repository/org/apache/xmlgraphics/batik-rasterizer/1.7/
    batik=batik-rasterizer-1.7.jar
    main=org.apache.batik.apps.rasterizer.Main
    jarlist=/tmp/jarlist$$.txt
    cp=$batikdir/$batik
    find $HOME/.m2/repository -type f -name *.jar > $jarlist
    for j in batik-ext-1.7.jar batik-dom-1.7.jar batik-css-1.7.jar batik-svg-dom-1.7.jar batik-gvt-1.7.jar batik-parser-1.7.jar batik-script-1.7.jar batik-bridge-1.7.jar batik-anim-1.7.jar batik-transcoder-1.7.jar batik-awt-util-1.7.jar batik-codec-1.7.jar batik-util-1.7.jar batik-xml-1.7.jar xerces-2.5.0.jar xalan-2.6.0.jar xml-apis-1.3.04.jar xml-apis-ext-1.3.04.jar fop-0.94.jar batik-js.jar
    do
      #echo $j
        p=`grep $j $jarlist`
        cp="$cp:$p"
    done
    #echo $cp
    # http://tech.groups.yahoo.com/group/svg-developers/message/47939
    java -cp $cp $main -scriptSecurityOff -m image/png -q 0.8 $1 
    rm -f $jarlist
    

    to get the libraries i created a dummy maven project with the following pom.xml:

      <?xml version="1.0" encoding="UTF-8"?>
        <!--
        install maven 2 to use this pom file
        run e.g. mvn dependency:go-offline to download all libraries
        -->
        <project>
        <modelVersion>4.0.0</modelVersion>
        <groupId>com.bitplan.svg</groupId>
        <artifactId>com.bitplan.svg</artifactId>
        <version>0.0.1</version>
        <name>Dummy Project for SVG </name>
        <packaging>pom</packaging>
        <dependencies>
          <dependency>
            <groupId>org.apache.xmlgraphics</groupId>
                <artifactId>batik-rasterizer</artifactId>
            <version>1.7</version>
            </dependency>       
            <dependency>
                <groupId>org.apache.xmlgraphics</groupId>
                    <artifactId>batik-codec</artifactId>
                    <version>1.7</version>
            </dependency>
        </dependencies>
        <!-- configure jar plugin to build test-jar http://maven.apache.org/guides/mini/guide-attached-tests.html -->
        <build>
            <extensions>
                <extension>
                    <groupId>org.apache.maven.wagon</groupId>
                    <artifactId>wagon-ssh</artifactId>
                    <version>1.0</version>
                </extension>
            </extensions>
        </build>
        </project>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am handling a SVG file in Java using Batik library. The problem occurs
Using Java,I have to fetch multiple sets of values from an XML file to
An external Library need the Batik.jar Library. But on Loading it outputs: java.lang.LinkageError: loader
I'm using batik to convert an existing svg file to a png. Unfortunately, the
Using Java, how can I extract all the links from a given web page?
In my application I'm using an external library (Batik 1.7) that is made up
Using a CSS image sprite, I'm creating an 'interactive' image where hovering over certain
I am using Batik to manipulate SVG XML and display the changes. By default,
I have a svg file of 100x100 pixels (for example). I am using Batik.
we are using Apache Batik in a project for displaying SVG graphics in a

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.