Jar cvfm ..\MYAPP.jar ..\mf.txt .

Hi all,
I am following directions from http://www.codeguru.com/forum/showthread.php?threadid=279029
but when I got to
jar cvfm ..\MYAPP.jar ..\mf.txt .
It doesn't work, it says, "'JAR' is not recognized as an internal or external command"
I am assuming that it doesn't know what "JAR" is , but what have I missed???
Thanks,
Mike

You need to set your java bin's directory to your System environment variable PATH.
I guess you are working under Windows.
For instance:
Let assume that you have installed your J2SDK in C:\j2sdk1.4.2 directory.
You need to add "C:\j2sdk1.4.2\bin" to your PATH.
To add do:
1) Click "Control Panel"
2) Click "System"
3) Click "Advanced" tab
4) Click "Environment Variables"
5) Click on Variable "Path" row under System variables box.
6) Click "Edit"
7) Add "C:\j2sdk1.4.2\bin". Remember to add ";" as the separator between directories name.
8) Click "OK"
The MS-DOS prompt should be able to find "jar" now.
Remember to change the J2SDK directory as what you installed in your system.

Similar Messages

  • Java -jar -myApp.jar works but ....

    Hi there,
    I have a problem : using ant, I have exported my application into an executable jar file.
    When in the console, I type "java -jar myApp.jar" . Everything works well.
    But if, I do double click on the jar file, nothing happens. In fact, I can see a new Instance of javaw.exe in the "task manager" but nothing happens.
    It's kind of weird ...
    Has anybody an idea about that ??
    thanks in advance
    sylvain_2020

    I am having a similar problem.
    java -jar foo.jar works great, but double clicking seems to hang the app at a certain point.
    Unable to figure out what's going on, I've been putting some "JOptionPane.showMessageDialog()" calls to see how far it's getting. It appears to be hanging up when it tries to instantiate one of my classes that extends JPanel. I have a dialog appear right before calling the constructor (and I see that one), but I don't see the dialog that's in the constructor as the first executed line (so that it must hang up somewhere before that). I've also removed all constructors from the attribute declarations. That made me think it had something to do with the constructor of JPanel, over which I have no control.
    However, I can instantiate JPanel no problem.
    What the heck is going on???

  • Including jars into executable jar

    Hello
    I want to create an application in one application even if this application depends by many other jar libraries.
    So , my development process resulted into one library: myapp.jar
    This application depends by other jars: lib1.jar, lib2.jar, lib3.jar,
    If I'll create one big jar archive with my classes and these libraries doesn't work (even I'll specify in manifest file all tags:
    Class-Path: lib1.jar lib2.jar lib3.jar
    Main-Class: com.snt.xdoc.MyApp
    So, it is possible to create one single JAR archive including all resources (my interesting point is to include jar libraries) and executable class to know where are these resoures (to establish corectly the classpath)?
    Thank you

    Hello Stefan
    Other topics about this problem can be found here:
    http://forum.java.sun.com/thread.jsp?forum=22&thread=405160&tstart=0
    http://forum.java.sun.com/thread.jsp?forum=4&thread=432114&tstart=0
    But you might want to take a look at META JAR UTILITIES : http://www.yagga.net/java/metajar/
    "Three classes with full source code and documentation that allows to extract resources from a file, from inside a JAR file that is currently executing (java -jar foo.jar), from a JAR that is included in the aforementioned executing JAR and to define a classLoader that can work with JARs, even if those JARs are JARred inside the currently executing JAR."
    MetaJarUtilities are being distributed with full source code under GNU's General Public License.
    For the moment being a JAR structured like this works:
    FOO.jar
    +- SuperMetaJarTest.class (uses BootstrapJarClassLoader.class)
    +- net/
    | +- yagga/
    | +- util/
    | +- BootstrapJarClassLoader.class
    |
    +- metatest.jar (content below)
    | +- net/
    | | +- yagga/
    | | +- util/
    | | +- Meta Jar Utilities classes here...
    | +- jars/
    | | +- test.jar
    | +- TestmetaJar.class
    | +- text.txt
    |
    +- jars2/
    +- test2.jar
    Good luck!

  • Deploying Java apps: Jars within a jar

    Dear Java gurus,
    Imagine I have a Java application. I wish to bundle it all within a jar file. The problem is, I also wish to add some dependencies, in the shape of a couple of other jars. This means that the user could run the app using the straight-forward "java -jar myapp.jar" command.
    So, I jar it all up. This Jar contains a MANIFEST.MF that specifies the main class, and also the classpath. ("Class-Path: lib/other.jar") as the extra jars were in a dir called lib within the jar.
    But, this doesn't work run as java complains about not being able to resolve classes that exist within other.jar.
    I have yet to find anything on the net beyond really basic examples of using jar. Anyone had more experience with it and can share some tips?

    Its a horrible thing. Basically, you can't include jars in jars.  I asked this question on the Java.sun.com forums a while ago if you want to search there. Its a common question and pisses people off.
    You have some other options:
    1: extract all dependency jars and include the classes in a single jar file.
    2: distribute multiple jars and set the Class-Path in the Manifest to point to them. Since you're pointing at lib/other.jar, you gotta use:
    myjar.jar
    lib/other.jar
    You won't find another way around this. I recall somebody suggesting that packaging jars with jars should be available in mustang, but as of yet, it is not so.
    Also, I would strongly recommend starting to use Java Webstart /JNLP for distributing java apps. I've never done it, but it takes all this hassle out for you by automatically maintaining dependencies. I'm intending to try to get Ensmer going using JNLP sometime.
    Dusty

  • Third party dlls and jars with in jars.

    Hi,
    I have a application which uses several 3rd party jars and dlls.I want to create a executable jar for the application .I added the external jars using fat jar eclipse plugin. Iam able to run the jar on my system successfully.But on other systems the application doesnot launch as the dlls are not avaiable which is fairly understandable. It gives the following exception 'JarClassLoader: Warning: Unable to load native library: java.lang.NullPointerException'.Now i need to include these dlls into the jar so that i can distribute the application as a single jar and launch double clicking it.I know expecting dlls ignores the cross platform nature of java but i need it.please give me some idea on how this can be done.
    Thanks in advance

    Hi,
    I have a application which uses several 3rd party jars and dlls.I want to create a executable jar for the application .I added the external jars using fat jar eclipse plugin. Iam able to run the jar on my system successfully.But on other systems the application doesnot launch as the dlls are not avaiable which is fairly understandable. It gives the following exception 'JarClassLoader: Warning: Unable to load native library: java.lang.NullPointerException'.Now i need to include these dlls into the jar so that i can distribute the application as a single jar and launch double clicking it.I know expecting dlls ignores the cross platform nature of java but i need it.please give me some idea on how this can be done.
    Thanks in advance

  • Including web service jaras in final jar file

    Hello all.
    Im using netbeans 4.0. I have used JAXB code in my program, ie. Ive used a few packages I created with the XJC compiler so i can unmarshall some XML documents. I have included the four JAXB Jar files from the Java Web Services Developer Pack in my project by including them in the projects "Classpath for compiling sources". This works fine when running in netbeans. But when I try running the project outside netbeans by double clicking on the generated JAR file I get a
    Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
    Im guessing this is because it can't see the jaxb jar files when not run from within netbeans. How would I include the jaxb jars in the jar file that netbeans generates?
    I know this is partly an IDE related question but I thought it must be a fairly common problem when creating JAR files so i posted it here.
    Any help is appreciated.
    thanks

    Im guessing this is because it can't see the jaxb jar
    files when not run from within netbeans. How would I
    include the jaxb jars in the jar file that netbeans
    generates? You wouldn't include them in that jar file. You would include Class-Path entries (which refer to the jaxb jars) in the manifest of the jar file that Netbeans creates.
    Don't ask me how to do that, I don't use Netbeans. I assume that Netbeans must support it somehow, but if you can't find out how then a Netbeans forum would be a good place to ask.
    I know this is partly an IDE related question but I
    thought it must be a fairly common problem when
    creating JAR files so i posted it here.

  • Standard.jar and jstl.jar directory

    First off I probably should apologize in advance because my problem might be an eclipse config issue.
    I created a simple servlet and I tried to include a jstl library import javax.servlet.jsp.jstl.sql.Result;. It compiled cleanly but, when I ran the application (through a browser accessing tomcat through eclipse) I was getting this error...
    The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
    I eventually found out what was wrong but I don't understand why it was wrong and that's my question. Originally I had jstl.jar and standard.jar in the projectHome/lib directory. When I moved those 2 files to the projectHome]/WEB-INF/lib directory, however, things ran correctly. Is this a setting somewhere within my tomcat config on eclipse perhaps? Or can someone point me in the right direction about this issue in general?
    Thanks in advance!

    Tomcat and Eclipse have different ideas of classpath.
    In Eclipse you set the classpath as part of the project properties: Java Build Path.
    Tomcat uses:
    - web-inf/classes directory
    - jar files in web-inf/lib
    - jar files in /shared/lib
    - jar files in /common/lib
    So in order to run on Tomcat, they need to be in the web-inf/lib directory.
    Cheers,
    evnafets

  • JARs inside my JAR

    Hi Folks,
    I'm creating a JAR file for my application. My app uses another JAR file and I want to package it inside my jar.
    I tried to use "Path-Class" attribute in MANIFEST.MF file but without success.
    Any help would be appreciate.
    TIA.
    Romualdo Rubens de Freitas

    I wonder how you missed to recognize that jars DO contain jars for four years, as you subscribed in 2001.
    Of course the standard class loader cannot handle jars in jars, but many solutions do exist for this problem. (It was really a problem, since almost all java applications are required to ship with jars inside jars).
    The best solution I encountered, is the fat_jar plugin for eclipse. If you are not an eclipse user try ONEJar.
    Being silent is sometimes better than to provide non-solutions for problems for which solutions exist.

  • How to use both ojdbc14.jar and ojdbc6.jar in same weblogic domain(weblogic12C)

    Hi all,
    I 'm having issue of using both ojdbc14.jar and ojdbc6.jar in same weblogic application and same weblogic domain in weblogic 12C environment.
    how can i do that?
    i'm currently having application developed using jdk 1.6 and ojdbc6.jar, application developed using jdk 1.4 and ojdbc14.jar.both are currently installed at same domain.
    i want to use the both ojdbc14.jar and ojdbc6.jar in same domain.
    what i previously did was renaming /usr/weblogic/wls_server10.3.4/lib/ojdbc6.jar to /usr/weblogic/wls_server10.3.4/lib/ojdbc6.jar.bak and put ojdbc14.jar in the same path when i wanna use ojdbc14.jar.
    i haven't use both in same environment before, but to go live i wanna match about requirement.pls help.
    i know the way use this by having two domains, but in the same domain i could not find a solution yet.
    Please help

    Hey
    I have the similar requirement.. Did you managed to get an option of doing it? If yes, please provide some insights
    Thanks in Advance

  • Webutil.jar and jacob.jar in same archive ?

    Hi,
    When a user connects for the first time to a webutil configured Forms application, 2 popups show up and ask to accept the X509 certificate (because webutil.jar and jacob.jar are signed).
    Our customer wants to know if it's possible to show only one popup (to reduce enduser hassle).
    How can we do it ?
    Is it possible to package webutil and jacob in the same single archive, sign this archive and so have only one popup ?? Any other ideas ?
    Regards

    It's not impossible to find a solution, but then you are miles away from any support from the oracle hotline.
    Don't do that
    Gerd
    PS: Are your users inhouse. Is it possible, that you deploy the jar's via a Software Management System? That may help in this case

  • Replace Orion.jar with Oc4j.jar, Changing the container

    Hi
    I'll be really appreciate any help.
    My application( web-based application based on Forms6i) is working fine with Orion.jar. I would like to upgrade this structure to Oracle9iDS using Oc4j.jar instead of orion. I have a main.jsp ( http://www.bmhub.com) file that after getting username/password, opens another window to show the main menu including all options(forms6i).With "Orion.jar" it works fine, I get message "Login ok" and so on.
    I installed Oracle9iDS and I changed application.xml in "C:\oracle\Forms9i\j2ee\Oracle9iDS\config". After starting startinst.bat ( contains oc4j.jar), I entered username/password but I get message that "some fileds are blanks" and "Login Failed". when I changed the oc4j.jar to orion.jar, the sartinst.bat disappeared after 1 second.
    Also I tried to replace most of the files in "C:\oracle\Forms9i\j2ee\Oracle9iDS\config" with my old configuration ( Orion configuration), the startinst with orion.jar works fine and I'm able to enter username/password. but nothing more. the forms9i dosent work anymore.(error HTTP 500).
    Could you please help me?
    regards,

    Hi,
    It seems getParameter() just returns null. I use it in my User.java file to login from main.jsp page.
    public void configure(HttpServletRequest request)
              setUserName(request.getParameter(User.USER_NAME));
              setPassword(request.getParameter(User.PASSWORD));
              setCompany(request.getParameter(User.COMPANY));
              if ( (request.getParameter(MODE)!=null) && !request.getParameter(MODE).trim().equals(""))
                   try
                        setPartnerTypeId(Integer.parseInt(request.getParameter(MODE).trim()));
                   catch(Exception e)
                        e.printStackTrace();
    How come it works with Orion.jar but returns null with Oc4j.jar?
    Thanks,

  • Can I store a jar in a jar

    I have a program that I want to use from the command line. I would like to store a db driver (opta2000) which is in a jar, in the jar I am storing the rest of the classes in. That way I can call it and my classes will be able to find it. As it is now I have it listed in my classpath on my machine but when running my program from a jar it can't find it. If I do not store my classes in a jar the opta2000 driver is found.
    Thoughts?

    That's one way. There is another:
    If you use a manifest when you create your applet jar file, you can add a Class-Path: entry in it which lists all the jars your applet refers to.
    Example: Class-Path: jar1.jar jar2.jar jar3.jar
    So long as both jars are in the same directory, the other will be found just fine.

  • Ejb jar - packaging utility jars or classes?

    Currently I have an ejb jar that contains 1 bean (say ejb1.jar). This bean uses some utility classes (say util.jar). If I add the actuall .class files from util.jar to ejb1.jar everything works great. If I add util.jar to ejb1.jar I get errors like:
    Unable to deploy EJB: SomeBean from ejb1.jar.jar:
    java.lang.NoClassDefFoundError: com/xxxx/xxxx/SomeClass
    Shouldn't adding the util.jar file directly to the ejb1.jar file work? Do I have to do anything extra to get it to work?
    thanks,
    ryan

    http://edocs.bea.com/wls/docs70/programming/classloading.html#1069420
    "Ryan Van Luttikhuisen" <[email protected]> wrote in message
    news:[email protected]..
    Currently I have an ejb jar that contains 1 bean (say ejb1.jar). Thisbean uses some utility classes (say util.jar). If I add the actuall .class
    files from util.jar to ejb1.jar everything works great. If I add util.jar
    to ejb1.jar I get errors like:
    >
    Unable to deploy EJB: SomeBean from ejb1.jar.jar:
    java.lang.NoClassDefFoundError: com/xxxx/xxxx/SomeClass
    Shouldn't adding the util.jar file directly to the ejb1.jar file work? DoI have to do anything extra to get it to work?
    >
    thanks,
    ryan--
    Dimitri

  • How to update/replace Jars within sbconfig.jar during import

    Hi,
    I want to replace a jar file, used by java callout actions, during import. I am using WLST script to import configuration jar but cannot figure out how to replace jar file.
    That jar file contains environment specific properties which i intend to change as part of import, once config jar is uploaded and impoted within the same session.
    I have looked to Ref, ArchiveType, Refs, and ALSBConfigurationMBean, but cant figure out to replace specific jar file within imported config jar.
    Many thanks in advance!
    many thanks
    sal
    Edited by: sallo on 16-Feb-2010 07:40

    Hi vivik,
    I am already using custimization files to already to customize environment values etc. But what i need cannot be handled by the customization file.
    I want to replace a jar file (utility jar), already in the sbconfig jar, being referenced by Java Call out actions during import process. I am begining to convince myself that it is not possible to perform such action during import process. I have checked the MBeans API but not very helpful.
    I hope i have able to explain the problem here!
    many thanks
    sal

  • Where do I put the Jakarta files standard.jar and jstl.jar when developing with JSF 2.0 in OEPE using web logic server

    hi everybody, I am wondering what should i do with the standard.jar and jstl.jar files when using we logic. I tried putting both files into
    the directory c:\oracle\middleware\oracle_home\user_projects\domains\base_domain\bin.  I don't know if this is correct.  Thanks in
    in advance for the help.

    Anyways I found this link on www.oracle.com website by the same author of the book I am reading Deepak Vohra - Templating with JSF 2.0 Facelets.
    although here he is using Weblogic 11g although I don't think it makes a difference.  have a look at the Setting up the Environment section
    where he says to download the jstl.jar and standard.jar files.
    http://www.oracle.com/technetwork/articles/java/facelets-454361.html

Maybe you are looking for

  • Sales orders ONLY in APO and not in R/3

    Dear Friends, I have this peculiar but very critical problem wherein: APO creates an extra schedule line to an ALREADY EXISTING sales order only in APO with a quantity in decimals like 130.320 PCs or whatever. Also, important to note is that this lin

  • Auto update of latest document links in Wiki pages

    Hi I am completely new to Sharepoint and wiki pages. I manage to do few changes to wiki pages to have a feel of it. I noticed that every time i create a link to a document if the version changes i need to update the link manually by editing it. Is th

  • Disablying keyboard events in a JFrame.

    Hello, How is it possible to disable keyboard events for a specific JFrame and then (after a while) enable events again ? thank you, Rami

  • Bind PL/SQL array to PHP array

    Hi all! I try to bind a PL/SQL array (nested tables, index by integer) returned by a PL/SQL-function to an PHP array. Here is the code: create or replace package MyPackage as TYPE my_type IS TABLE OF VARCHAR2(1024); FUNCTION MyFunction RETURN my_type

  • Browser title

    Hi. Am quite a beginner and self taught I'm afraid. I have used a Dreamweaver 8 template and the page title is not appearing in the browser window. Instead it gives the address where the files are stored with my internet provider. When the home page