Zip/jar files...

I am writing an application that uses a JEditorPane to display HTML pages. I want to let the user plug-in their own pages using a zip or jar file...i.e. the user stores their HTML pages/images in a jar file and my application can pick these up and display them in the JEditorPane. This works fine for the HTML pages but the images are not displayed. Does anyone know how I can get the images of a HTML page to display without writing the page and/or images to the user's machine? In other words how can I access the images in the zip or jar file via the HTML document?

any Browsable Component will not access the Filestructure of a Zipfile
therefore you have to build up a ProxyComponent which will make the Resource accessable
Step 1
Write a Component which can Access Zip Files
Step 2
Build up a Component wich parse the htmlFile and replaces the Image links with an url of a Servlet like <a href = "\pics\Foo.jpg"> to Step3
write a Servlet wich is Named ResourceServlet wich will send the HTML File if no Parameter is given
(the htmlfile is loaded by Component 1 and Parsed by Component2)
and if Parameter obj is given send the requestet image (loaded by component 1)
Effect is, if you request the html File with aBrowsercomponent, the Browsercomponent will load all images afterwards suczessive
Step4
access the Servlet with a JTextField by Using a HTMLenabled variant and specifing the url:
localhost:8080/servlet/ResourceServlet

Similar Messages

  • How to extract ZIP/JAR files?

    Hello,
    How can I extract zip/jar files ?
    Eric

    If you are talking java, you can use the java.util.zip classes.
    ZipFile, ZipEntry, ZipInputStream, ZipOutputStream
    You can find lots of examples through google:
    http://www.google.com/search?hl=en&q=java+zip+code+example&meta=Cheers,
    evnafets

  • Looking for copy of older MSAccess.zip (.jar) file

    Hi,
    I had been using a version of the MSAccess.zip (.jar) file that I downloaded about a year ago (March 2005) that I lost when I got a new workstation recently. For whatever reason, the MS Access database I need to migrate doesn't play well with the MSAccess.zip (.jar) file and OMWB that was put out by Oracle in late June of 2005 and is the current version avaialble for download on OTN. I've still got the version of OMWB that I downloaded last year, just not the MSAccess.zip (.jar) file. Does anyone know where I can lay my hands on that older version of the MSAccess.zip (.jar) file? I would be very appreciative if someone could help out.
    Thanks in advance,
    Steve

    Hi Steve,
    Could you elaborate on your comment that the MS Access database you "need to migrate doesn't play well with the MSAccess.zip (.jar) file and OMWB that was put out by Oracle in late June of 2005"? Are you having difficulties exporting your MDB file using the Exporter tool i.e. omwb<version>.mde? If so, could you please post the error to assist in resolving the issue.
    We would recommend that you use the latest version of the workbench and the MS Access plugin, which would be those released last year. If we can resolve your issue, hopefully you should be able to successfully migrate your database using the latest version of the workbench.
    Could you also supply the following information:
    * OS Version
    * Version of MS Access installed on your machine
    * Service Pack version
    * Version of the MS Access database you are attempting to export
    Regards,
    Hilary

  • How to store ZIP & JAR files.

    I am succeeded in storing & then sending big files as an attachment except for ZIP & JAR files.Can anyone guide me what's the problem with ZIP & JAR files

    Hi sachin !!
    I m facing problem in big size attachments ..
    it always give me exception
    javax.mail.SendFailedException: Sending failed;
    nested exception is:
    javax.mail.MessagingException: 552 Message size exceeds fixed maximum message size
    at javax.mail.Transport.send0(Transport.java:218)
    at javax.mail.Transport.send(Transport.java:80)
    at MailTest.postMail(MailTest.java:82)
    at MailTest.main(MailTest.java:19)
    Can u tell me how to set the size for large attachments ?
    File size upto 1 mb work fine , but file with 2mb size gives me problem ..
    Plz reply me Fast , waiting :)
    thanx
    Regards
    Khurram

  • Problems uncompressing compressed jar files

    Hi all,
    I am seeing an unusual issue where some entries don't have full header info. By this I mean, according to the ZIP spec, it is possible that the header info is stored before the file data, so you CAN get the right info. But sometimes, it can be stored as an EXT header, where it is some place AFTER the compressed file data.
    So most of the time we are getting good size/comrpessed size info and can properly get the entry out of the zip file. But sometimes, we get -1 values and are not able to get the entry at all.
    We are working on allowing a classloader to get classes out of an "embeded" zip/jar file. In other words, a jar file can contain embeded zip/jar files (only 1 level deep), and our classloader not only finds the classes of the main jar file (using the URLClassLoader capabilities, but if a class being looked for is not found in the main jar file, we then try to find it in any embeded jar/zip files. Finding the classes is fine, trying to create .class files out of the compressed data from an embeded jar/zip is the problem.
    We are getting NegativeArraySizeExceptions thrown.
    URLConnection connection = resURL.openConnection();
    byte[] classData = new byte[connection.getContentLength()];
    InputStream input = connection.getInputStream();
    The resURL points to an embeded jar/zip within the outer jar file. The exception is thrown in the 2nd line above, when we try to create the byte[] array to hold the class data. The getContentLength() returns -1.
    Any help would be appreciated. Thanks.

    ZipInputStream only reads the local file header (LFH) of an entry if getNextEntry() is called, when the size and compressed size are not in the LFH becourse the sizes were unknow when the LFH was written the sizes are set to -1 and a flag is set to indicate that the entry has an EXT header after the data which contains the sizes.
    So I think the only thing you could do at the moment it to write an extension of ZipInputStream that checks if the flag is set and then looks for the EXT header to get the sizes but the difficult part is to get the data, ZipInputStream uses a PushbackInputStream to read the data but that InputStream doesn't support the mark method.
    Good luck.

  • Can I increase heap memory without specify any class or jar file??

    Hi,
    I tried to increase my heap memory in this way :
    java -Xms256m -Xmx256m
    but I got an error ... it's seem that I must specify a class java or a .jar file ...
    This is the error :
    Usage: java [-options] class [args...]
    (to execute a class)
    or java [-options] -jar jarfile [args...]
    (to execute a jar file)
    where options include:
    -client to select the "client" VM
    -server to select the "server" VM
    -hotspot is a synonym for the "client" VM [deprecated]
    The default VM is client.
    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
    A ; separated list of directories, JAR archives,
    and ZIP archives to search for class files.
    -D<name>=<value>
    set a system property
    -verbose[:class|gc|jni]
    enable verbose output
    -version print product version and exit
    -version:<value>
    require the specified version to run
    -showversion print product version and continue
    -jre-restrict-search | -jre-no-restrict-search
    include/exclude user private JREs in the version search
    -? -help print this help message
    -X print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
    enable assertions
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
    disable assertions
    -esa | -enablesystemassertions
    enable system assertions
    -dsa | -disablesystemassertions
    disable system assertions
    -agentlib:<libname>[=<options>]
    load native agent library <libname>, e.g. -agentlib:hprof
    see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
    load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
    load Java programming language agent, see java.lang.instrument
    -splash:<imagepath>
    show splash screen with specified image
    can I increase heap memory without specify any class or jar file??
    thx

    chiara wrote:
    Hi,
    I tried to increase my heap memory in this way :
    java -Xms256m -Xmx256m
    but I got an error ... it's seem that I must specify a class java or a .jar file ...
    This is the error :
    Usage: java [-options] class [args...]
    (to execute a class)
    or java [-options] -jar jarfile [args...]
    (to execute a jar file)
    can I increase heap memory without specify any class or jar file??The job of java.exe is to execute java bytecode.
    What is it supposed to do with your request to use 256m of memory for heap
    when you are not giving it a class or a jar to run?

  • Making jar files using API

    hello!
    I m trying to make a jar file using the API. When the jar tool is used for the same manifest file, it is correctly written and an executable jar is created. When I use the API, the jar file is made but it is nor executable. Here is that part of code:
    jar = new File(parent, jarName);
    System.out.println("Executing jar command...");
    //create jar file here
    Manifest mf = new Manifest(new FileInputStream(manifest));
    fos = new FileOutputStream(jar);
    jos = new JarOutputStream(new BufferedOutputStream(fos), mf);
    BufferedInputStream reader = null;
    byte[] data = new byte[BUFFER];
    int byteCount = 0;
    for(int i = 0; i < fileNames.length; i++)
    System.out.println("Adding " + fileNames);
    FileInputStream fis = new FileInputStream(fileNames);
    reader = new BufferedInputStream(fis, BUFFER);
    JarEntry entry = new JarEntry(new ZipEntry(fileNames));
    jos.putNextEntry(entry);
    while((byteCount = reader.read(data,0,BUFFER)) != -1)
    jos.write(data, 0, byteCount);
    }//end while
    reader.close();
    }//end for
    jos.close();//close jar output stream
    fos.close();
    I m sure someone will be kind and intelligent enough to solve the problem. Thank you!
    Umer

    A jar file is simply a Zip file. So the two API's are quite similar. First, you create a CRC - that is a way to make sure that the file isn't corrupted and that all the bytes are there (it's a polynominal algorithm that returns a number which is written in the Zip(Jar) file as well). Each entry is a file or directory. Before writing any data to the Zip(Jar) file, you have to write info on the actual file (like name, path, length etc). That's why you use putNextEntry(). Each file can have it's storing methods, although the most common is to use the "default" methods (built in the ZipOutputStream/JarOutputStream)
    But in this example you set the storing methods on the entry. You use the setMethod() method to switch between either storing or compression (don't know why, but in this example you don't compress the file - you should). I myself don't use the setSize() and setCompressedSize() methods at all (and it works fine). Don't know exactly what are the implications of using them. Neither do I use the setCrc() method (If I think a little, I've only used this API once - I don't use it that much), but it's quite straightforward. It's used to check that the data is ok, and since the CRC number is the result of an algorithm, it needs to know the bytes of UNCOMPRESSED data: that's why you use crc.update() on the bytes. After that you actually write all the info set before to the Zip (Jar) file using putNextEntry(). But remember that a ZipEntry doesn't have any data. You'll have to write it yourself: thus the need for the write method: Here are two small programs I used for Zipping and Unzipping. Changing them to work for Jar files is extremely simple:
    //Zip.java
    import java.io.*;
    import java.util.zip.*;
    public class Zip
         public static void main(String[] arg)
              try
                   if (arg.length < 3)
                        System.out.println("Usage: java Zip <0-9> <zip file> <file 1> [file 2] [file 3] ...");
                        System.exit(0);
                   System.out.println("Compressing files into file " + arg[1]);
                   ZipOutputStream out = null;
                   try
                        out = new ZipOutputStream(new FileOutputStream(arg[1]));
                   catch (FileNotFoundException ex)
                        System.out.println("Cannot create file " + arg[1]);
                        System.exit(1);
                   try
                        out.setLevel(Integer.parseInt(arg[0]));
                   catch (IllegalArgumentException ex)
                        System.out.println("Illegal compression level");
                        new File(arg[1]).delete();
                        System.exit(1);
                   for (int i=2; i<arg.length; i++)
                        System.out.println("\tCompressing file " + (i-1));
                        FileInputStream read = null;
                        try
                             read = new FileInputStream(arg);
                        catch (FileNotFoundException ex)
                             System.out.println("\tCannot find file " + arg[i]);
                             continue;
                        out.putNextEntry(new ZipEntry(arg[i]));
                        int av = 0;
                        while ((av = read.available()) != 0)
                             byte[] b = new byte[av < 64 ? av : 64];
                             read.read(b);
                             out.write(b);
                        out.closeEntry();
                        read.close();
                        System.out.println("\tDone compressing file " + i);
                   System.out.println("Done compressing");
                   out.finish();
                   out.close();
              catch (Exception e)
                   new File(arg[1]).delete();
                   e.printStackTrace(System.err);
    And the unzipping app:
    //UnZip.java
    import java.io.*;
    import java.util.*;
    import java.util.zip.*;
    public class UnZip
         public static void main(String[] arg)
              try
                   if (arg.length < 1)
                        System.out.println("Usage: java UnZip <zip file> [to dir]");
                        System.exit(0);
                   String dir = "";
                   if (arg.length > 1)
                        dir = arg[1] + System.getProperty("file.separator");
                        File f = new File(arg[1]);
                        if (!f.exists()) f.mkdirs();
                   System.out.println("Decompressing files from file " + arg[0]);
                   ZipFile read = null;
                   try
                        read = new ZipFile(arg[0]);
                   catch (ZipException ex)
                        System.err.println("Zip error when reading file " + arg[0]);
                        System.exit(1);
                   catch (IOException ex)
                        System.err.println("I/O Exception when reading file " + arg[0]);
                        System.exit(1);
                   Enumeration en = read.entries();
                   while (en.hasMoreElements())
                        ZipEntry entry = (ZipEntry) en.nextElement();
                        System.out.println("\tDecompressing file " + entry.getName());
                        FileOutputStream out;
                        try
                             out = new FileOutputStream(dir + entry.getName());
                        catch (FileNotFoundException ex)
                             System.err.println("\tCannot write down to file " + dir + entry.getName());
                             continue;
                        InputStream re = read.getInputStream(entry);
                        int nRead = 0;
                        for (byte[] buffer = new byte[1024]; (nRead = re.read(buffer)) != -1; out.write(buffer, 0, nRead));
                        out.close();
                        System.out.println("\tDone decompressing file " + entry.getName());
                   read.close();
                   System.out.println("Done decompressing files");
              catch (Exception e)
                   new File(arg[1]).delete();
                   e.printStackTrace(System.err);

  • Need Help for Jar Files Operations!

    Hi,
    I am trying to extract files from jar file using the java code. Does any one knows how can one do this using java code.
    Or
    is there any facility that I can use the unjar command inside the java code to extract it. I wonder about this!
    Or
    does java povide Java APIs provides facility for this. I have gone thourgh java.util.jar package but am not to get how can this be used for the above purpose?
    Thanks.
    Huzefa

    The following will display each file in the zip/jar file to the screen.
    ZipInputStream zin = new ZipInputStream( new FileInputStream( "z:\\myzip.zip" ) );
    ZipEntry entry;
    while( (entry = zin.getNextEntry() ) != null ) {
         System.out.println( "Entry: " + entry.toString() );
         byte[] buf = new byte[ (int)entry.getSize() ];
         zin.read( buf, 0, (int)entry.getSize() );
         System.out.write( buf, 0, (int)entry.getSize() );
    Jar* extends Zip*.

  • OID CallOutPortlet Link does not contain .jar file

    http://otn.oracle.com/sample_code/products/oid/index.html
    Follow the directions and no .jar file appears. Please fix

    Hi,
    Seems like the problem occurs only when you try to download the jar using IE browser. I tried using IE 6.0 and it reported a problem.
    The jar files are present in proper directories. You can download the same jar file using Netscape browser 7 or above and it works fine. We are looking into the IE issue.
    Alternatively, I can suggest to right click and save the zip/jar file in the local desktop.
    Thanks
    Regards
    -- Umesh

  • Jar files downloaded from SkyDrive are being renamed to jar.zip files

    I have cut and pasted the following series of exchanges from when I posted the problem onto SkyDrive's support forum. I hope that someone might be able to propose a better solution to the problem that I have. Thanks for your help.
    MDSms asked on
    Uploaded jar files convert to jar.zip files when downloaded from SkyDrive
    I have uploaded an executable jar file to SkyDrive. (I will call this FILE.jar). The file is intact and indicates that it is a jar file type when the file is viewed by Properties within Skydrive. However, when I download (or others download through a share link) the file, it is being saved onto the local computer's download file with .zip appended to the file name (FILE.jar.zip). The downloaded file can be renamed to remove the .zip appendage and subsequently run successfully. However the folder options for the folder where the downloaded file resides must be changed for disable "Hide known file extensions" prior to being able to remove the .zip appendage. While I have figured out the workaround for this problem, this manual renaming procedure is entirely too cumbersome as a solution for sharing this file with others. How can I prevent or disable the FILE.jar file from being renamed to FILE.jar.zip when it is downloaded from SkyDrive?
    All Replies (5)
    Audrey_P. replied on
    Forum Moderator
    Hi,
    Thank you for posting. Let me try to assist you with your issue with your files.
    In order for us to reproduce the issue on our end. Please provide us with the exact steps that you did when you uploaded the files as well as the steps when you are downloading it.
    We will be needing the steps to help us figure put what is causing you this issue.
    We look forward to your response.
    Thank you.
    Audrey P.
    MDSms replied on
    Reply
    The file was uploaded by first logging onto my SkyDrive account using Windows 7 Pro and Firefox browser, then a new folder in my account was created without sharing privileges, then the folder was opened and the FILE.jar was uploaded into the folder using the "Upload" option on skydrive account menu. Sharing privileges for FILE.jar were then created (view only), and the shortened url link was sent to the individuals that I was trying to share the file with. was then turned on. When these people use the link to download the file, it is being saved as FILE.jar.zip.
    When I try to download the file through the skydrive account download option, it is being saved onto my computer as FILE.jar.zip and this occurs when I try to download the file while signed into my skydrive account as well as when I am not signed into my skydrive account (using the shared file link).
    This PNG shows the information provided by clicking on the download icon (down arrow) within the Firefox browser; note that the file was downloaded as FILE.jar.zip and that the source was live.com. When I use Windows Explorer to look at the same file within the Download folder itself, examining the file's properties details also shows that it is being saved as FILE.jar.zip and is of the file type compressed zip folder.
    This PNG shows the information displayed to me from my skydrive account when I view the originally uploaded file's properties; note that the information shows that the file is a jar file type.
    When I utilize Internet Explorer 9 to access the file, FILE.jar is being downloaded onto my computer as a jar file type. This PNG shows the information provided by Tools/View Downloads within the IE9 browser. Note that in this instance, the information indicates that the file is being downloaded from yzudea.blu.livefilestore.com.
    It appears to me that the problem (the FILE.jar file being renamed to FILE.jar.zip) arises from the fact that a jar file downloaded from skydrive using firefox, is being sent from live.com whereas a jar file downloaded from skydrive using IE9 is being sent from yzudea.blu.livefilestore.com.
    I want to make sure that a person receiving a share link from me for FILE.jar is able to download it without modification to the file name regardless of which browser is being using to access the link. How can I make sure that this occurs?
    Any help is appreciated. Thanks.
    Michelle Anne D. replied on
    Forum Moderator Community Star Community Star
    Reply
    Hi MDSms,
    I appreciate you for providing as much information as you can about the issue, as well as for uploading screenshots on what you see from the downloaded file. About your initial concern wherein the file gets renamed with .zip after the original file extension, this is solely dependent on the browser that you are using since they have a different safety/security measure that needs to be implemented.
    Moreover, you may see the file servers live.com and yzudea.blu.livefilestore.com to be different with one another, but they actually are sent from the same SkyDrive server. This in turn, depends on the web browser where the file is being downloaded as well. The live.com file where it was downloaded from Firefox simply masks its original server yzudea.blu.livefilestore.com.
    As for your last query about your recipients downloading the file without the hassle of renaming it from a .zip file, you can simply tell them to download it through Internet Explorer.
    Should you have other queries or additional information that might help in our investigation, I highly encourage you to post them here.
    Regards,
    Michelle
    MDSms replied on
    Michelle,
    Thanks for your reply. Yes, I could simply tell them to download the file through Internet Explorer, but is there another solution or workaround to the problem I have described here? Am I being punished with the curse of this problem simply because I (or the individuals with which I wish to share FILE.jar with) choose to use Firefox instead of IE? Will the use of any other browser instead of IE (Chrome, Safari, etc., etc.) still result in the same problem?
    You stated that it is "solely dependent on the browser that you are using since they have a different safety/security measure that needs to be implemented"........could the problem be overcome by designating one or both of the file server addresses as Trusted Sites within the browser options setting?
    I look forward to your response. Thanks in advance.
    Joy V. replied on
    Forum Moderator Community Star Community Star
    Reply
    Hi MDSms,
    We understand your concern. Since the issue does not occur in Internet Explorer, it has something to do with Firefox's security feature. You might want to verify this concern by contacting Firefox support.
    Hope this helps. Let us know if we can further assist you with SkyDrive.
    Thanks,
    Melanie Joy

    Try to delete the mimeTypes.rdf file in the Firefox profile folder to reset all file actions.
    *http://kb.mozillazine.org/mimeTypes.rdf
    *http://kb.mozillazine.org/File_types_and_download_actions#Resetting_download_actions

  • How can I stop Microsoft IE renaming .jar files to .zip files?

    I realise this question has been asked before on this forum, but as far as I can tell no answer has yet been posted.
    If I put a .jar file on my webserver for people to download, later versions of Internet Explorer will rename the file from xxx.jar to xxx.zip on the client's machine. Is there any way of stopping this from happening?
    It looks like the problem is caused by IE examining the contents of the file and realising it uses ZIP compression. As a result, any file that I create (not just jars) that uses Java to zip the contents, when placed on a web server, gets interpreted as a .zip file by IE regardless of its extension.
    I realise there are some workarounds such as zipping the .jar file, creating a .exe file from the .jar, telling everyone to use Firefox etc., but none of these are really acceptable or particularly efficient. I am really hoping there is something I can do to the .jar file or the compression process that will tell IE to leave the file alone.
    Thanks,
    Jo.

    You can save any kind of document on iCloud Drive, as long as the file size is smaller than 15GB.
    See:   iCloud Drive FAQ
    Create a new folder for your Office documents on iCloud Drive and drag your documents there, or select iCloud Drive in the File Chooser panel, when you save a document.

  • Jar files ------wljrockit/docs142/JRA.zip

    Hi
    I have download the JRA from
    http:edocs.bea.com/wljrockit/docs142/JRA.zip
    Here i have 5 jar file.
    Where i shd add the jar files to use the Utility
    can anyone mail me in detail
    Thanks in Adv
    Regards
    maria
    [email protected]

    Hello Maria,
    It doesn't matter where you put the files as long as they are in the
    same directory. I suggest you create a directory somewhere on your
    machine called 'jra' and place all the files there. Then you should be
    able to run the JRockit Runtime Analyzer tool by doing
    java -jar RuntimeAnalyzer.jar
    Best regards,
    /Helena
    marianair nair wrote:
    Hi
    I have download the JRA from
    http:edocs.bea.com/wljrockit/docs142/JRA.zip
    Here i have 5 jar file.
    Where i shd add the jar files to use the Utility
    can anyone mail me in detail
    Thanks in Adv
    Regards
    maria
    [email protected]

  • Firefox 35 downloads sometimes jar file as a zip one

    This link: http://montoyo.net/wd2.php?t=mod&v=latest is a "Minecraft" mod that is supposed to download it as a .jar file(like it happens with Google Chrome or Opera), but Firefox renames it as a .zip file. Please solve this. Thanks :D.
    For more info about that web: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1291044-web-displays-browse-on-the-internet-in-minecraft
    Sorry by my English :D

    Try adding jar:// to the front of the url:
    [https://bugzilla.mozilla.org/show_bug.cgi?id=132008]

  • CLASSPATH, Jar file or zip file visibility during compilation and  run time

    I am using jwsdp-1_0_01 with some success.
    However, making my *.jar or *.zip files
    visible during ant builds is not working.
    Setting a CLASSPATH environment
    variable (BTW: I on a Linux box) seems
    to have no effect. I'm using the ant build
    machinery found the JWSDP download
    jwsdp-1_0_01/docs/tutorial/examples/jaxrpc/
    and as long as I don't reference anything in
    mystuff.zip
    compilation succeeds and tomcat is happy
    to provide my service. How can I get ant
    and tomcat to see 'mystuff.zip' or 'foo.jar'
    or whatever.
    Note: I was able to get past these problems
    using jwsdp-1_0-ea1 but (sigh) nothing learned there
    seems to help here.
    -joe

    Hi joe
    I made changes to targets.xml (in jwsdp-1_0\docs\tutorial\examples\jaxrpc\common) to include my own jar files.
    To enable Tomcat to see the jar files when I install the service, I copied them into jwsdp-1_0\common\lib.
    Here is the modified targets.xml (from Windows):
    <target name="compile-server" depends="prepare" description="Compiles the server-side source code">
    <echo message="Compiling the server-side source code...." />
    <javac srcdir="src" destdir="${build}/shared"
    includes="net\agmodel\metsoap\*.java"
    excludes="net\agmodel\metsoap\*Client.java"
    classpath="C:/jwsdp-1_0/common/lib/genericbroker.jar:C:/jwsdp-1_0/common/lib/weatherdata.jar" />
    </target>
    <target name="compile-client" description="Compiles the client-side source code">
    <echo message="Compiling the client source code...." />
    <javac srcdir="src" destdir="${build}/client" classpath="${jwsdp-jars}:build/shared:build/client:C:\jwsdp-1_0\common\lib\genericbroker.jar:C:\jwsdp-1_0\common\lib\weatherdata.jar" includes="net/agmodel/metsoap/*Client.java" />
    </target>
    Hope this helps.
    Good luck
    Matthew

  • Problem opening a zip file within a jar file

    Hi,
    I have a jar file in a tomcat web server. The jar file includes a zip file which I've been trying to open with the following sentences:
    SpellDictionary dict = null;
    File f = new File(getClass().getResource*("us_US.zip"*).getFile());
    dict = new OpenOfficeSpellDictionary( new ZipFile( f ) );
    I'm getting this exception:
    2007-09-13 15:31:38 java.util.zip.ZipException: No such file or directory
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:203)
    at java.util.zip.ZipFile.<init>(ZipFile.java:84)
    at com.iir.newsAdministration.textEditor.TextEditorSpellChecker.<init>(TextEditorSpellChecker.java:62)
    If I run the application with the builded classes instead of the jar file, it works fine.
    Any ideas about how can I make it work with the jar file?
    Thanks in advance
    Natalie

    File f = new File(getClass().getResource*("us_US.zip"*).getFile());
    This is not going to work.
    What you need to do is create a Jar/ZipFile from your jar, then extract the ZipFile, put that in a temporary location, then open that with another ZipFile object

Maybe you are looking for

  • ITunes for PC won't recognize iPad

    Running Vista Home Premium 32 bit.  No version of iTunes (version 10, 11, or even the one just released) will recognize iPad1.  AMDS service says Starting but never completes. Get an AMDS AppCrash message on Fault Module Name rpcrt4.dll.  It used to

  • Chinese text while downloading to excel

    Hello Everyone, I have one alv report in which text is coming into Chinese language. When i download my alv data to excel, chinese text is getting converted into #### characters. Anyone having idea how to download the chinese text from alv into excel

  • With multiple libraries, why don't I see library name when opening iPhoto?

    I have split my iPhoto Library, so that I have one library per year, eg library name: iPhoto 2009. When I open iPhoto, choosing a library, shouldn't I see the library name somewhere? Thanks, Owen

  • Some thoughts on trade-offs between usability and user-friendliness

    I use Awesome as a window manager over LXDE. Recently, a friend of mine tried to use my laptop. The experience frustrated him somewhat--he managed to start the browser through the menu shortcut, but it opened out of sight under the "web" tag. Once he

  • Spacer column  in Report

    Hi Experts, Could pls help me to create spacer column(Empty Column) in Report. Thanks&Regards, Sankara Reddy.