Jar command

Dear All ,
I have problem to extract web archieve file ....named jsppro.war .
How do i extract these file and what is the command ???Do jar command able to extract these file.
TQ.

How do i extract these file ....what is the command pls.

Similar Messages

  • Unable to use javac or jar commands

    Hi all,
    I've been using my IDE to compile and run my programs. However, when I want to use -javac or -jar commands in my command prompt, it doesnt work.
    The error is :
    'javac' is not recognised as an internal or external command,
    operable program or batch file
    Same goes for jar
    -java works for me. Why is that so? I hope anyone can give me solution.
    Note : I'm on windows vista
    Another question :
    I've been using JMF (Java Media Framework) to develop a simple audio player. However it can be run on my pc. What happens if I try to run the program at another pc, will it still work? The other pc will not have JMF installed, but will have JRE to run java apps. If it cannot be run on the other pc, is there any solution?
    Thank you for your kind assistance.
    Edited by: TrAnScEnD3nT on Sep 30, 2007 10:18 PM
    Reason : Sorry I have mixed up java and javac, I've corrected it.

    Mainta? That's my favourite!This time...
    In very general terms the PATH is a system variable that is maintained and used by your operating system or shell (not Java) to locate executable files. So, for instance, if you type the command:
    >writeit will be the PATH that Windows uses to locate the write.exe word processor.
    The directory containing the Java tools - java.exe, javaw.exe, jar.exe, appletviewer.exe etc - very commonly goes into the PATH variable.
    The classpath is a list of locations that Java uses to locate classes (as you said). It is used by Java and not your operating system. It is commonly (but not always) set each time you use one of the Java tools. There is a -cp switch that lets you do this. For instance a common command to compile a file would be
    >javac -cp . HelloWorld.javaThe "-cp ." bit means "the classpath shall be the current directory".
    Setting a particular classpath does not, in general, affect the "built in" classes of Java, so you don't have to worry about this. If you search the documentation that came with your distribution you will find the exact rules for "how classes are found": but to begin with the important thing is that any classes you write must be included in the classpath which can be specified as part of the commands to compile or run your code.

  • Jar command jar -uf doesn't work on Vista

    I try to use the jar command jar -uf to add information from a JAR into another. This works fine on XP, but not on Vista.
    I use the same commands and the same files on Vista and XP, but I get this error message on Vista:
    java.io.IOExeption: An error occured when writing to the JAR file
    Why does this happen? How can I make the jar command jar -uf work on Vista?

    I don't use Vista however it could be related to a [Vista file permission problem|http://paulstamatiou.com/2007/02/09/how-to-quickie-vista-permissions].

  • Executing jar command from the java application

    Hi All,
    In my application i want to create a jar file with the existing class @ Runtime and want to download . But i tried to execute the jar command via Process.getRuntime, it throws IOException. Please guide me or give the solution

    PavithraKarthikeyan wrote:
    Please guide me or give the solutionQuestion your need for this. Why do you think you need to create the jar file.
    P.S. The jar command is only available if the user has the JDK installed so if he has only the JRE installed then you have a problem using Runtime.exec(). There are classes (java.util.jar.JarFile et al) that will allow you to jar files using Java code.

  • Can new folder be added into a war using jar commands?

    Hi All,
    I am working on an installer creation attempt to make some changes on a war at the client side to inject my changes into it. As a result i am in need to modify the war using jar commands and have found some success.
    I user the following command.
    D:\MyWarLab>jar uf webtop.war customThis command helped me in adding my changes inside a folder named 'custom' placed at location 'D:\MyWarLab' into the 'custom' folder inside my 'webtop.war'.
    Now this worked as expected since the 'custom' folder was already present inside the war.
    Now my next step is to inject a new folder named 'customA' inside
    webtop.war ->WEB-INF -> classes -> com -> application. This customA folder would contain the java class files i have created.The customA folder does not already exist at the above mentioned location, hence the need to create it.
    I have not been able to find a jar command to add new folders at desired locations of the war.
    Could you please validate my attempt and suggest a command to fulfil my requirement.

    Now this worked as expected since the 'custom' folder was already present inside the war.No. It worked because 'custom' existed in the file system as a directory with files under it. Whether it was already in the war is irrelevant.
    This customA folder would contain the java class files i have created. The customA folder does not already exist at the above mentioned location, hence the need to create it.If it exists on the disk you can add it to the war with the jar uf command.
    I have not been able to find a jar command to add new folders at desired locations of the war.You've already found it!

  • Cant execute jar command?

    hi, i am a newb in j2ee. my reference is the beginning java ee 5 from apress. the application server that the book is using is JBoss, and while i try to write my first example, i need to make a war and an ear file, so i tried to do it in the console. i went to the directory of my first example and the tried to execute this: >jar cf web-app.war index.jsp but an error occur and said 'jar' is not recognized as an internal or external command,
    operable program or batch file.
    question is, how can i make those files if i cant execute the "jar" command.
    **by the way, i have a successful installation of JBoss.
    thanks in advance.
    sorry, i guess this is the wrong forum.
    Message was edited by:
    pleigher

    The jar command should be installed in your JDK HOME\bin directory, but you could also use winzip.
    Once you've got the hang of things you should forget about building war and jar files from the command line, you're much better using a build tool such as maven2.
    http://maven.apache.org/
    There's quite a bit to it but it has pre-configured templates for war and ejb projects.

  • How to create java archive using jar command

    hello
    what is the syntax for creating java acrchive using jar command line
    jar -c ???????
    urgent plzz

    jar cf myjar.jar classfiles...
    If you have a manifest file you want to add:
    jar cfm myjar.jar manifest.mf classfiles...
    Also check the documentation:
    http://java.sun.com/j2se/1.3/docs/tooldocs/tools.html
    You can find a link to jar there.

  • Jar command throwing error

    Hi,
    I'm trying to extract a war file via the jar command; however, when I issue:
    jar -xvf MyWarFile.war
    I'm recieving :java.io.IOException: META-INF : could not create directory
    at sun.tools.jar.Main.extractFile(Main.java:699)
    at sun.tools.jar.Main.extract(Main.java:677)
    at sun.tools.jar.Main.run(Main.java:189)
    at sun.tools.jar.Main.main(Main.java:903)
    I am giving proper path where the war file is located.
    Can someone tell why jar is not being extracted and this error is coming?
    Thanks

    It happens due to an incorrectly created war file when using the counterpart command jar -cvf. Make sure the war you have created does not have any missing directories or incorrect path.

  • How to schedule jar command on linux in /etc/crontab

    hello ,
    i am facing a problem in scheduling java -jar myjarfilename.jar in crontab in linux .i have tried by giving the command directly in the /etc/crontab entry and running it as a script from the crontab but in vain.please give me some ideas how to schedule this jar command on linux in /etc/crontab.
    thanx

    Stuff the above accept for the STARs read about them;
    This a REAL BASIC senerio. ASSUMING you are paulb the user
    To add a cron job it is BEST to use "crontab"
    1) MAKE SURE YOU CAN USE CRONTAB
    check "/etc/cron.d/cron.deny " does not exist and it does not have your username in it
    If it does, you will have to remove your name somehow or just delete the file.
    2) MAKE YOUR SCRIPT
    using your fav editor like "joe" or "pico" or err "vi" make a textfile called "home/paulb/hiscript.sh"
    This script is just saying hi in sh and then printing a date when it said hi in the dumbhi.log
    --------start of hiscript.sh----------------
    #!/bin/sh
    echo "hi at";date > /home/paulb/dumhi.log;
    --------end of hiscript.sh----------------3) MAKE SCRIPT EXECUTABLE
    run the command
    "chmod +x /home/paulb/hiscript.sh"4) MAKE A CRONTAB FILE FOR YOURSELF
    using your fav editor like "joe" or "pico" or err "vi" make a textfile called "home/paulb/paulb.ct"
    This is EVERY 1 min run that script. See u need to know the commands
    -----start of paulb.ct-------------------------
    1  *  *  *  *   home/paulb/hiscript.sh
    -----end of paulb.ct-------------------------5) ADD THE CRON JOB
    run the command
    "crontab /home/paulb/paulb.ct"All done

  • Jar command not available

    Hi,
    I have a new Java programmer and I have installed the following software onto my PC:
    1) Java SE Development Kit 6u1 and NetBeans IDE 5.5.1 Bundle
    2) Sun Java Toolkit 1.0 for CDC
    3) JBuilder 2005 Foundation
    Now, I am trying to make a "jar" file with the following command:
    " jar -cf test.jar *.class "
    And my system reports the following:
    " 'jar' is not recognized as an internal or external command, operable program or batch file. "
    I have Java SDK, and IDE installed in my PC, and yet "jar" is not available. How could this be possible? What happen? Kindly advice, please!
    Regards,
    wee

    jar is an executable in your JDK installation directory that needs to be pointed to or else it will not recognize it.
    You can specify the bin directory of your JDK in your PATH environment variable or simple type an absolute path to jar.exe in the commandline.
    "C:\Program Files\[jdk directory]\bin\jar" -cf test.jar *.class

  • Quest about a gui i'm trying to make that acts as a shell for  jar command?

    I try to create a jar file from a whole directory and the program locks up. It only locks up if there is a another directory inside that directory that is being archived. I added a System.out.println(command) to see if the command being sent is the correct one, and it is.. so there is something going on with the run-time or an exception.. i ran some debugging tests and it seem as if the problem happens at this line of code:
                        child.waitFor();
    but if i take that out.. i get another type of exception error which reads...
    Exception occurred during event dispatching:
    java.lang.IllegalThreadStateException: process has not exited
    at java.lang.Win32Process.exitValue(Native Method)
    at JarFrame.jarCreate(JarFrame.java:659)
    at JarFrame.actionPerformed(JarFrame.java:330)
    at java.awt.Button.processActionEvent(Button.java:329)
    at java.awt.Button.processEvent(Button.java:302)
    at java.awt.Component.dispatchEventImpl(Component.java:2595)
    at java.awt.Component.dispatchEvent(Component.java:2499)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:319)
    at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:10
    3)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)
    but the program doesn't lock up when this happens... but also at this point no directory at all can be archived... not even one without another directory inside it... the code for the create command is at the bottom... the code at the bottom archives a directory if the directory does not have another directory inside it.. but locks up when there is another directory inside the directory that is being archived... distinguishing if the file to archive is a directory or a file is not problem for the jarCreate() method.. it is at the exception waitfor() where the problem occurs...
    PLEASE HELP!
    thanks,
    DiscoHristo
         /*     Runs the DOS Command for creating a JAR File     */
         public void jarCreate ( )
    createFieldText = createField.getText();
    String command;
    String output = new String ("Jar File Created");
    if (createFieldText.endsWith(".jar") == false)
         createFieldText = createFieldText.concat(".jar");
    if (selectedDirectory == null)
         command = "jar cvfM " + createFieldText + " " + directoryOfFile + selectedFile;
                   Runtime rt = Runtime.getRuntime();
                   try
                        Process child = rt.exec(command);
                        child.waitFor();
                        textBox.append(output + '\n');
                        System.out.println("Process exit code is: " + child.exitValue());
                   catch(IOException e)
                        System.err.println("IOException starting process!");
                   catch(InterruptedException e)
                        System.err.println("Interrupted waiting for process!");
         if (selectedDirectory != null)
              command = "jar cvfM " + createFieldText + " " + selectedDirectory;
              System.out.println(command);
         Runtime rt = Runtime.getRuntime();
                   try
                        Process child = rt.exec(command);
                        child.waitFor();
                        textBox.append(output + '\n');
                        System.out.println("Process exit code is: " + child.exitValue());
                   catch(IOException e)
                        System.err.println("IOException starting process!");
                   catch(InterruptedException e)
                        System.err.println("Interrupted waiting for process!");
         }

    Hello,
    Documentation says:
    The Runtime.exec methods may not work well for special processes on certain native platforms, such as native windowing processes, daemon processes, Win16/DOS processes on Win32, or shell scripts.
    Especially "may not work well" means that the behaviour of Runtime.exec is not documented in some "special" cases. Unfortunately I've same problem (unpredictable lock-ups) with Process.waitFor() in "standard environment" (Linux, J2SE 1.4, calling standard shell single processes). Could you be kind enough to let me know if you've found some solution?
    Thanks,
    Karel

  • Jar command problem

    Hi
    I am trying to create a jar for my java project. I am using NetBeans so at first i thought that i could have NetBeans create it for me. But the help function just tells me that it is generated automatically in a folder called "dist". The problem is that the dist-folder does not contain any jar-file.
    Then i though i could create it from the command line using the
    jar cf MyJar.jar MyClass.classcommand. But when i try this i get a message saying "'jar' is not recognized as an internal or external command". I tried to re-install my JDK but no luck. My guess is that both the netbeans problem and the command line problem are because of the same reason.
    Anyone know how i could solve this? All answers are appreciated.
    Thank you
    //Patrik

    update your PATH variable.
    see 4. Update the PATH variable (Optional) here http://java.sun.com/javase/6/webnotes/install/jdk/install-windows.html

  • Jar command not execute !

    Hello!
    I have jdk6u35 (64-bit) alongwith Weblogic1036 and 11gr2 Forms/Reports (64-bit).
    When I give following command to make a jar file for icons;
    jar -cvf frmicons.jar *.gif
    It doesn't execute, as it is not recognised as an internal command or external command.
    Guide me please.
    Thanks with Regards.
    Bhatt.
    Edited by: 982164 on Mar 31, 2013 1:38 PM

    Hi Bhatt,
    You need to add your java to your path.
    I think you are using windows so just add the path to bin folder from java to PATH variable and you will be able to execute the command.
    For example if you have java installed in C:\Program Files\Java\jdk1.6.0_37 just add the following to PATH environment variable at the beginning:
    C:\Program Files\Java\jdk1.6.0_37\bin; You may follow this guide:
    http://www.kingluddite.com/tools/how-do-i-add-java-to-my-windows-path
    Hope this helps you :)
    Regards
    Carlos

  • How to manage webservice file wsmgmt.xml using jar command or shell?

    Hi,
    I am now want to manage webservice deployed on oc4j using java class or shell script.I want to find a way to enable/disable webservice security.Is there way I can do?
    Another issue,how to configure global security for some of the ports?
    Thanks!

    Hi,
    I am now want to manage webservice deployed on oc4j using java class or shell script.I want to find a way to enable/disable webservice security.Is there way I can do?
    Another issue,how to configure global security for some of the ports?
    Thanks!

  • Running Jar vs. command line with libraries

    Hi everybody,
    I have an application that works well from the command line, which relies on 3 libraries, all of which are in the same directory. My current directory structure is like this:
    Main Folder
    -> Library 1
    -> Library 2
    -> Library 3
    -> Run script
    -> Source Folder ("source")
    ->-> Code and main class
    Library 1 depends on both Library 2 and Library 3. When I run from the command line, from the main folder, using this command:
    java -Djava.library.path=. source/MainClass
    My program runs fine.
    The problem comes when I try to package it into a Jar and replicate the directory structure.
    My manifest is:
    Manifest-Version: 1.0
    Main-Class: source.MainClass
    <newline>
    and my jar command is:
    jar cvmf Manifest.txt test.jar source/*.class
    When I try to run my jar, I get this error:
    Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/MainDirectory/Library1.so: Library2.so: cannot open shared object file: No such file or directory
    I know what this means-- for some reason it doesn't know where Library2 is-- but I'm mystified as to why this works fine from the command line and not from a jar. Can anyone help me figure this out, please?
    Thanks,
    Jezzica85

    warnerja wrote:
    Wrong question. You still want to run it via java -jar, but...
    Your jar needs a MANIFEST.MF (if I recall correctly, that is the right file name) in its META-INF folder (again, if I recall correctly) which needs to set up the classpath via a Class-Path=... line in the file.
    Actually you probably already do have such a file (you need it anyway for the jar to figure out what the main class is to execute), but it probably doesn't contain a Class-Path entry or is incorrect.
    Google for jar manifestI've had less than stellar success on correcting the big boys lately, but why should I let that stop me...
    As far as I can tell, the OP seems to be having problems with native link libraries. Some java class loads Library1 then (it appears) Library1 attempts to load Library2.
    Would fixing a CLASSPATH help that?
    I would expect it to be a problem with LD_LIBRARY_PATH (ala Sabre's earlier reply).

Maybe you are looking for

  • View logfile or view output hangs in 3 node environment

    Hi All, Briefing the environment: Database -- ERPDB001 Conc + admin -- APPS001 Forms + web -- APPS002 Some times when we try to see view log or view output after running the Concurrent requests. The system seems like hanging and it will display follo

  • Error when importing VIRSA CC 4.0 rules in RAR 5.3

    Hi guys, Has anyone encountered RAR Import error like this: Error in table data VIRSA_CC_DETDESC SQL:=>Insert into VIRSA_CC_DETDESC(OBJECT_TYPE, OBJECT_ID, LANG, DETAIL_DESCN) Values (?,?,?,?) Record:: Line Number :9187 : D VIRSA_CC_DETDESC MIT BASI-

  • Document in queue will not print or delete. Printer now stuck.

    A document I sent to the printer would not print and now will not delete.  Status in queue has said deleting for the past two days.  This is preventing anything else from printing.  I have tried everything I can think of.  Need suggestions. This ques

  • How to get a refund after in app purchase?

    Hi everyone, I downloaded a app called flight box and I thought it would be useful so I decided to by the extras for it. But that was a mistake because it is the most useless app and not user friendly at all so I want to know if it would be possible

  • What is the DI Server in service manager for?

    Dear Experts, Can anyone enlighten me on the above? Warmest Regards, Chinho