Packaging to a .jar

I have a java program written that has two class files. There is Errors.java and ErrorCheck.java and Errors is a gui side and calls ErrorCheck to actually check files for the errors I'm looking for. I want to package these into something that can be ran by double clicking something in windows and from what I've read, .jar seems to be the best method for this. I'm using eclipse and tried exporting Errors.java to .jar because Errors has the main method in it. It exports to .jar and runs the gui, but doesn't have functionality because ErrorCheck is not included. How do I package these together to run easily? I don't have to use eclipse, but that seems easier than trying to do it on the command line.

It's probably easier using Eclipse, but I still suggest you do it on the command line.
The reason for this is simple: If it's the first time you're packaging a jar file, then you should learn what is necessary to get it working. This is best learned if you use the most basic tools available, which means using the command line.
When you've learned that, then you can easily apply what you've learned to do the same thing in Eclipse. And if something goes wrong, then you'll have an idea what to look into.
Check [this tutorial|https://java.sun.com/docs/books/tutorial/deployment/jar/] to learn how to package jar files.

Similar Messages

  • Trying to use ord.jdom package with a jar - it's not working...

    Guys, I'm trying to build a Swing app that uses jdom classes and interfaces. I built the app in NetBeans, and to get the jdom packages to work, I had to mount the jdom.jar. Then suddenly, I had no errors using the jdom classes Document, Element, SAXBuilder etc. I have the program running perfectly inside the netbeans interface.
    Now, how do I get everything working together in a JAR?
    Here's the starts of the respective files:
    * CTATool.java
    * Created on January 3, 2004, 1:23 PM
    package CTATool;
    * @author  jason_michael_trk
    public class CTATool extends javax.swing.JFrame
        /** Creates new form CTATool */
        public CTATool()
            initComponents();...
    * FileWriterXML.java
    * Created on March 5, 2004, 10:06 AM
    package CTATool;
    import org.jdom.*;
    import org.jdom.output.*;
    import java.io.*;
    * @author  Jason L Michael
    public class FileWriterXML
        private Document doc;
        private FileWriter fw;
        private File f;
    I need to include in the JAR the org.jdom package. How do I do this?
    Here's the manifest I am using cirrently:
    Manifest-Version: 1.0
    Created-By: NetBeans IDE
    Specified-By: CTATool.V2.jarContent
    Main-Class: CTATool.CTAToolThe jar includes the CTATool.class file, the FileWriterXML.class file and the jdom.jar.
    I'm getting the following errors, when I attempt to execute the CTATool.V2.jar:
    java.lang.NoClassDefFoundError: org/jdom/JDOMException
            at CTATool.CTATool.saveStatsAndExit(CTATool.java:1457)
            at CTATool.CTATool.quitMenuItemActionPerformed(CTATool.java:1450)
            at CTATool.CTATool.access$400(CTATool.java:13)
            at CTATool.CTATool$5.actionPerformed(CTATool.java:157)
            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1764)
            at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1817)
            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)
            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)
            at javax.swing.AbstractButton.doClick(AbstractButton.java:289)
            at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1113)
            at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(BasicMenuItemUI.java:943)
            at java.awt.Component.processMouseEvent(Component.java:5134)
            at java.awt.Component.processEvent(Component.java:4931)
            at java.awt.Container.processEvent(Container.java:1566)
            at java.awt.Component.dispatchEventImpl(Component.java:3639)
            at java.awt.Container.dispatchEventImpl(Container.java:1623)
            at java.awt.Component.dispatchEvent(Component.java:3480)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
            at java.awt.Container.dispatchEventImpl(Container.java:1609)
            at java.awt.Window.dispatchEventImpl(Window.java:1590)
            at java.awt.Component.dispatchEvent(Component.java:3480)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)this is right when the FileWriterXML class is created and ran.
    Help??!??Thanks in advance!
    chewy

    I think I figured this out, if it helps anyone...
    You have to wrap up all of YOUR classes into a jar, and have a manifest entry that specifies:
    Class-Path: jdom.jar
    Next, you have to put the two together (I used a self-extracting zip file. It contained MyApp.jar and jdom.jar).
    when the client extracts it onto their desktop and double clicks on MyApp.jar, it works perfectly.
    I don't think there's an easy way to package the jdom.jar in my jar and make this work.
    Hope this helps some other wary traveler!
    chewy

  • Extracting class files of a certain package from a jar.

    Hi,
    I want to extract all the class files belonging to a certain package from a JAR file containing class files belonging to a different packages.
    Can I do this using the jar tool, or use some other unzipping tool?
    If it is best to use an unzipping tool which one can I use for windows?
    Thanks,
    Niranjan.

    jar xf file.jar path/to/dir
    For more info see http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/jar.html.

  • Need help: how to make a package into a jar file?

    I tried to make a package into a jar file by using:
    jar cf a.jar packagedirectory
    But when I import one class of this package in an other application, by using:
    javac -cp path\a.jar; app.java
    the compliler can not find the calss.
    The interesting thing is if I do not put the package into the jar file, it works well.
    Here is my sample code under path D:\b\b1
    package b1;
    public class Son
         int x = 10;
         public Son(){
         public int getX(){
              return x;
    and the application code under path d:\b
    import b1.Son;
    public class Father
         public Father(){
         public static void main(String[] args)
              Son son = new Son();
              System.out.println("Hello World!"+son.getX());
    Thanks for any advise.
    Xin Cheng

    You must make sure that you are in the right directory
    when you do your jar command to create the archive.
    [home/trejkaz/proj/test/classes]% jar -cf a.jar
    path/to/package/*.class
    Thank you very much.
    Yes, I did as what you said, but it does not work.
    Here is what I did:
    1. Edit Father.java in D:\b
    2. Edit Son.java in D:\b\b1
    3. Compile Son.java
    4. Complie Father.java
    5. Make the a.jar by
    command jar cf a.jar D:\b\b1\ (I cheked the content of the a.jar, it seems right.)
    a.jar is in directory D:\b
    6. Delete Son.class in D:\b\b1
    7. Run Father.class by
    command: java -classpath D:\b\a.jar; Father
    error message is: Exception in thread "main" java.lang.NoClassDefFoundError: b1/Son
    at Father.main(Father.java:11)
    What is the problem?
    Thanks again.

  • My app works in IDE but not when packaged as a JAR, advice please?

    Hello,
    I've written my application which seems to work perfectly in my IDE, however when I package the application into a JAR, the JavaVM isn't happy with it. When executed, the JVM crashes somewhere early in my program (I'm guessing when it's loading resources) and I get a nice crash dialog from my OS describing some low level stuff.
    So my reason for posting is to gather some advice or guidance on how to tackle this. Is there a simple way to debug a program when it's in JAR form?
    Any comments will be welcomed! Thanks.
    CRASH INFO - just in case it's useful!! :)
    EXC_BAD_INSTRUCTON (0x0002)
    0x0000000D
    Thread 0 Crashed:
    0    JVM_RaiseSignal + 595867
    1    JVM_RaiseSignal + 596054
    2    JNI_CreateJavaVM_Impl + 49220
    3    JVM_Write + 18645
    4    callback + 317
    5    0 + 25151061
    6    __CFRunLoopDoObservers + 342
    7    CFRunLoopRunSpecific + 1548
    8    CFRunLoopRunInMode + 61
    9    0x1000 + 14040

    Those links you posted proved very useful. Using OS dumps a log file which points out an offending library. After a bit of googling, I manage to found out that it was coming from the SWT framework which my app is built on. I've written tons of SWT apps before but I've no idea why this one get upset when I run it?
    I've since took the time to compile and run a Windows & Linux version and they both work perfectly.
    Thanks for the help on this and judging my current situation I think it would be best to speak to the Eclipse/SWT people as this problem has gone slightly 'off-topic' :)

  • Using a UNIX shell script to run a Java program (packaged in a JAR)

    Hi,
    I have an application (very small) that connects to our database. It needs to run in our UNIX environment so I've been working on a shell script to set the class path and call the JAR file. I'm not making a lot of progress on my own. I've attached the KSH (korn shell script) file code.
    Thanks in advance to anyone who knows how to set the class path and / or call the JAR file.
    loggedinuser="$(whoami)"
    CFG_DIR="`dirname $0`"
    EXIT_STATUS=${SUCCESS}
    export PATH=/opt/java1.3/bin:$PATH
    OLDDIR="`pwd`"
    cd $PLCS_ROOT_DIR
    java -classpath $
    EXIT_STATUS=$?
    cd $OLDDIR
    echo $EXIT_STATUS
    exit $EXIT_STATUS

    Hi,
    I have an application (very small) that connects to
    our database. It needs to run in our UNIX environment
    so I've been working on a shell script to set the
    class path and call the JAR file.
    #!/bin/sh
    exec /your/path/to/java -cp your:class:paths:here -MoreJvmOptionsHere your.package.and.YourClass "$@"Store this is a file of any name, e.g. yuckiduck, and then change the persmissions to executechmod a+x yuckiduckThe exec makes sure the shell used to run the script does not hang around until that java program finishes. While this is only a minor thing, it is nevertheless infinite waste, because it does use some resources but the return on that investment is 0.
    CFG_DIR="`dirname $0`"You would like to fetch the directory of the installation out of $0. This breaks as soon as someone makes a (soft) link in some other directory to this script and calls it by its soft linked name. Your best bet if you don't know a lot of script programming is to hardcode CFG_DIR.
    OLDDIR="`pwd`"
    cd $PLCS_ROOT_DIRVery bad technique in UNIX. UNIX supports the notion of a "current directory". If your user calls this program in a certain directory, you should assume that (s)he does this on purpose. Making your application dependent on a start in a certain directory ignores the very helpful concept of 'current directory' and is therefore a bug.
    cd $OLDDIRThis has no effect at all because it only affects the next two lines of code and nothing else. These two lines, however, don't depend on the current directory. In particular this (as the cd above) does not change the current directory for the interactive shell your user is working in.
    echo $EXIT_STATUS
    exit $EXIT_STATUSEchoing the exit status is an interesting idea, but if you don't do this for a very specific purpose, I recommend not to do this for the simple reason that no other UNIX program does it.
    Harald.

  • Packages in separate Jars causes classpath error

    For the purposes of easy-updating and allowing developers to work on one part of a system without interfering with others, I have created separate Jar files for the main packages in my application. So;
    com.me.pack1 is in Pack1.jar
    com.me.pack2 is in Pack2.jar
    An ant build takes care of building and packaging these up. The Jar files have the correct directory structure i.e.;
    jar $ $JAVA_HOME/bin/jar tf /users/jmcparla/jar/Pack1.jar
    META-INF/
    META-INF/MANIFEST.MF
    com/
    com/me/
    com/me/pack1/
    com/me/pack1/MainClass.class
    jar $ $JAVA_HOME/bin/jar tf /users/jmcparla/jar/Pack2.jar
    META-INF/
    META-INF/MANIFEST.MF
    com/
    com/me/
    com/me/pack2/
    com/me/pack2/OtherClass.classHowever when I run it;
    jar $ $JAVA_HOME/bin/java -cp /users/jmcparla/jar/Pack2.jar -jar /users/jmcparla/jar/Pack1.jar
    Entered main
    Created MainClass instance
    Exception in thread "main" java.lang.NoClassDefFoundError: com/me/pack2/OtherClass
            at com.me.pack1.MainClass.main(MainClass.java:13)The classes are;
    MainClass.java
    package com.me.pack1;
    import com.me.pack2.OtherClass;
    public class MainClass
        public static void main(String[] args)
            System.out.println("Entered main");
            new MainClass();
            System.out.println("Created MainClass instance");
            new OtherClass();
            System.out.println("Created OtherClass instance");
    }OtherClass.java
    package com.me.pack2;
    public class OtherClass
    }and the build file is;
    build.xml
    <project name="JarProblem" default="buildJars" basedir=".">
      <property name="classdir" value="classes"/>
      <target name="compile" depends="clean" description="compile the code">
          <mkdir dir="${classdir}"/>
          <javac debug="on" debuglevel="vars,lines,source" srcdir="."
                 destdir="${classdir}" encoding="ISO-8859-1">
          </javac>
      </target>
      <target name="buildJars" depends="compile" description="build the jar files">
        <antcall target="buildPack2"/>
        <antcall target="buildPack1"/>
      </target>
      <target name="buildPack2" description="build the Pack2 jar">
        <tstamp>
          <format property="time" pattern="hh:mm aa dd/MM/yyyy"/>
        </tstamp>
        <jar destfile="Pack2.jar" update="false">
          <fileset dir="${classdir}">
            <!-- Only include the package we're building -->
            <include name="com/me/pack2/*"/>
          </fileset>
          <manifest>
            <attribute name="Built" value="${time}"/>
          </manifest>
        </jar>
      </target>
       <target name="buildPack1" description="build the Pack1 jar">
        <tstamp>
          <format property="time" pattern="hh:mm aa dd/MM/yyyy"/>
        </tstamp>
        <jar destfile="Pack1.jar" update="false">
          <fileset dir="${classdir}">
            <!-- Only include the package we're building -->
            <include name="com/me/pack1/*"/>
          </fileset>
          <manifest>
            <attribute name="Main-Class" value="com.me.pack1.MainClass"/>
            <attribute name="Built" value="${time}"/>
          </manifest>
        </jar>
      </target>
      <target name="clean" description="clean up the compiled source files">
        <delete verbose="false" failonerror="false">
          <fileset dir="${classdir}"/>
        </delete>
      </target>
    </project>The build completes with no problems. So why can't the java command see OtherClass?

    johnmcparlald wrote:
    However when I run it;
    jar $ $JAVA_HOME/bin/java -cp /users/jmcparla/jar/Pack2.jar -jar /users/jmcparla/jar/Pack1.jar
    Entered main
    Created MainClass instance
    Exception in thread "main" java.lang.NoClassDefFoundError: com/me/pack2/OtherClass
    at com.me.pack1.MainClass.main(MainClass.java:13)
    I can't help you with ant but I can tell you that the command you entered looks wrong. If you use the -jar option with the java command, the only classpath that is used is the one specified by the Class-Path entry in the manifest - other classpaths are ignored.
    So you either need to leave off the -jar, include the Pack1.jar file and specify the main class, or include the Class-Path: Pack2.jar entry in the manifest. (At least, it looks to me like there is no Class-Path in the manifest.)

  • Importing class from default package of a JAR

    I want to create objects of a class contained in a JAR. The JAR has many classes in numerous packages, however the class that I want to use is in the default package. I'm using eclipse and have added the JAR to the build path, but eclipse complains that the class name cannot be resolved. Is there some way to specify an import statement to look in the default package of a particular JAR? Any advice is appreciated.

    jg2009 wrote:
    I was under the impression that classes without a defined package were technically considered to be part of the so-called default package. But, in answer to your question, yes this class does not appear to part of any package.
    Just to provide so additional information, the class that I want to instantiate is an Applet, so it is designed to be called from an html object tag, and have access to all of the other classes in its JAR. There is a system that provides access to underlying data via the following components: html form <-> javascript <-> applet <-> serverlets <-> data
    I want to automate certain data operations, but the only way to access the underlying data is via the applet. Am I out of luck, or is there some way that I can instantiate the applet?All jverd said is right, assuming it is your code and you can change it: basically move everything to a package. But I think your problem is that the jar is a 3rd party jar and you cannot change it. If this is the case, you can use the 'default package' (the terminology is correct) by having your own class(es) in the default package or by using reflection (last time I tried reflection would work). Both are rather bad solutions, but if you really, really want...
    Note: Java actively discourages the use of the 'default package' and more so recently, this is why I am not even sure that reflection would still work.

  • Find a package/class in *.jar in-or-under a directory?

    Folks,
    Please, has anyone got a Java equivalent of:
    find . -name '*.jar' -exec fgrep -l "the.package.ClassName" {} \;That is: find all occurrences of "the.package.ClassName.class" in all JAR files located in-or-under the present working directory.
    My real problem is: I need to find, on windows, which JAR under D:\DevEnvironments\bea10.3\ contains the javax.ejb package (et al)... and I don't have time to write one myself. The javax.ebj package used to be in either weblogic.jar or webservices.jar (not sure which) in Weblogic 8.1 SP6.
    Cheers. Keith.
    PS: I INTENSLY DISLIKE WINDOWS!!! (but only because I hate people who hate stuff, as a matter of principle.)
    Edited by: corlettk on 21/04/2010 15:38

    corlettk wrote:
    Folks,
    Please, has anyone got a Java equivalent of:
    find . -name '*.jar' -exec fgrep -l "the.package.ClassName" {} \;That is: find all occurrences of "the.package.ClassName.class" in all JAR files located in-or-under the present working directory.I see a certain ambiguity here. Do you want to find references to that class or do you want to know if that class is defined and exists in the jar?

  • Duke$ - Multiple packages in one jar... again

    My jar contains 2 packages.
    One is my own, the other one is the JNIRegistry from Ice. (Excellent for Windows. Download it at: http://www.trustice.com/java/jnireg/index.shtml )
    My application starts from the jar file and works just fine, but as soon as one of my classes tries to import/load a class from the com-package, the NoClassDefFoundError exception is thrown.
    I created the jarfile in my app-folder by using:
    jar cfm myJarFile.jar manifest.mf myPackage com
    This is the folder tree:
    C:\
    |
    |-app
    |
    |--com (folder)
    |
    |--myPackage (folder)
    |
    |--manifest.mf
    I have checked the contents of the jarfile, nothing is missing.
    This is the manifest file:
    Main-Class: myPackage.App
    I am sure there must be a way around this... The closest solution I have found was at:
    http://forum.java.sun.com/thread.jsp?forum=22&thread=30891
    It says specify each class you want to import from the other package, for example dont use
    import com.ice.jni.registry.*;
    but
    import com.ice.jni.registry.Registry;
    import com.ice.jni.registry.RegistryKey;
    import com.ice.jni.registry.RegStringValue;
    So I did. Nothing changed, still the NoClassDefFoundError
    Any help?
    Thanks in advance

    Hey guys,
    This is how you do it. I have an example here for you to follow:
    -----Test.java
    package com.test;
    import another.one.*; // note * is ok to use!
    class Test
         public static void main(String[] args)
              System.out.println("Hello from Test!");
              Target.main(null);
    }------Target.java
    package another.one;
    public class Target
         public static void main(String[] args)
              System.out.println("Hello from Target!");
    }place files like so:
    {path}/com/test/Test.java
    {path}/another/one/Target.java
    compile classes, then create a manifest:
    ---manifest.txt
    Main-Class: com.test.Test
    {a blank line here}
    place at:
    {path}manifest.txt
    now create jar;
    {path}> jar cmf manifest.txt myJar.jar com/ another/
    and enjoy ;-) java -jar myJar.jar
    -Ron

  • GIFs in package resources in JAR

    Hello all,
    I am deploying a java GUI with resource GIFS in a JAR.
    While I am developing in the IDE (Eclipse) everything works out fine: the resource GIFS are loaded from the package resources and are displayed in the GUI.
    Then I distribute a JAR using Ant: see manifest.mf at the end of the text.
    When I deploy the application now, no resource GIFS are displayed on the GUI. This behaviour changes non-deterministically.
    Error could be the packaging into JAR or display of the GUI?
    Thank you in advance,
    Gerrit Leder
    -----------------------------------------------------------------manifest.mf:
    Manifest-Version: 1.0
    Created-By: 1.5.0_09 (Sun Microsystems Inc.)
    Main-Class: vci/VciManagement
    Class-Path: .

    When I loaded the Image with getImage(...) I used checkImage(...):
    In the IDE the Result was 0.
    Then I loaded the Image with getImage(...) and used prepareImage(...) and then checkImage(....):
    In the IDE the result was 7 then 39.
    In the Jar the result was 64.
    What is the int code representing?
    Here is my code now:
    class ViewComponent extends JComponent
         private Image image;
         private int iResult;//checkImage: Result
         private boolean bResult;//prepareImage: Result
         protected void paintComponent( Graphics g )
              // Dimension size = this.getSize();
              this.setLocation(35,0);
              if (image.getWidth(this) <= 0 ){
                   this.setSize(16,16);
              } else {
                   this.setSize(image.getWidth( this), image.getHeight(this ) );
              if ( image != null ){
                   g.drawImage( image, 0, 0, this );
                   // System.out.println( "paintComponent: width = " + image.getWidth( this) + ", height = " + image.getHeight(this ) );
         public void setImage( String filename )
              image = Toolkit.getDefaultToolkit().getImage( filename );
              System.out.println( "filename >" + filename + "<: width = " + image.getWidth( this) + ", height = " + image.getHeight(this ) );
              if ( image != null )
                   bResult=prepareImage(image,
                        image.getWidth(this),
                        image.getHeight(this),
                        this);
                   iResult=checkImage(image,
                        image.getWidth(this),
                        image.getHeight(this),
                        this);
              System.out.println("BEFORE repaint(), checkImage Result: " + Integer.toString(iResult));
                   repaint();
                   iResult=checkImage(image,
                        image.getWidth(this),
                        image.getHeight(this),
                        this);
              System.out.println("AFTER repaint(), checkImage Result: " + Integer.toString(iResult));
    }

  • SIP      Where can I find (JSR 180 Package - the actual jar files)

    Hey guys I have been looking for this for hours I'm up to my ears in lovely documentation and samples where can I find the actual jar file of an implementation of the SIP API for J2ME.
    Thank you in advnace Brian

    jjsomer,
    Unfortunately, we offer no such installer package. The closest thing to
    what you desire is the LabVIEW Device Drivers CD which comes with
    LabVIEW. It will install all hardware drivers. Another option would be
    to write a batch file to run the installers in silent mode. Searching
    ni.com for "silent install" should yeild several results for installing
    our software products and device drivers without user interaction.
    Good luck!
    Ryan Verret
    Product Marketing Engineer
    Signal Generators
    National Instruments

  • Using 3rd Party packages when creating jar - program doesn't run

    I am using the xerces and xom packages for xml etc in my program.
    It works fine when run from a command prompt, but as soon as I package it into a jar I get the java.lang.NoClassDefFound error for the nu.xom.Builder class (one of the 3rd party classes.)
    Reading through these forums has yielded several suggestions, none of which work.
    I am probably making some massive stupid mistake, but cannot see it...
    My manifest:
    Manifest-Version: 1.0
    Created-By: 1.6.0 (Sun Microsystems Inc.)
    Main-Class: be.bavardage.vocab.VocabGUI
    Class-Path: serializer.jar xercesImpl.jar xercesSamples.jar xml-apis.jar xom-1.1.jar
    using the jar comand line prompt:
    jar cfm vocab.jar MANIFEST.MF be\bavardage\vocab\*.classCan anyone give me any indication as to what I am doing wrong...

    bavardage,
    I too am reading forum messages to try to do just what you originally wanted to do. I have 3rd party JARs and I have always first extracted them and then turned around and JAR'ed them up into my single Remote.jar (actually I'm so new to Java that I don't yet change things that aren't broken and this was working when I got it)
    jar  xf  jakarta-oro-2.0.5.jar
    jar  xf  jasperreports-1.2.1.jar
    jar  xf  iReport.jar
    jar cmf  mainClassSpec  Remote.jar  *.class  org/  net/  it/I am reading the forums for a way to NOT do this. My reason is because I want to make the application Java Web Start (JAWS) capable. By zipping all the JARs up into one I end up with a JAR over 6 MB! I am also adding internationalization and I really need to keep the ListResourceBundle classes in a separate JAR so I can keep adding languages and not cause the entire 6 MB file to be downloaded each time.
    Using Java Web Start is the real motivating force here. I need to keep all JARs separate so that when there are code changes or new languages only one small JAR will be downloaded again by JAWS not the huge iReport.jar file at 4,218KB nor the somewhat smaller jasperreports...jar at 1,225KB (at 64KB jakarta-oro...jar is hardly worth mentioning) .
    I will watch this thread to see if you or anyone else later comes up with the information to reference external JARs (while in a Java Web Start environment).
    So to put it in a question format, can anyone provide some information about referencing external JARs in a normal environment and will it work in a JAWS environment (I do know the technique for specifing and downloading multiple JARs in a JNLP file)?
    Hopi(ng)

  • Loading multiple-package applet from JAR

    Hi, apologies in advance if this has been dealt with in this forum already. I've got two questions:
    Question one: I have written two packages, evolve and fences. I would like to run fences.Fences.class which is an applet. I went to my classpath directory and typed
    jar cf mystuff.jar evolve fences
    (each package lives in its own directory off the classpath.)
    then made a web page that said
    <html><body>
    <applet code=fences.Fences.class archive=mystuff.jar>
    </applet>
    </body></html>
    I then piped the HTML file and mystuff.jar up to a remote server to make sure I wasn't reading my local fences package, made them world readable, and tried to load the web page. On my local machine, a Linux box running Galeon 1.2.5 (Mozilla, basically), I could load the applet. On a separate box running IE 5 I got the error in the status bar "load: class fences.Fences not found" . I'm not sure how to open the Java console in IE so I can't give any more info than that.
    I suspect that perhaps my local box is still somehow using my local classes or an old copy of the applet and is not loading from the archive, but I can't be sure.
    Question two: Until stumbling upon the answer in this forum, I wasn't sure how to run an applet that used more than one user-created package. I see that I can package both into one archive; but I thought that I could also have separate .jar files for each package and then specify both in the "archive=" <applet> parameter. It didn't seem to work. Anybody know if there's a way to do this?
    Thanks in advance for any help!

    yes, i've seen that since i originally posted, tried it - didn't work. I've since tried another even simpler test, to try to isolate the problem. I wrote this code in a file called Tester.java:
    import javax.swing.*;
    class Tester extends JApplet {
      public void init() {
        getContentPane().add(new JButton("Hi"));
    }I compiled this class and put it at http://www.cs.uga.edu/~gundlach/jartry/Tester.class . I then created a webpage in the jartry/ directly that says:
    <html><body>
    <applet code=Tester.class width=55 height=68></applet>
    </body></html>
    Then, using Mozilla to go to http://www.cs.uga.edu/~gundlach/jartry/test.html , I get the applet with the single button. When I open it in IE 5, it says "load class Tester not found" when I mouseover the applet.
    What the heck am I doing wrong?
    Thanks
    Michael

  • Cant view package contents in .jar file Mac OS X

    I understand that I should be able to right-click on a .jar file to get a number of options, one of which is 'show package contents'.
    I have created a .jar file of my project, but when I right-click, no such option appears, so I can't see what's inside.
    Any suggestions?
    Also, is there a better way to view and edit the package contents, in particular the manifest file?

    Martin_J wrote:
    I understand that I should be able to right-click on a .jar file to get a number of options, one of which is 'show package contents'.
    I think you may be confused between the jar file, and the application bundle on OS X. When you hold down the ctrl key and then left click, normal click on an application bundle file, you do indeed see a number of options. One of which is to show package contents. An application bundle is a form of a directory and showing the package contents allows you to navigate the directory of the bundle on OSX.
    I have created a .jar file of my project, but when I right-click, no such option appears, so I can't see what's inside.
    Correct. Neither can I. I've not heard of right clicking on jar files to see inside.
    Any suggestions?
    Also, is there a better way to view and edit the package contents, in particular the manifest file?The manifest file is part of the jar file. The application bundle is assembled from, among other resources, the jar files that make up your application.

Maybe you are looking for

  • Unable to download flashplayer on WINDOWS 8 Firefox v 18

    I have set up a new Windows 8 64bit  Desktop with 2 Users. Both use Firefox. One User - the administrator has no problem watching YouTube/ News videos etc. The other User can click on videos but nothing shows or the video window flashes on and off. A

  • How do I know the source of 0DOC_CATEG in a report since mapped from 3 diff

    Hi, How do I know the source of 0DOC_CATEG in a report since mapped from 3 different sources I have in report a 2 chars, 0DOC_CATEG and 0DOC_TYPE which are in a dimension Dim1 in the multiprovider Mult1. In the Identification for the multiprovider, i

  • Import metadata to jpeg files

    i want to import massively metadata to jpeg files. Can you help me to import metadata such as keywords. I have already tried with xmp toolkit of Adobe but the metadata is not readable from file info in Adobe Photoshop CS2 What seems to be the problem

  • ABAP Code Generator

    Hi, I wish to write a program that generates and create the code for me. One example could be I see a standard SAP Module which I like, but want to change it slightly. I enter the function module in to a program click execute it it generate an identi

  • Oracle error in SAP

    Hi experts we are facing oracle error while installing SAP '10.2.0.1' is not allowable for "optimizer_feature_enabled. Currently our oracle version is 10.1.0.2 Please suggest which patch we should apply to over this error or pls suggest some solution