How to extract JAR file in particular directory

Hi,
I am extracting a JAR file(A.jar) in a Makefile
Now the path of the Makefile is say /home/developer/
The location of the JAR file is in /opt/tools/mk/A.jar
I am extracting the jar file as:
jar xvf /opt/tools/mk/A.jar
This creates a directory named "A" under /home/developer, since the location of the Makefile is at /home/developer.
Question) How do I unjar /opt/tools/mk/A.jar under /opt/tools/mk/ itself, irrespective of the location of the Makefile?
thanks

jar -?
Usage: jar {ctxu}[vfm0Mi] [jar-file] [manifest-file] [-C dir] files ...
Options:
    -c  create new archive
    -t  list table of contents for archive
    -x  extract named (or all) files from archive
    -u  update existing archive
    -v  generate verbose output on standard output
    -f  specify archive file name
    -m  include manifest information from specified manifest file
    -0  store only; use no ZIP compression
    -M  do not create a manifest file for the entries
    -i  generate index information for the specified jar files
    -C  change to the specified directory and include the following fileI'd say you may want to try the -C option

Similar Messages

  • How to extract jar files into  a folder in the local disk and then import?

    hai forum,
    will any one tell me how should i extract jar files into a location in my project folder and then how to import the class files for further usage?
    Thank you .

    I will be graeateful if u could explain this a bit.
    Do you want to say that i should craete instance of
    ZipEntry like this
    InputStream is =
    jarFile.getInputStream(entry);
    File inputFile = new
    File("C:\\myclasses.data");
    FileInputStream fis=
    new FileInputStream(inputFile);No! You need to write the entry using FileOutputStream copying all the bytes of the ZipEntry InputStream to the FileOutputStream.
    >
    What about adding into a directory?Do i have to
    create on dynamically?Yes! You can use File.mkdirs(). For example
                        File ofile = new File("your directory where you will place the zip entries" + zipEntry.getName());
                        ofile.getParentFile().mkdirs();

  • How to extract PDF files into the directory the PDF file is located in.

    I use Adobe Acrobat to extract all the pages within a single PDF file to single page PDF files.  However the steps are long, as the path to a directory where i wish to extract is thru the net work and the default location for Adobe is to my C:Drive... So I have to Browse the path to extract to Which can be between 10 and 15 steps depending on the job folders.  Most programs when you extract, the default path is usually where the file location is, with an option to change the path.. makes sense and is very easy.
    So without making a short cut(because the path constantly changes depending on the jobs).  How do I extract directly to the folder that the PDF file is in?   Example, when you extract a zip file, its default location is right there where the zip file is in. Quite simple and logical.

    Thanks Gilad, but that does not make the task easier.  The path always changes as the files are being organized into folders.  Its kind of sad that $400 software can't do what most free ware can do.  Extract itself into the folder it is sitting in.

  • How to extract SDA file..........

    Hi All
        how do we extract SDA files.......
        we started adapter development by testing sample code in 'sample_ra.jar'  file,  available in sample_ra.sda, and deployed on XI server. now we want to see all jar files available in 'sample_ra.sda'.
    if any one already gone through adapter development have any idea, how to extract SDA file, help me out Pls .......... very urgent.
    Regards
    Rajesh

    HI,
    In general SDA files are to be deployed into Server using SDM.
    see the below link , how to deploy
    http://help.sap.com/saphelp_webas630/helpdata/en/05/4fac3e00c8b014e10000000a114084/content.htm
    Also
    you can unzip the file with WinZip or WinRar edit the xml configuration file and zip it back together (in ZIP format and not RAR!).
    Also
    how to deploy ear files from command line
    Tools like zipgenius http://www.zipgenius.it/intweb/features.htm#Innovazione, Private encryptor http://www.filesweb.com/private-encryptor/ and securefile http://www.devsolutions.net/htmlpages/securefile.html should help you further.
    Regards
    Chilla

  • How to extract war file

    how to extract war file? explain technoloby behind in war

    hi
    go to your dir :
    jar xvf filename.warhelp, simply type jar, above baluc mention is right, jar/war/ear is like a zip file contains *.classes, images, xml , etc....
    jar i hope it will help u

  • How many Ways jar files from ear file on a jboss can be downloaded on clien

    Aoa
    How many Ways jar files from ear file on a jboss can be downloaded on client side
    like jnlp etc..
    Regards
    M Fazal Ur Rehman

    First, you need to be able to boot from the Recovery HD:
    Boot Using Command+R keys:
      1. Restart the computer.
      2. Immediately after the chime press and hold down the
          "COMMAND" and the "R" keys together.
      3. Release the keys when the Utilities Menu appears.
    Once at the Utilities Menu select Terminal from the Utilities menu in the screen's menubar. Now, you need to know where these new files are located. You move to any location using the 'cd' command such as cd /Users/user_name/Documents, then press RETURN. Replace user_name with your actual username. Next you need to do a directory listing to see if your files are in that location, Documents. Use ls -al to do a directory listing of the files and folders in Documents. If you find your new files there, then connect an external drive or flash drive. You will need to know the name you have assigned to this drive. It needs to be already formatted. Copy your files using cp /Documents/filename /Volumes/volname/filename. Replace volname and filename with those that apply. Press RETURN.
    Or take it to your local Apple Store and see if they can do the chore for you.

  • Anyone knows how to delete a file from a directory?????

    hi there
    anyone has any idea on how to delete a file from a directory? delete(String filename)? thank you.

    Hi,
    Check this link.
    Gives you an example code to show how to delete a file.
    http://examples.oreilly.com/jenut/Delete.java
    Hope this helps.
    Roopasri Vittal
    Developer Technical Support
    Sun Microsystems
    http://sun.com/developers/support

  • Help! How to create Jar file for a packaged class?

    Hi!
    I am new in jar complexities. I made a swing frame that just prompts a JOptionPane when executed. I accomplished the same using jar without packaging my class SwingTest.
    But when i package it, it doesn't run. Can any one tell me how to make jar file of packaged classes and include images in the jar files too!
    Really Thanx!

    Call the Jar from the commandline to see the exceptions thrown.
    java -jar <jarFileName> <className>

  • How to include .jar files in coldfusion code 

    To Integrate our cfm code with paypal jar files we do the
    following steps with our local coldfusion server ,and to run and
    integrate the paypal Java SDK jar files, I think we need to do the
    same process on the server, can you suggest any thing to do the
    following setting for my domain on the server, without setting the
    class path in coldfusion administrator.
    The ColdFusion application server must be configured to know
    the location of the PayPal JAR
    files, and your ColdFusion Markup (CFM) pages must be
    configured with the absolute path to
    the PayPal API certificate for the PayPal API user on whose
    behalf the calls are made.
    1. Install the PayPal Java SDK “Installing the
    SDK”.
    2. Copy a subset of the Java SDK JAR files to a location
    accessible by the ColdFusion
    application server. The JAR files are in SDK_root\lib and
    their exact names are as
    follows:
    – bcmail-jdk14-128.jar
    – bcprov-jdk14-128.jar
    – paypal_base.jar
    – paypal_stubs.jar
    sax2.jar
    – xerces.jar
    – xpp3-1.1.3.4d_b4_min.jar
    – xstream.jar-1.1.3.jar
    3. With the ColdFusion Application Server Administrator, add
    the absolute path of the
    location you determined in Step 2 to the Java and JVM
    CLASSPATH environment variable.
    4. Restart the ColdFusion Application Server.
    Suggest me how to include .jar files without setting
    classpath.

    > Suggest me how to include .jar files without setting
    classpath.
    Copy them to {CF_HOME}\lib, where {CF_HOME} is, for example,
    C:\CFusionMX7. Restart Coldfusion.

  • How to create a file in current directory

    hi,
    I want to create a file in a current directory, But when i written following
    code then it cannot create file, How i will create file in current directory?
    Is there anyone who can help me?what will be the solution of this problem?
    Please give me solution
    String dir=application.getRealPath("/");
         int count;
         String filename="sample.txt";
         out.println(dir+filename);
         FileOutputStream fout=new FileOutputStream(filename);
         PrintStream p;
         p=new PrintStream(fout);
         p.print("1");
         p.close();with regards
    Bina

    hi,
    my problem is that my path is ok...but when i open file in this directory then
    it cannot open a file, is there anyone who can do it? When a user save data in server from remote
    area then what will be path of my code? how i will solve it? please give me
    solution.
    with regards
    bina

  • How to create pdf files in UNIX directory from oracle reports

    I would like to know how to create pdf files in UNIX directory from oracle reports.
    Thanks,

    Please make your question more clear . Also mention the reports version.
    1) If you are runnning reports in Unix, you can give
    .... destype=file desformat=pdf desname=<filename>
    in command line
    Please refer docs below.
    2) If by your question you mean
    "My reports server is running in Windows but I want to ftp my files to Unix after creating it"
    then the answer is that you can use pluggable destination "ftp"
    .... destype=ftp desformat=pdf desname=<ftp url>
    Pluggable destinations download
    http://otn.oracle.com/products/reports/pluginxchange/index.html
    Thanks
    Ratheesh
    [    All Docs     ]
    http://otn.oracle.com/documentation/reports.html
    [     Publishing reports to web  - 10G  ]
    http://download.oracle.com/docs/html/B10314_01/toc.htm (html)
    http://download.oracle.com/docs/pdf/B10314_01.pdf (pdf)
    [   Building reports  - 10G ]
    http://download.oracle.com/docs/pdf/B10602_01.pdf (pdf)
    http://download.oracle.com/docs/html/B10602_01/toc.htm (html)
    [   Forms Reports Integration whitepaper  9i ]
    http://otn.oracle.com/products/forms/pdf/frm9isrw9i.pdf

  • How to extract CPIO file to install Oracle in LINUX REDHAT9

    I DOWNLOADED THE ORACLE 9I SOFTWARE FROM ORACLE SITE FOR
    LINUX REDHAT9. NOW I DONT KNOW HOW TO EXTRACT THE FILE WITH CPIO.
    CAN ANY BODY HELP ME.
    THANKS.

    extract the cpio file with the following command:
    cpio -idmv < filename.cpio
    hope this will help you
    SUMIT

  • How to extract .bin file on mac?

    Dear Team,
                     How to extract .bin file on mac os ? please help me
    regards,
    kalai

    Although the link posted by the other responder shows .bin files to be a copy of RAW CD or DVD data in my experience most .bin files are some type of configuration file mainly used with internet routers and other pieces of PC/Networking equipment.
    Just where did this .bin file come from and what is it associated with that you are trying to open on your Mac?
    If it is a router configuration file that you downloaded you don't open it on the Mac. You log into your router and go to the update firmware section and browse to that file stored on your Mac hard drive and let the router handle opening and updated the routers firmware.

  • How to extract rpt file from .b1px file in SAP B1

    How to extract rpt file from .b1px file in SAP B1

    Hi Trupti,
    You will not be able to export .b1px file without importing in SAP B1.
    Please import .b1px file in SAP B1 and then export .rpt file from SAP B1 one by one.
    Hope this helps
    Regards::::
    Atul Chakraborty

  • How to extract  DB  FILE  FROM NONSAP  SYSTEM  IN BI-7

    how to extract  DB  FILE  FROM NONSAP  SYSTEM  IN BI-7

    hi,
    chk the links for extraction using DB
    Extraction using DB connect
    http://help.sap.com/saphelp_nw70/helpdata/EN/58/54f9c1562d104c9465dabd816f3f24/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c6/0ffb40af87ee6fe10000000a1550b0/frameset.htm
    Extract data from oracle DB to SAP BI 7.0
    Ramesh

Maybe you are looking for

  • Restore default fonts in windows 8.1

    Hi, I want restore all default fonts in windows 8.1. What i do?

  • Looking for a list of all PeopleSoft Modules

    We would like to create a service catalog for our organization.   We would list all the modules in Peoplesoft broken down by application with a description of each module.  We would then show which modules we are currently using and what could be ava

  • Moving and properly placing fields in a FormsCentral form

    I've just started using this software that came with Acrobat XI and began designing a form from scratch.  Moving and placing fields in your desired location seems to be quite challenging unless there is something I do not understand about the process

  • Barcode Separators for Acrobat Pro X

    I'm trying to determine if Acrobat can produce its own barcodes for separator pages.  Do I have to create my own barcodes in Forms or must I buy further software?  I've got a small desk scanner and it doesn't look like my hardware (Kodak i2800) has i

  • How can I use SSL in httpunit??

    How can I use SSL in httpunit? I am using HTTPUNIT 1.5.4 and the j2sdk1.4.1_04? I want to activate a submit button that following an https-Url in the html action method... The SSL certificateis from Server, i want to connect, is comming from Thawte.