Viewing Jar File - How?

Hi....I hope this is the right place to ask. My professor sent me a JAR file, but I have no idea how to open it. I have JarInspector, and it lists all these other files. When I doubleclick on the JAR file, IMPVIEWER opens, I get the first page, and that is it. (the JAR file is going to look like a powerpoint presentation with audio and video). I also have Java Web Start.
Thanks!
Scott

Hmm, normally double-clicking on a jar file runs the Main-Class defined in the jar's manifest. If it's not working, you may not have the right version of Java or your prof may not have set up the jar correctly.
Try opening a Terminal, cd'ing to the folder containing the jar, and running it directly. ie,
cd ~/Desktop
/usr/bin/java -jar somejarfile.jar
If you get an error about incorrect class versions, upgrade Java to the latest available version (java.com).

Similar Messages

  • In .jar file how can I call API's of other .Jar file

    Hi all,
    I have created a "MyApplication.jar" file that dose not need any other .jar file Like xercesImpl.jar thne it is working fine.
    but If I make the .jar file of application that needs xercesImpl.jar API's
    of this .jar file then how I can call that xercesImpl.jar in my Application.jar newly created.
    please help me
    Thanks in advance.

    either add the other jar file to your classpath or do the following (taken from http://javaalmanac.com/egs/java.lang/LoadClass.html)
    e68. Loading a Class That Is Not on the Classpath
    A URLClassLoader can be used to load classes in any directory.
        // Create a File object on the root of the directory containing the class file
        File file = new File("c:\\myclasses\\");
        try {
            // Convert File to a URL
            URL url = file.toURL();          // file:/c:/myclasses/
            URL[] urls = new URL[]{url};
            // Create a new class loader with the directory
            ClassLoader cl = new URLClassLoader(urls);
            // Load in the class; MyClass.class should be located in
            // the directory file:/c:/myclasses/com/mycompany
            Class cls = cl.loadClass("com.mycompany.MyClass");
        } catch (MalformedURLException e) {
        } catch (ClassNotFoundException e) {
        }

  • Java class uses another class in a Jar file (How do I make Java see it)?

    I am trying to figure out how do I make Javac see the thinlet.class in the thinlet.jar.
    I have developed an XUL xml interface and a java program that calls the interface shown below:
    //package thinlet.demo;
    import thinlet.*;
    public class UI extends Thinlet
    { public UI () throws Exception {add(parse("UI.xml"));}
    public static void main(String[] args) throws Exception
    { new FrameLauncher("UI", new UI(), 600, 600); }}
    when I do the normal compile, I get an error:
    UI.java:4: cannot find symbol
    symbol: class Thinlet
    public class UI extends Thinlet {
    ^
    UI.java:7: cannot find symbol
    symbol : method parse(java.lang.String)
    location: class thinlet.demo.UI
    add(parse("UI.xml"));
    ^
    UI.java:12: cannot find symbol
    symbol : class FrameLauncher
    location: class thinlet.demo.UI
    new FrameLauncher("UI", new UI(), 600, 600);
    ^
    3 errors
    This thinlet class should be in the thinlet.jar that I have added the directory to the path, the directory and jarfile name to the System CLASSPATH and it couldn't see it. So finally I tried putting the thinlet.jar in the same directory to no avail. I've searched the web for some time an cannot find anything that specifically speaks to compiling a program that has parent classes in a Jar.
    Any help is definitely appreciated.

    This thinlet class should be in the thinlet.jar that I have added the directory to the path, the directory and jarfile name to the System CLASSPATH and it couldn't see it. So finally I tried putting the thinlet.jar in the same directory to no avail. I've searched the web for some time an cannot find anything that specifically speaks to compiling a program that has parent classes in a Jar.
    Any help is definitely appreciated.You just still haven't provided the jar in the classpath, or you're not using the right class name. Is the class really named thinlet.Thinlet? Or are you thinking "import thinlet.*" means to import all classes in a jar named thinlet.jar? Because the latter is not true. You need to import classes, not jar file names.

  • Modifying existing jar file, how?

    Hi there,
    I have a problem trying to modify an existing jar file. When I want to create a jar file, I use something like:
    REM build the application on windows, assuming the java/bin
    REM directory is in the path environment variable
    REM application is just the directory I am using
    SET cp = c:\application\TestApp
    javac -classpath %cp% TestApp.java
    REM ****************************************
    REM do packaging and adding manifest
    REM ****************************************
    jar cvfm App.jar manifest.mf TestApp*.class
    REM ****************************************
    REM run the jar file
    REM ****************************************
    javaw -jar App.jar
    But now, I have an existing jar file (swingall.jar) and I want to modify a class within that file. So, I modified the .java file, and compiled it to get my new class file.
    And the question is, how do I modify the existing file, so that I keep everything the same, except the modified class?
    Thanks
    Fernando

    I have just found out that I can't use "u". It seemsthat's only
    possible with older versions of jar.Huh? I'm using the 1.4.2-b28 jdk, it's still there,
    and I don't see how it could ever possibly be
    removed.
    Type:
    jar
    with no arguments to see all the options to jar.I already did, to double check it, and this is what I got:
    C:\Documents and Settings\Fernando Sanz>jar
    Usage: jar {ctx}[vfm0M] [jar-file] [manifest-file] files ...
    Options:
    -c create new archive
    -t list table of contents for archive
    -x extract named (or all) files from archive
    -v generate verbose output on standard error
    -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
    If any file is a directory then it is processed recursively.
    The manifest file name and the archive file name needs to be specified
    in the same order the 'm' and 'f' flags are specified.
    Example: to archive two class files into an archive called classes.jar:
    jar cvf classes.jar Foo.class Bar.class
    Note: use the '0' option to create a jar file that can be put in your CLASSPATH
    Thanks for trying with jdk 1.4, I don't have it installed in my computer right now, so I'll try tomorrow with another computer at Uni.
    Thanks!

  • Wls1032_generic (64bit) jar file how i can install ?

    operating system : windows 7 (64bit)
    oracle : 11gr2 (64bit)
    no java intstall
    any body can tell me how i can setup this jar file

    Hi,
    First of all you need to install 64 bit jdk either Sun jdk or Jrockit jdk as the generic jar files doesnt have one.
    Then you need to set the java home i.e. it should point to the 64 bit jdk.
    check java -version gives the o/p for the 64 bit jdk and then execute the command:-
    java -jar -d64 wls1032_generic.jar/zip
    Regards,
    Rohit Jaiswal

  • Since downloading firefoz 4, everytime I make a browser search I get a second page with :"Firefox can't find the file at jar:file://how can I solve the problem. Kindly reply to :ramses1@videotron.ca

    Question
    firefox 4, when I make a browser search I get a second page:"Firefox can't find the file at jar:file:///D:/Program Files/Mozilla Firefox/omni.jar!/chrome/browser/content/browser/<url></url>", how can I solve the problem.

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]

  • Executable jar files how ??

    How do I make a jar file executable, I know I have to modify manifest file but how??

    Include this line in the Manifest file
    Main-Class: MainClass.class
    Relplace the MainClass with the name of ur class.

  • When you've created a jar file, how do you use images in your program

    i want to be able to play a game with a jar file, but the image path file gets screwed up

    >
    i want to be able to play a game with a jar file, but the image path file gets screwed up>To get a reference to a resource isnide a Jar file?
    URL url = Thread.
      currentThread().
      getContextClassLoader().
      getResource("path/to/the/image.gif");Where path/to/the/image.gif is the relative path within the Jar.
    As an aside, JAI is a separate API for doing advanced stuff with images, and it supports image formats unknown to the J2SE. Whereas your question was better suited to a 'New to Java' style group, especially since it seemed the question had to do with paths, more than images as such.

  • When I search using my address bar it comes up and say page not found jar file, how do I fix this?

    File not found
    Firefox can't find the file at jar:file:///C:/Program Files (x86)/Mozilla Firefox/omni.jar!/chrome/en-US/locale/browser-region
    Check the file name for capitalization or other typing errors.
    Check to see if the file was moved, renamed or deleted.

    hello Kygirl, please install the search reset addon - it will revert the most common customziations those adware programs do in firefox back to the default (including the keyword search from the location bar): https://addons.mozilla.org/firefox/addon/searchreset/

  • How to package an application as a JAR file?

    I want to package an executed JAR file,how to do?
    "jar cvf jar_name class_name"? But it can't run,:( help me.
    Thanks in advance.

    Suppose your main class call MyMainClass. You need to create a file called "mymanifest". In the mymanifest file, you need to include following line:
    Main-Class: MyMainClass
    Then you need to jar your jarfiles by:
    jar cvfm classes.jar mymanifest -C foo/ .
    After this, you can run your jar file by java -jar classes.jar.

  • How to call function in jar file?

    First, I can't write english well.(I'm korean.. ) sorry about that.
    I have known function in jar file.
    but I don't know how to call function in jar file.
    how can I this work?
    My project and another project are respectively developing D-project with me and other man.
    so i need it. or I can't do this work.
    I will paste other's source code in my source code.
    and then recomplie , build it.. but it is not my wish!
    thanks for reading my sentence.

    If you have a jar file with a class that you wish to use, then you must add the jar file to your class path ($CLASSPATH on unix, linux, etc. and %CLASSPATH% on Windows).
    Then you can use the class normally, just as you would if it were not in the jar.
    If you meant something else, you'll need to explain what you meant.

  • How to read file in JAR file (the one containing applet class)

    my applet needs to read a file (font file) that will be bundled in the jar file. how do i read that file?
    i tried using
    URL u = new URL("file:///myfont.ttf");
    u.openStream();i got AccessControlException. is there anyway for the applet to load file in the JAR file? i see applet can load image in the jar file so figured that it should be able to do so with some other type of file
    thanks

    The reason you're getting access violation is the way you code your URL -- it's pointing to a file on the user's local disk. If my.ttf is in the jar, try:
          URL url=myApplet.class.getClassLoader().getResource("myfont.ttf");Where myApplet is the name of your applet and the font file is assumedly kept in the same directory level in the jar file as the class file for your applet.
    ;o)
    V.V.

  • How do I load property files and images stored in the jar file?

    Hi
    So, if I have a structure like this:
    /com.myfirm.myproject.SomeClass
    /images/
    /properties/
    And I pack this structure into a jar file, how do I then access the images under "/images/" and the property files under "/properties/"? A link to a good tutorial on this would be perfect, or a description/hint/howto :)

    Im having problems even loading direcly from the directory..? I have this structure:
    src (source dir)
    classes (classes dir)
    lang/textRb_en_US.properties (the file I want to load)
    Then I have this code:
    Locale currentLocale = new Locale("en", "US");
    ResourceBundle textRb = ResourceBundle.getBundle("/lang/textRb", currentLocale);But it gives me a "java.util.MissingResourceException: Can't find bundle for base name /lang/textRb, locale en_US". I start my application from within Eclipse, and I have tried to move "lang/textRb_en_US.properties" into the classes dir, but same error.
    Im confused as to there Java looks for ressources, and I need this to work no matter where I put my classes/jar. Could you help me out here?

  • How to use jar files without setting classpath

    Hi,
    I have a situvation, I can not set classpath, but i have to use jar files, how can I do that.

    URL[] urls = new URL[]{pathToJar, pathToAnotherJar, ...};
    URLClassLoader urlc = new URLClassLoader(urls);
    Now load classes within the jars loaded by the urlc classloader as needed. This is a limited approach, you can mostly use interfaces to work with classes loaded by the custom loader instance above and your existing classes.

  • How to inform the client when the jar files is updated?

    I have a question about jar file updatation by web start, please help me.
    If a client's jar file is updated in Web server and automatically downloaded to local cache, how the client know which jar file is updated?. If I want to do some special operation after updating a appointed jar file, how can I do?

    Contrary to common popular belief, this forum is not a free 'I will look up/abstract the documentation on your behalf' forum.
    You can look up sqlnet.expire_time on http://tahiti.oracle.com or may be even Google will work.
    Please do not abuse this forum by asking doc questions.
    Sybrand Bakker
    Senior Oracle DBA

Maybe you are looking for

  • How to send mail using Java Server Pages(JSP)

    Plz reply me the code for it and send me mail

  • Handle "Enter" inside Custom Container

    Hi all, I am having 4 to 5 fields in my module pool screen and at the same time i am having a custom container wherein, there is editable ALV. Here in editable ALV, i am having an editable field called dealer code.When i enter dealer code in editable

  • OAS 4081: How to use a DAD with JServlet cartrige and JDBC?

    i try to open a db connection in the jservlet cartdige via jdbc, using the following url-format in the getconnection() method: "jdbc:oracle:jts7:@<myDAD>" i get an sqlexception "sub protocol not specified". the release notes of version 4081 say that

  • Open UCM Search results

    Hello, I create a search page using UCM Search Data Control And showing result as <af:iterator value="#{bindings.Return.collectionModel}" var="hints" rows="#{bindings.Return.rangeSize}"> <af:goLink text="#{hints.title}" destination="#{hints.URI}" inl

  • (newbie) Importing/Exporting proxy service configurations?

    Hello, I'm new to AquaLogic and am going through its tutorial right now. I have a question: After I create a proxy service's flow chart going through all the configuration effort listed here[1], I would like to transfer this proxy service to another