[ImageIO] add plugin jar to classpath

Hello Experts,
I have built a WebDynpro application in which I need to resize images (JPG, PNG and GIF). I use standard library :
boolean writeResult = ImageIO.write(bufferedImg, fileExtension, streamOut);
This works fine, except for the GIF format for which there is no standard writer.
I decided to use <a href="https://gif-plugin.dev.java.net/">gif-plugin</a> which should do the trick.
According to the plugin documentation : "<i>Just copy the plugin jar to somewhere in the classpath.
The jdk should automatically detect the plugin</i>".
I added the jar in an external library, exactly the same I do for other external jars I use.
I can see the jar in the classpath when opening 'Project > properties > Java Build Path > Libraries"
But seems that it is not been added to the classpath at runtime because plugin is not detected.
Do you have any hint on that ?
Thanks a lot.
Regards,
Nicolas

In your external library DC you should create public part with type assembly - and add neccessary libs to in. Build it.
IN Webdynpro DC you should add reference on created pp with type 'build'. Build WD DC - now Wd ear file should contain required custom jar and will be able to use it on runtime.

Similar Messages

  • How to add jar files  classpath in sun stdio creator

    Hi,
    i am using log4j-1.2.13.jar in my application.
    how to add it to my classpath in sun stdio.
    with regards
    shannu sarma

    Hi there,
    These threads will answer your question
    http://forum.sun.com/jive/thread.jspa?forumID=123&threadID=61842
    http://forum.sun.com/jive/thread.jspa?forumID=123&threadID=56060
    Thanks
    K

  • Do I always need to add .JAR to ClassPath?

    My platform is Windows.
    I pack my .class files to a .Jar file. When I want to use this .Jar, I always have to add it to ClassPath. I think it doesn't make sense. Does anything I can do that can make me use .Jar more convenient ?
    Thanks

    Can you elaborate more?
    If you create an app and jar up all of the .class files in jar called myJar.jar for example, and then want to run that app, you just type in "java -jar myJar.jar" and its' not necessary to have myJar.jar in the classpath. (Remember to add a manifest with the Main-Class attribute defined! See java tutorial for more info on executable jars...)
    If, otoh, you have a bunch of classes in a jar, and then want to refer to those classes from some other external class(es)/jar(s), then yes, you'll need to add that jar to your classpath.
    -Ron

  • Help Nedded on how to add JavaMail.jar and JAF.jar to my classpath

    Hello.. please i want to add these two packages JavaMail.jar, and JAF.jar to my classpath.
    Can anyone show me how to do this?, if possible some example.
    Thanks.

    Hi!
    Just copy them into the %JAVA_HOME%/jre/lib/ext folder.
    Or...
    Add them to your classpath as:
    java -cp <path to your jar files>/mail.jar;<path to your jar files>/jaf.jar;. YourApp
    Hope this helps.

  • Add JARs to classpath within Java

    I've read through a number of different posts on this topic, but can't seem to get my code working.
    I want to write a class that will run embedded Tomcat. For certain reasons, I can't set the
    classpath to Tomcat before my class gets called, so I want to locate the Tomcat JARs, add them
    using a ClassLoader and then call the appropriate classes to setup and run Tomcat. An
    exception is being thrown, so I'm doing something wrong. Any ideas?
    Here's the code I'm trying to add the JARs with:
    String mcatHome = "tomcat/lib"
    try {
         // Scan folder for JARs and build URL array
         File mcatDir = new File(mcatHome);
         File files[] = mcatDir.listFiles(new JarFilter());
         URL jarURLs[] = new URL[files.length];
         for (int i = 0; i < files.length; i++)
              jarURLs[i] = files.toURL();
         // Add list of JARs to class loader
         URLClassLoader ucl = new URLClassLoader(jarURLs);
         // Use loader when loading classes
         Thread.currentThread().setContextClassLoader(ucl);
    catch (Exception ex) {
    then I call the contructor on the class which tries to start Tomcat:
         public void Mcat()
              startTomcat();
         protected void startTomcat()
              Embedded embed = new Embedded();
    When the constructor is invoked, I get:
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/catalina/L
    ifecycleException

    jschell, the list of JARs is generated from listing them in the folder. I did print the list out and
    the URLs looked ok. (i.e. file:/....)
    Here a snippet of how the class calling is setup:
    In Runner.java:
    public void Runner()
         //code from original post to load JARs
         Mcat mcat = new Mcat()
    In Mcat.java:
    import org.apache.catalina.*;
    import org.apache.catalina.logger.*;
    import org.apache.catalina.users.*;
    import org.apache.catalina.realm.*;
    import org.apache.catalina.startup.Embedded;
    public class Mcat
        public void Mcat()
            startTomcat();
        protected void startTomcat()
            Embedded embed = new Embedded();
    }Hope this helps

  • Putting Jar in ClassPath/Loading JDBC Driver on Linux

    Hi,
         I have got this to work on Windows � but then I simply put the Connector-J Jar into the �lib� directory of my Java installation. On this Linux machine I do not have the privileges to the �lib� directory � so I need to add the Jar to the class path � but it is not seeming to get added.
         I would appreciate any suggestions. I have copied the Connector-J Jar file to the Current working directory and I have tried
    java -classpath './mysql-connector-java-5.1.6-bin.jar' -Xmx512M -jar ProcessBigDump_fat.jar
    java -cp mysql-connector-java-5.1.6-bin.jar -Xmx512M -jar ProcessBigDump_fat.jar
    Thank you for any ideas.
    O.O.

    When you use "-jar" any user settings of the classpath are ignored. Everything has to be specified within the jar archive itself.
    Jars have a "manifest" which lets you do this. ProcessBigDump_fat.jar will already have a manifest: it has to in order to specify the main class. There will be a line like:
    Main-Class: myapp.Main(Assuming the class with the static main() method was Main and it was part of the myapp package.)
    What you have to do is add another line something like:
    Class-Path: mysql-connector-java-5.1.6-bin.jarwhich will use the mysql jar (located in the same place as your jar) as part of the classpath.
    Details in Sun's Tutorial.

  • How to add jfxrt jar locally?

    Hi,
    I'm using JavaFX 2.0 and Eclipse. I wrote a Java program which uses JavaFX but to use JavaFX I've added an external jar (jfxrt.jar) to the classpath, from the C:\Program Files\Oracle\JavaFX 2.0 Runtime\lib folder.
    But the app I wrote is for college coursework and I want to submit it today, and the people who mark it need to be able to compile the app. Since they probably don't have jfxrt.jar in the same location, how can I make it local so that they can compile it?
    I tried copying jfxrt.jar to the project directory and adding it as a local jar but this didn't work - I got a fatal error: EXCEPTION_ACCESS_VIOLATION
    Thanks for any advice!

    Well, if they want to compile it they need to add it to their classpath. It's basically just the same process as with specifing the JDK you want to compile sources with.
    Their JDK is probably also another version and in another location than yours, but you would never give them yours or add your JDK as local dependency to your project, so that they can compile it.
    The same goes for jfxrt.jar.
    Just tell them, they have to compile it with JDK 7 and they need jfxrt.jar in their classpath which can be found in the JDK folder.

  • Add xml file to classpath

    Hi all,
    Can someone tell me how I can add a xml file to my class path.
    I have add some thirth party jar files to my application but I need also the license xml in my classpath.
    Kind regards,
    Richard

    Hi Richard,
    to access the mention xml file from an EJB module the procedure would be:
    - package the XML file in a JAR, say myxml.jar
    - add myxml.jar to an existing or newly created library
    - let your app reference this library
    Regards
    Gregor

  • OC4J - Adding jars to classpath

    Hi,
    Ive tried adding a new jar to oc4js classpath. Our application depends on this jar.
    I couldnt.
    Ive tried adding the jar as a 'library-path' tag within the server.xml. Then added it to the command line running oc4j ( -cp = .... ). It didnt do the trick.
    Ive only made some progress when putting it straight into oc4js lib directory.
    Im confused.
    1. What does the 'library-path' tab enable?
    2. Whats the difference between using it and supplying jars to the oc4js runtime classpath ( -cp ).
    3. What is the recommended way, to simply add a jar upon my application depends of?
    Any help would be apreceated,
    Yuval.

    HI Yuval,
    To include any Jar file in App server class path, you only have to copy the file in J2EE home\Lib\ folder. I also tried passing classpath to OC4J bUt to no use.
    But its working fine.
    Amit

  • Applet not finding oracle.jdeveloper.layout.XYLayout. How to add to jar?

    hey guys, i have created an applet and it is unable to find oracle.jdeveloper.layout.XYLayout. How might I add this to my jar to be able to deploy it?

    not.
    Figure out what jar it's in, and add that jar to the classpath for the applet (and thus to the webserver in a location where the applet can load it from).
    See the documentation to figure out how to set an applet classpath.

  • Fail to add aia.jar in Jdeveloper

    Hi,
    I am compiling AIA demo in JDeveloper and got error "package oracle.apps.aia.cor.eh does not exist" for AIADemoErrorHandlerExtImpl.java.
    I have added aia.jar in <JDEV home>/jdev/lib by "Tools->Preference->SOA". I even added aia.jar in project properties->library and class path.
    Still the same error. When I type "import oracle.apps..." in the source code window, JDeveloper can not prompt the interface name. It seems that JDeveloper fails to load aia.jar.
    When I add aia.jar in project library, the name under "Classpath entries" is "aia.jar" unlike other libraries which show reasonable names like "SOA runtime" or "BPEL runtime".
    I deleted .jdeveloper user folder and restarted JDeveloper. Can't fix this problem.
    I can open the aia.jar file and see the class files in it.
    Any idea?
    Thanks a lot!

    Have you followed the following instructions
    - section 3.3 of http://download.oracle.com/docs/cd/E12839_01/integration.1111/e10226/toc.htm
    - section 5.3 of http://download.oracle.com/docs/cd/E15523_01/core.1111/e10105/toc.htm
    Arvind

  • No utl_dbws.jar in classpath!...no really...

    I am trying to complete the this user guide http://www.oracle.com/technology/sample_code/tech/java/jsp/callout_users_guide.htm
    and all it's fine until this
    C:\Documents and Settings\florinp\My Documents\wsdl>jpub -u infows/infows@oradev
    -sysuser sys/sinoptix -proxywsdl=TemperatureService.wsdl -endpoint=http://servi
    ces.xmethods.net:80/soap/servlet/rpcrouter -proxyopts=soap,tabfun -dir=weather -
    plsqlpackage=soap_ws_extern
    oracle.jpub.JPubException: Error: Cannot run the WebServices assembler for the g
    iven wsdl file. Please make sure that sqlj/lib/utl_dbws.jar appear in the classp
    ath.
    at oracle.jpub.genproxy.GenProxy.compileWSDL(GenProxy.java:1236)
    at oracle.jpub.genproxy.GenProxy.generateProxy(GenProxy.java:141)
    at oracle.jpub.Doit.main(Doit.java:331)
    at oracle.jpub.Doit.main(Doit.java:52)
    at oracle.jpub.publish.Main.main(Main.java:9)
    at oracle.jpub.Main.main(Main.java:6)
    J2T-106, ERROR: Sorry, unable to continue due to oracle.jpub.JPubException: Erro
    r: Cannot run the WebServices assembler for the given wsdl file. Please make sur
    e that sqlj/lib/utl_dbws.jar appear in the classpath.
    C:\Documents and Settings\florinp\My Documents\wsdl>echo %CLASSPATH%
    C:\bin\sqlj\lib\translator.jar;C:\bin\sqlj\lib\runtime12.jar;C:\bin\ORA9i\jdbc\l
    ib\classes12.jar;C:\bin\sqlj\lib\utl_dbws.jar;
    I am using a 9i database...
    what kind of error is this?

    Asuka Yuki wrote:
    Hi Joe,
    Thank you for your prompt reply. my code is for server side.
    The driverManager is actually for session bean to connect to Oracle database server.
    Hope to hear from you soon. Thousand thanks in advance.
    Rgds,
    AsukaHi. This is odd. Please show me the classpath the server startup script prints out
    when it starts. (both in the successful mode and in the failing mode).
    Would you also please try changing the bean code to do this:
    java.sql.Driver d = (java.sql.Driver) Class.forName("weblogic.jdbc.jts.Driver").newInstance();
    return d.connect("jdbc:weblogic:jts:myPoolName", null);
    Thanks,
    Joe
    >
    >
    Joe Weinstein <[email protected]> wrote:
    yuki wrote:
    Hi,
    I am currently maintaining Weblogic 5.1 server connecting to oracle using weblogic jts driver without weblogicaux.jar in my classpath and it is working fine. But now after I have appended weblogicaux.jar to my classpath. The console starts to print out weblogic.jdbc.jts.driver and no suitable driver exception. I have to add weblogicaux.jar to my classpath, please advise me. Thank you in advance for any advice.
    my code for getting connection is as below
    Class.forName("weblogic.jdbc.jts.Driver").newInstance();
    return DriverManager.getConnection("jdbc:weblogic:jts:myPoolName");Hi. Is this in serverside code, or in an external client? This will not
    work in an external client.
    Joe
    Rgds,
    Asuka

  • How to add a jar file to a project

    I believe I have followed the necessary steps to add a jar file to my project. I have added this jar file as a new library and I see all the classes in it. I have even added it to my SessionBean1.java via the Add ---> Property menu. I noticed that this did not do the import of the class, so I did it myself. I also noticed that it did the drop downs and found the class for me automatically. Specifically, the IDE knows about the class layout and can see my class package as I type it out.
    So far so good....
    I then go to compile the project and I get the error:
    C:\Projects\safe\Safe\src\safe\SessionBean1.java:11: package com.dusa.bo does not exist
    import com.dusa.bo.BackofficePerson;
    Am I missing something? I looked around and it looks to me like the jar file is in the project and it should know about it. Again, I do know that the editor can find it, because as I type import ..... it then list "com" as an option to click on, then if I click on com, it will then list dusa ... and so on.
    Thanks

    I figured this out. Sorry for the post.

  • Is there an easy way to suppress debug messages from plugin.jar?

    When using the plugin.jar library (included in JRE 1.4.2 and 1.5)
    my Java Console is riddled with tons of debug messages like:
    <<< ProxyClassLoader: defined LiveConnectProxy class. >>>
    <<< Here're the permissions you've got: >>>
    <<< java.security.Permissions@b614d0 (
    (java.net.SocketPermission 127.0.0.1 connect,accept,resolve)
    )I'm using the plugin.jar (replacing use of the old netscape.jar)
    to bridge communication between Java Applets and JavaScript.
    Each time the Applet calls back to the JavaScript side,
    the callback JavaScript function makes a call to parseInt() to
    convert one of the parameters passed from a string to an integer.
    Each time parseInt() is called, the message above appears
    in the Java Console.
    I traced down the source code for this message to a debug()
    statement inside the plugin.jar's class loader, but I'm not sure
    how to suppress it easily.
    Does anyone have any ideas I could try?
    Here's the code from the Java-side:
    synchronized( this )
         try
              final JSObject window = JSObject.getWindow( applet );
              if( window != null )
                   final String[] stringArgs = new String[3];
                   stringArgs[0] = labelName;
                   stringArgs[1] = labelDisplayName;
                   stringArgs[2] = labelValue;
                   log.debug(stringArgs[0]);
                   log.debug(stringArgs[1]);
                   log.debug(stringArgs[2]);
                   window.call("MyJavascriptCallback", stringArgs);
              else
                   log.error("Javascript window unavailable.");
         catch( final JSException e )
              // Note: Occasionally, getWindow() will throw an exception
              // without any meaningful reason.
              // ( http://www.raditha.com/blog/archives/000938.html )
              // Possible cause: This can send updates at a fraction of a
              // second. This may be causing issues within the Plugin.jar
              // used to handle the JavaScript callback.
              log.debug("JSException", e);
    }

    Here's what I've found out...
    The messages are coming from the MRJPlugin.jar provided by Firefox.
    Within the netscape.oji.ProxyClassLoaderFactory class,
    the following line...
    System.out.println("<<< " + message + " >>>");
    ...appears to be the cause and cannot be turned off by a configuration setting.
    The home URL for the MRJPlugin.jar is:
    http://www.mozilla.org/oji/MRJPlugin.html
    The last time this library had an update released was in 10/31/2000.
    However, this is the Mozilla source; not Firefox.
    Although changing the MRJPlugin.jar source to remove this line will appear
    to fix the problem, I'm not sure of the best way to distribute the updated
    MRJPlugin.jar without conflicting with Firefox's update process.
    Any thoughts?

  • Add a jar file to an Applet

    Hi all,
    I'm trying to add a .jar file to my applet using the code:
    <applet name=myApplet.class archive=model.jar></applet>
    Both the .class and .jar files are in the same directory as test.html
    So, when the applet starts an exception is thrown:
    java.lang.NoClassDefFoundError: it/bizware/session/interfaces/HardwareLogManagerUtil
         at AppletPistolaL.getHardwareLogManager(AppletPistolaL.java:222)
         at AppletPistolaL.init(AppletPistolaL.java:97)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    The model.jar contains the path it/bizware/session.../HardwareLogManagerUtil!
    I can't understand why this exception is thrown
    Someone can help me?!?!?!
    thanks a lot!!

    Solved,
    just to add all path it/bizware/....
    and works!!!!
    bye!

Maybe you are looking for