Help needed to zip file

Hi abap gurus..i need some help from u guys..my problem is i need to zip a file calling unix OS cmd in my program before the file is FTPed.can any one gimme sample code on how to do this? before FTP processing i need to call unix OS and rar the file to be FTPed?
thanks in advance

Please refer this blog:
/people/sameer.shadab/blog/2005/09/21/executing-unix-shell-script-using-operating-system-command-in-xi
Need a clear example of how to implement CL_ABAP_GZIP

Similar Messages

  • "zip" Terminal command no help fixing corrupt zip file; any other workarounds?

    I downloaded a ".zip" file containing some files that I need to access.
    When I double-click on it, I get the "Unable to unarchive 'xyz.zip' into '[foldername].' ( Error 1 - Operation not permitted )" message, which many people report when they try to open a corrupt zip file.
    I also tried opening the file with "StuffIt Expander," "Archive Utility," and "The Unarchiver," as well as some specialty zip-compression programs, but none were successful.
    I then installed the very useful "Archive.qlgenerator" plugin (http://homepage.mac.com/xdd/software/archive/) which allowed me to at least see inside the zip file using OSX's "QuickLook" feature. Lo and behold, all the files that were supposed to be in the zip file are indeed in there, as they should be. The problem is not that the zip file is empty, the problem is that it has become corrupted somehow.
    So, what I need to do is either "fix" the corrupted zip file, or alternately find some way to extract the needed files using brute force.
    Following tips given on various forums, I tried using OSX's "zip" command in terminal (http://homepage.mac.com/kelleherk/iblog/C1901548470/E731143104/index.html and http://hintsforums.macworld.com/showthread.php?t=132146). I was able to use it properly, but unfortunately neither the "-F" nor the "-FF" commands were of any helping in "fixing" the zip file. The "-F" command incorrectly said that the zip file was empty and that there was nothing to fix; the stronger "-FF" command came back with
    Could not find:
      xzy.z01
    Hit c      (change path to where this split file is)
        s      (skip this split)
        q      (abort archive - quit)
        e      (end this archive - no more splits)
        z      (look for .zip split - the last split)
    or ENTER  (try reading this split again):
    ...but none of the options produced any result. Pressing "z" gave me
    Could not find or open
      xyz.zip
    ...which means that even "-FF" could not get past whatever problem had corrupted the file.
    So: is there any built-in way for Mac OSX to fix or extract the contents of a zip file corrupted like this?
    Alternately, is there any third-party shareware or freeware that will do the trick?
    (I don't want to have to spend big $$$ on a commercial program since all I need to do is open a single zip file. And there is no way to contact the zip file's original creator, so I can't download an uncorrupted version.)
    Any help would be greatly appreciated.

    Mark:
    When I try your first suggestion in Terminal ("unzip -t /path/to/file"), I get this message:
    Archive:  /xyz.zip
      End-of-central-directory signature not found.  Either this file is not
      a zipfile, or it constitutes one disk of a multi-part archive.  In the
      latter case the central directory and zipfile comment will be found on
      the last disk(s) of this archive.
    unzip:  cannot find zipfile directory in one of /xyz.zip or
            /xyz.zip.zip, and cannot find /xyz.zip.ZIP, period.
    When I try your second suggestion ("unzip -l /path/to/file"), I get the exact same error message. (And yes, I am fixing "/path/to/file" to be the correct path to the actual file).
    And no, it is not really part of a multi-part archive. (Or at least it wasn't supposed to be; only one zip file is available, and there was only supposed to one.) Perhaps the zip was mis-encoded in the first place, so that the person who created it accidentally did something wrong which the unzip applications are interpreting as this file being part of a multi-part archive; but even so, all I have is this one file, so I need to fix it as is, or extract its contents as is, since I have no way to contact the original creator to do it right this time.

  • Need to Zip files in 10.3.9

    Is ther a built-in zip utility in Panther 10.3.9....or a free utility available for Panther? I need to Zip a few audio files for email. I have the free stuffit expander but the free version only expands and does not Zip.

    Great! It was actually right there in front of me every time I right clicked on a file. You guys have helped me out in a big way. Really appreciate it.

  • Help needed:Printing HTML file using javax.print

    Hi
    I am using the following code which i got form the forum for rpinting an HTML file.
    The folllowing code is working fine, but the problem is the content of HTML file is not getting printed. I am geeting a blank page with no content. What is the change that is required in the code? ALso is there any simpler way to implement this. Help needed ASAP.
    public boolean printHTMLFile(String filename) {
              try {
                   JEditorPane editorPane = new JEditorPane();
                   editorPane.setEditorKit(new HTMLEditorKit());
                   //editorPane.setContentType("text/html");
                   editorPane.setSize(500,500);
                   String text = getFileContents(filename);
                   if (text != null) {
                        editorPane.setText(text);                    
                   } else {
                        return false;
                   printEditorPane(editorPane);
                   return true;
              } catch (Exception tce) {
                   tce.printStackTrace();
              return false;
         public String getFileContents(String filename) {
              try {
                   File file = new File(filename);
                   BufferedReader br = new BufferedReader(new FileReader(file));
                   String line;
                   StringBuffer sb = new StringBuffer();
                   while ((line = br.readLine()) != null) {
                        sb.append(line);
                   br.close();
                   return sb.toString();
              } catch (Exception tce) {
                   tce.printStackTrace();
              return null;
         public void printEditorPane(JEditorPane editorPane) {
                   try {
                        HTMLPrinter htmlPrinter = new HTMLPrinter();
                        htmlPrinter.printJEditorPane(editorPane, htmlPrinter.showPrintDialog());
                   } catch (Exception tce) {
                        tce.printStackTrace();
         * Sets up to easily print HTML documents. It is not necessary to call any of the setter
         * methods as they all have default values, they are provided should you wish to change
         * any of the default values.
         public class HTMLPrinter {
         public int DEFAULT_DPI = 72;
         public float DEFAULT_PAGE_WIDTH_INCH = 8.5f;
         public float DEFAULT_PAGE_HEIGHT_INCH = 11f;
         int x = 100;
         int y = 80;
         GraphicsConfiguration gc;
         PrintService[] services;
         PrintService defaultService;
         DocFlavor flavor;
         PrintRequestAttributeSet attributes;
         Vector pjlListeners = new Vector();
         Vector pjalListeners = new Vector();
         Vector psalListeners = new Vector();
         public HTMLPrinter() {
              gc = null;
              attributes = new HashPrintRequestAttributeSet();
              flavor = null;
              defaultService = PrintServiceLookup.lookupDefaultPrintService();
              services = PrintServiceLookup.lookupPrintServices(flavor, attributes);
              // do something with the supported docflavors
              DocFlavor[] df = defaultService.getSupportedDocFlavors();
              for (int i = 0; i < df.length; i++)
              System.out.println(df.getMimeType() + " " + df[i].getRepresentationClassName());
              // if there is a default service, but no other services
              if (defaultService != null && (services == null || services.length == 0)) {
              services = new PrintService[1];
              services[0] = defaultService;
         * Set the GraphicsConfiguration to display the print dialog on.
         * @param gc a GraphicsConfiguration object
         public void setGraphicsConfiguration(GraphicsConfiguration gc) {
              this.gc = gc;
         public void setServices(PrintService[] services) {
              this.services = services;
         public void setDefaultService(PrintService service) {
              this.defaultService = service;
         public void setDocFlavor(DocFlavor flavor) {
              this.flavor = flavor;
         public void setPrintRequestAttributes(PrintRequestAttributeSet attributes) {
              this.attributes = attributes;
         public void setPrintDialogLocation(int x, int y) {
              this.x = x;
              this.y = y;
         public void addPrintJobListener(PrintJobListener pjl) {
              pjlListeners.addElement(pjl);
         public void removePrintJobListener(PrintJobListener pjl) {
              pjlListeners.removeElement(pjl);
         public void addPrintServiceAttributeListener(PrintServiceAttributeListener psal) {
              psalListeners.addElement(psal);
         public void removePrintServiceAttributeListener(PrintServiceAttributeListener psal) {
              psalListeners.removeElement(psal);
         public boolean printJEditorPane(JEditorPane jep, PrintService ps) {
                   if (ps == null || jep == null) {
                        System.out.println("printJEditorPane: jep or ps is NULL, aborting...");
                        return false;
                   // get the root view of the preview pane
                   View rv = jep.getUI().getRootView(jep);
                   // get the size of the view (hopefully the total size of the page to be printed
                   int x = (int) rv.getPreferredSpan(View.X_AXIS);
                   int y = (int) rv.getPreferredSpan(View.Y_AXIS);
                   // find out if the print has been set to colour mode
                   DocPrintJob dpj = ps.createPrintJob();
                   PrintJobAttributeSet pjas = dpj.getAttributes();
                   // get the DPI and printable area of the page. use default values if not available
                   // use this to get the maximum number of pixels on the vertical axis
                   PrinterResolution pr = (PrinterResolution) pjas.get(PrinterResolution.class);
                   int dpi;
                   float pageX, pageY;
                   if (pr != null)
                        dpi = pr.getFeedResolution(PrinterResolution.DPI);
                   else
                        dpi = DEFAULT_DPI;
                   MediaPrintableArea mpa = (MediaPrintableArea) pjas.get(MediaPrintableArea.class);
                   if (mpa != null) {
                        pageX = mpa.getX(MediaPrintableArea.INCH);
                        pageY = mpa.getX(MediaPrintableArea.INCH);
                   } else {
                        pageX = DEFAULT_PAGE_WIDTH_INCH;
                        pageY = DEFAULT_PAGE_HEIGHT_INCH;
                   int pixelsPerPageY = (int) (dpi * pageY);
                   int pixelsPerPageX = (int) (dpi * pageX);
                   int minY = Math.max(pixelsPerPageY, y);
                   // make colour true if the user has selected colour, and the PrintService can support colour
                   boolean colour = pjas.containsValue(Chromaticity.COLOR);
                   colour = colour & (ps.getAttribute(ColorSupported.class) == ColorSupported.SUPPORTED);
                   // create a BufferedImage to draw on
                   int imgMode;
                   if (colour)
                        imgMode = BufferedImage.TYPE_3BYTE_BGR;
                   else
                        imgMode = BufferedImage.TYPE_BYTE_GRAY;
                   BufferedImage img = new BufferedImage(pixelsPerPageX, minY, imgMode);
                   Graphics myGraphics = img.getGraphics();
                   myGraphics.setClip(0, 0, pixelsPerPageX, minY);
                   myGraphics.setColor(Color.WHITE);
                   myGraphics.fillRect(0, 0, pixelsPerPageX, minY);
                        java.awt.Rectangle rectangle=new java.awt.Rectangle(0,0,pixelsPerPageX, minY);
                   // call rootView.paint( myGraphics, rect ) to paint the whole image on myGraphics
                   rv.paint(myGraphics, rectangle);
                   try {
                        // write the image as a JPEG to the ByteArray so it can be printed
                        Iterator writers = ImageIO.getImageWritersByFormatName("jpeg");
                        ImageWriter writer = (ImageWriter) writers.next();
                                       // mod: Added the iwparam to create the highest quality image possible
                        ImageWriteParam iwparam = writer.getDefaultWriteParam();
                        iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT) ;
                        iwparam.setCompressionQuality(1.0f); // highest quality
                        ByteArrayOutputStream out = new ByteArrayOutputStream();
                        ImageOutputStream ios = ImageIO.createImageOutputStream(out);
                        writer.setOutput(ios);
                        // get the number of pages we need to print this image
                        int imageHeight = img.getHeight();
                        int numberOfPages = (int) Math.ceil(minY / (double) pixelsPerPageY);
                        // print each page
                        for (int i = 0; i < numberOfPages; i++) {
                             int startY = i * pixelsPerPageY;
                             // get a subimage which is exactly the size of one page
                             BufferedImage subImg = img.getSubimage(0, startY, pixelsPerPageX, Math.min(y - startY, pixelsPerPageY));
                                                 // mod: different .write() method to use the iwparam parameter with highest quality compression
                             writer.write(null, new IIOImage(subImg, null, null), iwparam);
                             SimpleDoc sd = new SimpleDoc(out.toByteArray(), DocFlavor.BYTE_ARRAY.JPEG, null);
                             printDocument(sd, ps);
                             // reset the ByteArray so we can start the next page
                             out.reset();
                   } catch (PrintException e) {
                        System.out.println("Error printing document.");
                        e.printStackTrace();
                        return false;
                   } catch (IOException e) {
                        System.out.println("Error creating ImageOutputStream or writing to it.");
                        e.printStackTrace();
                        return false;
                   // uncomment this code and comment out the 'try-catch' block above
                   // to print to a JFrame instead of to the printer
                   /*          JFrame jf = new JFrame();
                             PaintableJPanel jp = new PaintableJPanel();
                             jp.setImage( img );
                             JScrollPane jsp = new JScrollPane( jp );
                             jf.getContentPane().add( jsp );
                             Insets i = jf.getInsets();
                             jf.setBounds( 0, 0, newX, y );
                             jf.setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE );
                             jf.setVisible( true );*/
                   return true;
              * Print the document to the specified PrintService.
              * This method cannot tell if the printing was successful. You must register
              * a PrintJobListener
              * @return false if no PrintService is selected in the dialog, true otherwise
              public boolean printDocument(Doc doc, PrintService ps) throws PrintException {
                   if (ps == null)
                   return false;
                   addAllPrintServiceAttributeListeners(ps);
                   DocPrintJob dpj = ps.createPrintJob();
                   addAllPrintJobListeners(dpj);
                   dpj.print(doc, attributes);
                   return true;
              public PrintService showPrintDialog() {
                   return ServiceUI.printDialog(gc, x, y, services, defaultService, flavor, attributes);
              private void addAllPrintServiceAttributeListeners(PrintService ps) {
                   // add all listeners that are currently added to this object
                   for (int i = 0; i < psalListeners.size(); i++) {
                   PrintServiceAttributeListener p = (PrintServiceAttributeListener) psalListeners.get(i);
                   ps.addPrintServiceAttributeListener(p);
              private void addAllPrintJobListeners(DocPrintJob dpj) {
                   // add all listeners that are currently added to this object
                   for (int i = 0; i < pjlListeners.size(); i++) {
                   PrintJobListener p = (PrintJobListener) pjlListeners.get(i);
                   dpj.addPrintJobListener(p);
              // uncomment this also to print to a JFrame instead of a printer
              /* protected class PaintableJPanel extends JPanel {
                   Image img;
                   protected PaintableJPanel() {
                        super();
                   public void setImage( Image i ) {
                        img = i;
                   public void paint( Graphics g ) {
                        g.drawImage( img, 0, 0, this );
    Thanks
    Ram

    Ram,
    I have had printing problems too a year and a half ago. I used all printing apis of java and I still find that it is something java lacks. Now basically you can try autosense. To check whether your printer is capable of printing the docflavor use this PrintServiceLookup.lookupPrintServices(flavor, aset); . If it lists the printer then he can print the document otherwise he can't. I guess that is why you get the error.
    Regards,
    Kevin

  • Please help me in zip files?

    Please any one help me in creating a zip file using java and extracting it using winzip utility.
    Thanks in advance.

    You leave him with no other option ;)Dearest Queen, I think sjasja hinted at the several
    thousands of examples Google is likely to show.huh?!? Google always does. But I doubt if the OP would appreciate that considering his previous posts. ;)

  • Help needed making SWF file loop

    Hello Everyone-
    I have been researching this topic and am really struggling.
    I'm not much of a HTML guy and I think I'll need to do some to
    resolve my issues. I have searched and searched but I'm not having
    any luck.
    I create an animation in Apple Motion, exported it as a MOV
    and imported it as video into Flash CS3. It was encoded using
    Progressive download from server it creates a FLV file a SWF file
    and an HTML file. My provider is 1and1. I then use Adobe GoLive to
    create my webpage and upload to the web. I need my SWF file to loop
    and I cannot get it to loop.
    In flash. Everything plays fine. When I do a publish preview
    however, the swf file does not loop. I've got the loop option
    checked in my publish preview settings and even in the inspector in
    GoLive but it does nothing.
    Here is the link to the page. And the source code. If anyone
    can help me that would be genius.
    PS there is actually two SWF that I need to loop. Neither of
    them are looping.
    http://www.drewwfilms.com/Index2.html
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="content-type"
    content="text/html;charset=utf-8" />
    <meta name= content="Adobe GoLive" />
    <title>Drew W Films Index</title>
    </head>
    <body>
    <div
    style="position:relative;width:750px;height:571px;margin:auto;-adbe-g:p;">
    <div
    style="position:absolute;top:64px;left:16px;width:720px;height:150px;">
    <object
    classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
    height="150" width="720">
    <param name="loop" value="true" />
    <param name="movie" value="IndexHeader2/IndexHeader2.swf"
    />
    <param name="quality" value="best" />
    <param name="play" value="true" />
    <embed height="150" pluginspage="
    http://www.macromedia.com/go/getflashplayer"
    src="IndexHeader2/IndexHeader2.swf"
    type="application/x-shockwave-flash" width="720" quality="best"
    play="true" loop="true"></embed>
    </object></div>
    <div
    style="position:absolute;top:16px;left:64px;width:624px;height:32px;-adbe-c:c">
    <menumachine name="indexheader2" id="mre8mxf">
    <csobj t="Component"
    csref="menumachine/indexheader2/menuspecs.menudata"><noscript>
    <p><a class="mm_no_js_link"
    href="menumachine/indexheader2/navigation.html">Site
    Navigation</a></p>
    </noscript> </csobj>
    <script type="text/javascript"><!--
    var mmfolder=/*URL*/"menumachine/",zidx=1000;
    //--></script>
    <script type="text/javascript"
    src="menumachine/menumachine2.js"></script>
    <script type="text/javascript"
    src="menumachine/indexheader2/menuspecs.js"></script>
    </menumachine>
    </div>
    <div
    style="position:absolute;top:224px;left:16px;width:720px;height:304px;">
    <object
    classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
    height="304" width="720">
    <param name="loop" value="true" />
    <param name="movie" value="IndexHeader2/IndexBody.swf"
    />
    <param name="quality" value="best" />
    <param name="play" value="true" />
    <embed height="304" pluginspage="
    http://www.macromedia.com/go/getflashplayer"
    src="IndexHeader2/IndexBody.swf"
    type="application/x-shockwave-flash" width="720" quality="best"
    play="true" loop="true"></embed>
    </object></div>
    </div>
    <p></p>
    </body>
    </html>

    The problem you are encountering is that you are telling the
    SWF to loop, when in fact you need to tell the FLV to loop.
    Unfortunately, you need to code a few lines of Actionscript
    to get this to work, you would think that it would be as simple as
    just checking an option.
    I don't know if you have an AS2 or AS3 project, so I'm going
    to give you both for the code.
    Actionscript 2:
    1. Select the FLVPlayback component on the stage.
    2. In the Actions panel, enter the following:
    on(complete){
    this.autoRewind = true;
    this.play();
    Actionscript 3:
    1. Select the FLVPlayback component on the stage, and give it
    an instance name by entering some text in the properties panel.
    (Upper left corner of the panel, right under where it says
    "Component" there is a text input box. This is where you input it.)
    Names are commonly things like "myFLVPlayback" or "myVideo" etc.
    2. Deselect everything.
    3. In the actions panel, enter the following (replacing
    "myVideo" with the instance name you chose):
    myVideo.addEventListener(VideoEvent.COMPLETE,doLoop);
    function doLoop(evt:VideoEvent):void {
    evt.currentTarget.play();
    Either of those blocks of code should work for you. Simply
    add them to your flash project and re-export the SWF.

  • Help needed in splitting files using BPM

    Hello experts,
    I am working on an interface where i need to split files within BPM.
    I know,i can achieve it in Message Mapping by mapping Recordset to Target structure and then using Interface Mapping within Transformation step.But i dont want to follow this.Is there an alternative way to achieve this within BPM.
    I have an input file with multiple headers and i need to split for each header.My input file looks like this:
    HXXXXXABCDVN01
    MXXXXXXXXXXXXXX
    MXXXXXXXXXXXXXX
    SXXXXXXXXXXXXXX
    HXXXXXABCDVN02
    MXXXXXXXXXXXXXX
    MXXXXXXXXXXXXXX
    SXXXXXXXXXXXXXX
    HXXXXXABCDVN03
    MXXXXXXXXXXXXXX
    SXXXXXXXXXXXXXX
    Is there a way, where i can specify this condition within BPM , that split files for every H.
    Thanks in advance.
    Regards,
    Swathi

    Hi,
    have your target structure with occurence as 0...unbounded in the mapping and map the header filed to the root node (repeating parent node) of the target structure....this will create as many target messages as the header fileds....if you want to send these messages separately then use a block in BPM with ForEach option....
    Splitting and Dynamic configuration can be applied in the same mapping.
    Regards,
    Abhishek.
    Edited by: abhishek salvi on Dec 18, 2008 12:59 PM

  • I need help with this zip file so that I can let Dreamweaver do what it do.

    I need help. I bought a web design from a company called Envato. And file is zip, I heard that you use Abobe Illustrator to unzip the file, but I've tried that and got nothing. I've just download Dreamweaver with hopes that would work and again nothing. I NEED HELP!!!!

    To unZip a folder of files, you need to use a decompression utility such as WinZip, StuffIt or 7-UP.  Do you have either of those on your system?  If not get one & install it now.
    Open ZIP in your utility and EXTRACT all contents to your DW Local Site Folder.  If you have not defined a Local Site Folder in DW yet, do that now by going to Site > New Site.
    Nancy O.

  • Help needed recovering project files from trash

    Hi everyone, I am hoping that someone will be able to help me. I just did something stupid!
    I created two new projects in iMovie this morning and then needed to clear out the mac in order to speed up a clip as I was getting the warning that my disk was full. So I copied a lot of files from iPhoto onto a hard drive and then moved them to trash including the raw files that I was using for these projects. (I got a bit carried away!) Yes the video files were in iPhoto and not iMovie Events as the last time I uploaded files iMovie was not playing the game.
    The files are still on the mac as I have not emptied the trash and they are also backed up on an external drive connected to the mac, but I have emptied the iPhoto trash. I tried importing the files back into iPhoto from trash and only got so far before the disk full message came up again. But even those ones that I did manage to re import are not showing up.
    Is there any way that I can continue with these projects or have I effectively ruined them? Do I need to start again from scratch? I hope not as they took me hours and hours to create and had pretty much finished them.
    Any help will be greatly appreciated. Thanks. :-)

    http://pondini.org/TM/17.html
    To see these "other" backups, you need the Browse Other Backup Disks or (Browse Other Time Machine Disks on Snow Leopard or Leopard) option.  It's available by Alt/Option-clicking the Time Machine icon in your Menubar, or by control-clicking (right-clicking) the Time Machine icon in your Dock.

  • Urgent.... Help Needed for Storing file in Application Server

    Hi All,
    I have a requirement where in I have to save a file in Application Server.
    File is of 141 Character Length, so there can be spaces left at the end.
    When I am downloading the file into Application Sever and then downloading the same file from Application Server to Presentation into a notepad then the spaces at the end are truncating.
    I want that the file that is generated should be of 141 character though if there may be spaces at the end.
    It will be great if you can help me out in this.
    Thanks in Advance.
    Jayant Sahu.

    when downloading to App server, you need to specify the LENGTH option on your TRANSFER ststement to keep fixed length.  You must also use a STRING type variable in your transfer.
    From Documentation on Transfer command:
    <b>If the file was opened as a text file or a legacy text file, the trailing blank characters are deleted for all data objects, except for those of data type string. The line end marker defined when the file was opened is then added to the remaining content of the data object or to the result of the conversion, and the final result is written byte-by-byte to the file.</b>
    There also used to be a problem with WS_DOWNLOAD - you had to do the following:
    Maintaining Trailing spaces when downloading to PC
    Before calling DOWNLOAD or WS_DOWNLOAD, do a perform SET_TRAIL_BLANKS(saplgrap) using 'X'
    To set the length of each record including your blanks add this code: perform SET_FIXLEN(saplgrap) using '0' '100'
    Don't think this is needed any more.
    Andrew

  • Help needed in getting file url

    Hi,
    I work in a project where i need to get the url of the specified file. The code for that is as,
    URL fileURL = Thread.currentThread().getContextClassLoader().getResource();
    The required resource is available in the concerned path. But the file url returns null
    Can you please help in solving the problem.
    Thanks and Regards,
    Mclaren

    Where (text area, label, button) do you want it to do it.
    What do you want it do (browse within the local text area, open the default browser...)
    Text area, use above, JButton (or alike) and open default browser, use ActionListener and JDIC.

  • Help needed in reading file

    Hi all,
    I am designing a web system that takes paragraph from a user and store it into database so that we can use those later to create a document using different paras from the database so that the user don't have to type anything.
    Now i want to approach this as the following:
    1. I am taking user input using HTML TEXTAREA because we don't know how long is the para is gonna be.
    2. How can receive that TEXTAREA in the next page when the user submit that to the database. Can i use
    String para=request.getParameter("astring"); the problem is para size could be anything i don't know what size of data can a string take. So can anyone suggest me what should i use
    3. Next. When i receive the para i want to create a TEXT file and store the para AND i will save the name and location of the para in the database rather than the whole para in database.
    4. Next when the query made system can show those para by taking the address from the database and then opening the file and copying those data in HTML TEXT area again to show to the user.
    Can anyone please help me how can do that.
    I really need your help.
    Thanks

    Hi,
    Sounds like its really big inputs you are expecting. String are objects and have no such restrictions as seen at simple types. To my knowledge Strings have no limits in length.
    So use the request.getParameter("string");
    Make sure though that your form method id POST.
    I think you should make a field in your database to where you can post your text directly. They can be made to contain quite big amount of data. Reading and writing to files are expensive. I'm using Postre and mssql having fields containing up to 15 MB data. Should be suficient in many cases.
    Good luck to you

  • Help Needed re joining files

    I need some basic conceptual help with QT! I have used QT Player since QT started, but I have always used it just to play whatever simply double-clicks open in it. I have QT Pro, so I know QT can do more. However, I don’t understand some basic things about QT:
    1. On the File Menu, what is the difference between “open” and “import,” and why would one choose one or the other?
    2. What is the difference between “save as” and “export,“ and why would one use one or the other?
    3. My QT v. 6.03 (running on OS 8.6/9.1) regularly uses four different (at least) file types with the creator code TVOD:
    MooV - created when a file is “saved” or “saved as” from QT
    MPEG - files downloaded by the browser to the hard drive have this file type.
    MMCH - in the MSIE temporary folder when MSIE uses the QT plug-in to run an abc123.mpg or an abc123.mov file.
    mpg4 - created when a file is “exported” from QT (I assume there once was/is mpg1, mpg2, and mpg3?)
    What is one supposed basically to know about these file types and when to use which.
    4. I would like to be able to join two downloaded mpg files together to make one. The mpg files consist of a video travelogue with an oral narrative. However...
    The files download with a file type of MPEG and named A1.mpg and A2.mpg. When I open these in QT, the Edit Menu is dimmed and unavailable. I can play each file individually and the files display fine with the sound inteact.
    If I re-save these using “SaveAs” I get MooV files, which will open and play, but again, the EditMenu is dimmed and unavailable. I can play each file individually and the files display fine with the sound inteact.
    If I “export” these two files, I get mpg4 files which will open and play the video only -- no sound, BUT, the EditMenu IS available and undimmed and I can copy and paste the two files into one file, which will play the video in order; however, the sound is lost...
    ...and so am I! Help!

    One would "Open" a regular QT formatted file (.mov, .mpg, .avi). You would "Import" (Pro only) a non QT formatted file (.jpg, .mp3, .txt) to use them in QT content. Version 7 does away with the "Import" menu as the Open menu really does the same as Import.
    "Save As" does not re-compress the data in the file. You don't want to re-compress a simple "Cut" for example. Save As creates a new file and leaves the original untouched. It also puts the file (whatever formats) into a .mov "container".
    So you could "Import" a Flash file (.swf) and "Save As" a .mov file. No compression. No conversion. Just a Flash track in a .mov file.
    "Export" is used to "convert" the file to other formats (Movie to iPod Movie).
    There never was any MPEG-3 format (beyond specs) and we are now using MPEG-4. An .mp3 file is really MPEG-1 layer 3 (another spec).
    Basic rule: QuickTime can "play" MPEG-1 and MPEG-2 (additional software required) but can not edit the formats.
    Do a search for (very old) software that can "demux" (separate audio and video) from your MPEG-1 files. Most are free and can convert the files to formats you can edit with QT Pro.
    Your version 6 "Key" is still valid if you ever decided to move up to OS X. It will be of little value in Tiger because it requires QT version 7.

  • Help needed with .asp files

    I am not sure what I am asking or what I need to do, so please bear with me, thanks.
    I am helping out with a site that has one dynamic page utilizing a database with an .mdb extension.
    Previously hosted on a site with ASP (not sure which version).
    New host has MySQL with PHP (?)
    I would like to be able to rework the one dynamic page in DW, using .php. I am not able to upload the .mdb file to my localhost MySql area.
    It all comes down to the database.....
    Is there a way to convert the .mdb file to one with an .sql extension?
    Or am I taking the wrong approach?
    Thanks,
    Melissa

    >Previously hosted on a site with ASP (not sure which version).
    >New host has MySQL with PHP (?)
    Are you sure the host doesn't also support .asp?
    >I  would like to be able to rework the one dynamic
    >page in DW, using .php.  I am not able to upload the
    >.mdb file to my localhost MySql area.
    An mdb file is MS Access. There are conversion utilities that will convert between the two dbms's, but if the schema is not complex you can simply build the new database in MySQL, export the data from access and then import it.

  • HELP- need to find files

    I hope someone can help me out there! Recently I experienced a problem that Lightroom was condensing my pictures (500x500 jpeg), when I went to go in to resize to a larger size it lost the image and became blurry and noisy.... I did not save the RAW images, I thought though that Lightroom automatically saves the images. Is there anyway to get back the files with the correct dimension even if it is JPEG or to re-edit them as RAW.. I don't have them on the memory card either and it has been about a month or so and I am just noticing this problem now, geese!
    Any help or feedback is appreciated!
    Thanks.

    If you imported the RAWs using Lightroom, then the RAWs are on one of your hard disks somewhere, unless you deleted them. I suggest you look for them. The easiest way to find them is to go into Lightroom and right-click on the photo and select "Show in Explorer". This won't work if you deleted or moved or renamed the photos. You could also search for them using your operating system tools. Please try both of these suggestions and report back.
    I think you also need to look at introductory videos/tutorials/FAQs on the proper usage of Lightroom, as it sounds like a lot of these problems are preventable.

Maybe you are looking for

  • OCI causing JVM crash

    # A fatal error has been detected by the Java Runtime Environment: # java.lang.OutOfMemoryError: requested 746 bytes for jbyte in /BUILD_AREA/jdk6_21/hotspot/src/share/vm/prims/jni.cpp. Out of swap space? # Internal Error (allocation.inline.hpp:39),

  • Problem in BDC for FB60

    I am performing BDC Call Transaction for FB60 Transaction. When running in mode 'A', the Inputs are going perfectly fine into the respective fields but the processing stops in the Long Text Field(sgtxt). Even if I enter the details manually the proce

  • Create Project Web App Site - Failed - see the Application event Log

    Hi, we have installed MS Project Server 2010 on our LAB SharePoint 2010 Server (Single Server and SQL Server Database). My farm admin account have all server roles in SQL, it is runng the OWSTimer also and it is the AppPool Service App. No specific e

  • Powerful swf encryption tools

    Hey guys, I have just developed a flash encryption and analyze tool. My product page is here: http://www.orandea.com/product We provide free trails, so if you have some swf files need to be encrypted, take a look at this. Thank you ~~ Some awesome fe

  • Menu's photoshop buttons not rolling over

    Hello all, I have created some layered buttons in photoshop. All is well, they roll over and work lovely in simulator but when I create a build and open it in the Macintosh DVD player the rollovers dont roll! What am I doing wrong? As always thenks i