UnJar a .JAR file

Hello!
Im tring to unjar a .JAR file to view its sourcecode. Is this possible and if it is how do i do it?
Thanks

You can open it with e.g. winzip another program like that and you can unzip it. Then you will probably get .class files. You will need a decompiler to get the source code of the .class files.

Similar Messages

  • Jar file question.

    if i unjar a jar file, how do i let java
    know where the classes are?
    thanks for any help
    owen

    Considering your .jar file is in the desktop folder,
    c:\Windows\desktop>jar -xf abc.jar
    This will cause the class files in the jar file copied in the desktop.
    Hope it helps
    Uma
    Java Developer
    http://www.javagalaxy.com

  • Weblogic Classes / Jar files

    Is there place that list the classes for a particular weblogic jar file? Right now a developer asked me what .jar file does this class, weblogic.logging.NonCatalogLogger, live in. The only way I know how to find out is to unjar each jar file until I find it. Is there an easier way?
    Thanks.

    you can use jarscan tool
    http://it.cybergav.in/2009/09/30/scanning-jars-with-jarscan/

  • Securing .jar file

    Hi guys,
    I need to secure my .jar file so that nobody can unjar it and reverse engineer it.... is there a solution in the market that you suggest to be used??
    I would very much appreciate your response

    How do you imagine the classes in the jar could be loaded if java cannot unjar the jar file? And if java can unjar it, so can jar.
    Individual class files can be encrypted - then you need a custom ClassLoader that can decrypt them when loading them - which means someone can reverse-engineer your ClassLoader and un-encrypt the class files.
    You can run your classes through an obfuscator making it more difficult to reverse-engineer the classes.

  • UnJar Jar Files

    Hello all,
    Could someone point me to an unjarring tool. I need to take a jar file and unjar it. Not using WinZip though. I'm told that that doesn't always work correctly.
    Thanks.
    Lynn

    Use jar -xvf <source jar> from the command window to extract the Jar file.
    If tou just want to view the content of the jar file use jar -tvf <source jar> from the command.

  • Unjar weblogic.jar

    i installed Axis as my soap engine on weblogic, but the wsdl does not work. as suggested, i unjared weblogic.jar and took out jaxp package from the expanded directory and then jared everthing else together into weblogic.jar
    but when starting weblogic server, i have error as follows.
    Can anyone help me with how to unjar weblogic.jar? Thanks.
    The WebLogic Server did not start up properly.
    weblogic.common.internal.VersioningError: No WebLogic packages defined in CLASSP
    ATH
    at weblogic.common.internal.VersionInfo.<init>(VersionInfo.java:46)
    at weblogic.common.internal.VersionInfo.initialize(VersionInfo.java:120)
    at weblogic.common.internal.VersionInfo.theOne(VersionInfo.java:91)
    at weblogic.version.getPLInfo(version.java:57)
    at weblogic.t3.srvr.T3Srvr.checkAccess(T3Srvr.java:517)
    at weblogic.t3.srvr.T3Srvr.initializeHere(T3Srvr.java:702)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:664)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:342)
    at weblogic.Server.main(Server.java:32)
    Reason: No WebLogic packages defined in CLASSPATH

    If you unjar the file use jar xvf weblogic.jar
    Then, a directory structure will be created.
    Then you must change the classpath of startWebLogic.sh script to point to this directory (one level up this ).
    Jin

  • 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

  • Picking up JAR files from JSP's

    I have a web application with some JAR files that live under the WEB-INF/lib directory.
    My understanding of webservers (Tomcat, Weblogic, Dynamo, Orion, Resin) is that files under
    WEB-INF/lib will be picked up on the servlet CLASSPATH.
    Using iAS 6 SP3 however, the deploytool seems to unjar all the JAR files under WEB-INF/lib, which is
    fine except that some of my classes aren't being picked up. My custom tag classes are being found,
    but org.xml.sax.XMLReader is not found, even though the class file exists.
    Any idea what is happening here?
    Thanks
    Mat.

    Hi Barry,
    Where was your course held out of interest ? Ours was in Holland.
    Wildcards definitely work as we tried this on the course.
    Alternatively, you could make sure the directory you are processing only has files in for this process and nothing else then you could process everything regardless of the name just use .
    Good luck with your processing.
    If this helps, please award the points as so few people do
    You can do this by clicking on the yellow star next to my answer.
    Cheers
    Colin

  • Including a DLL in JAR file (Comm API)

    Writing a little app that interfaces with serial port device using the communications API and I'd like to bundle it into an executable JAR. JBuilder will create the JAR for me fine, but the issue is with the win32com.dll file thats part of the comms API. I need to include this, I don't think its possible to include as part of the executable, but otherwise the DLL needs to be in the windows\system folder. Could I include the dll as part of the JAR archive and then extract it upon runtime? If so how would I go about this?
    Any help much appreciated.

    There is another option. Native libraries need to reside within the java.library.path location. As it turns out, if you, at runtime, grab this property and ADD your own location to it, then set it back in to the System.setProperty() call, it will NOT work. The only way to do it is the -Djava.library.path value that tjmaven suggested.
    However, if you read up on how a native library is found, it uses the ClassLoader.loadLibrary() which calls the protected findLibrary() method. You can therefore extend ClassLoader to find a path yourself.
    One way is to extend URLClassLoader since it has the protection/security stuff AND the ability to look in .jar files for you. Your custom loader is created by a "launcher" class in your .jar file. First, your luancher uses getClass().getProtectionDomain().getCodeSource().getLocation() to get the absolute location of the .jar file its executing within. From there, you open the jar and look for your native library, extract it using the JAR api to a location of your choosing. Now, you instantiate the custom classloader and using this custom loader instance you load the rest of your classes. The main .jar file contains two classes, the launcher and the custom classloader, and contains the native library if you wish to do it this way. The custom classloader, you specify a URL[] of "classpath" entries. You bundle up the rest of your source in a second .jar file that you pass to the URL[] when creating the custom classloader. It will find all your classes in the 2nd jar no sweat. You can even "reload" these classes on the fly by recreating the custom classloader instance if you so wish to add a sort of "reload" feature.
    Now, in your custom classloader, you override the findLibrary() and return the SAME STRING PATH that you used to unjar your native files to. This way, when the JVM asks your custom loader to load the library at some path, you return the right path to find the native files in.
    I haven't verified that this works just yet, but I will soon. Primarily, my plugin engine over at www.platonos.org will support the ability to place native libraries in plugins, allowing you to effectively wrap a native library use as a plugin. Not yet working, but we'll soon have it in place.

  • Unzipping a jar file

    how do Unzip a jar file?

    You can unjar a file giving
    " jar -xvf filename.jar " at the command prompt if u don't have a jar.exe please try using winzip/unzip..
    ebistro

  • Adding manifests to Jar files using different  versions

    I have been using the following to add a manifest pointer to my main class called JTiming
    C:\jdk1.1.8\bin\jar cmfv MyMainClass.txt JTiming.jar *
    and it works a treat, when I unjar the jar and look at the manifest file it includes the pointer to JTiming and lists each file jarred. When I try it with JDK1.3.1 or JDK1.4.1 jar.exe's they both fail to create the correct manifest entries. I can't see any notice of a change to the command line ooptions for the jar.exe's for these newer versions what am I missing?

    You seem to misunderstand - if you look at the command line I wrote in my original posting, I do exactly what you suggest!! I am able to include a reference to my starting class, my problem is that I appear to be able to get my own manifest inclusion using 1.1.8 jar.exe, but not using the jar.exe from 1.3.1 or 1.4.0

  • Read images from a jar file?

    Hello, I'm converting a 6i app to 10g. This app does a ton of read_image_file() calls to
    change GIF images on the screen based on user actions. In 6i the images are all stored on the local hard drive. The images are not icons for buttons, but images that appear in different locations on the screen.
    For 10g, is it possible to leave the images in a jar file and effectively read the images from that? Otherwise, I suppose I'm looking at using webutil functionality to download the jar file and unjar it into an images directory for reading from the client?
    Any best-practice scenario for this sort of thing?
    Thanks for any info,
    Gary

    We are migrating from 6i to 10g too. And I try to not use webutil. All my pictures (icons gif files) are in a jar file.
    Just make attention of the size of your pictures. The jar file is loaded when you launch the application (the first time, and after, only if the jar file has changed).

  • Webutil - Config and Jar Files

    Hi List,
    I am using Webutil for the first time .I have downloaded demo from OTN .WHich has pll,olb,jar ,dll files.I have gone through the manual following few things are still not clear
    1.where to store/keep Webutil.config and how do we refer to that file .
    2.If Formsweb.confog required? are these both config files required and where to keep and how do we give path to these two files
    3.how to refer webutil.jar file.which path these jar files needed to be kept ? do we have to unjar or something ?
    Thanks in advance
    Regards
    Sripad

    1.where to store/keep Webutil.config and how do we refer to that file .
    A: you decide and configure the webutil required file location saccordingly. I would suggest to store the webutil directory in the forms90 directory for simplicity
    2.If Formsweb.confog required? are these both config files required and where to keep and how do we give path to these two files
    A: Forms basic knowledge: The formsweb.cfg file and the default.env file are used by Forms - unless configured otherwise - to define the runtim environment (default.env) and the application runtime commands (formsweb.cfg). Both files are required and available in the forms90/server directory
    3.how to refer webutil.jar file.which path these jar files needed to be kept ? do we have to unjar or something ?
    Don't unjar. Copy the jar file to forms90/java. This way you van reference it by its name
    archive= ... other files ..., webutil.jar
    Frank

  • JAR File problems

    Hello,
    I have a jar file with some code I wrote that accesses a jar file from a 3rd party. I want to include the 3rd party jar files inside my jar file. So I basially have a jar file with my code (unjarred) and include the 3rd party jar files in my jar. In my MANIFEST.MF file I have properly set the Main-Class property correctly, as well as the Class-Path property. I have set my Class-Path value to 3rdparty.jar which is the jar file at the root directory of my jar. When I run my jar file I get a NoClassDefFoundError saying the 3rdparty jar file is not found. I have added a new line at the end of my MANIFEST.MF file, and am actually using ant to create my MANIFEST.MF file. When I unjar my file everything looks correct. What is the problem here? I have made sure the 3rd party classes that my code access are in the jar. What could I be doing wrong??

    Standard Java does not support placing a jar file within another jar.
    You can search for 3rd-party alternatives, ow write your own custom classloader.

  • Unjar and jar but I have not the same

    Hi;
    I want to add jar (jsse.jar Created-By: 1.2 (Sun Microsystems Inc.)) to my jar file, so I unjar (jar x jsse.jar) the file, copy the classes to directory where my classes are and jar the directory, but I cannot run the new jar.
    The problem is that, if I use jsse.jar, all is ok but when I use jssex.jar
    (jar x jsse.jar, jar cf jssex.jar .) I get exception :
    java.lang.NoClassDefFoundError: COM/rsa/jsafe/z
    in jsse.jar com/rsa/jsafe/z.class (no COM) is as well as in jssex.jar, if i try rename com to COM in jssex.jar another error is generated(IOException: java.net.SocketException: SSL implementation not available)
    Where I make mistake??
    thanx for some advices.

    I know how can I do it, with Archive builder, but I don't know how the JBuilder make it. Becouse the jar file from Archive builder is OK but when I try make jar with sun tool jar.exe the jar file is bad.
    Only variance is that "com" (main package) in jar from JBuilder is UpperCase "COM" and in jar from sun jar tool is "com"
    When I try rename "com" to "COM" in my jar (with power) my Main class is not finded.
    When I try rename "COM" to "com" (in jar from Archove Builder) the same error is throw as from my jar (some class from jsse.jar is not finded).
    When I try rename "COM" to "com" and back rename "com" to "COM" (in jar from Archive Builder) my Main class is not finded.
    I know this action is not clear, but I tried all.
    the main problem is that I unjar (or unzip) the jsse.jar and back jar (or zip) to jssex.jar (for example), so the new jar (jssex.jar) is wrong and in both jars is "com" (not "COM")
    I tried unzip and zip so the Manifest is the same too. Some problem is with case sensitive. When I use "COM" my main class is not finded and when I use "com" some class from jsse.jar is not finded.
    in others jars (which i need) is all ok.
    Where I make mistake?
    (The archive builder can make the right jar)
    Thanx for any advice.

Maybe you are looking for

  • Help on custom caret painting

    Hello all! I am developing a very custom editor (not only characters, but also drawings, etc) -- therefore need a caret blinking somewhere text exists. Tried out the following code: * Paints only caret. * @param pGraphics * @param pLineHeight private

  • Error message when the Application Manager attempts to open.

    I am using a Mac with he latest OS, and when I try to download Photoshop, the Application Manager fails to open and I get an error message. Any suggestions?

  • About nonfatal runtime error in CVI

    Good day My programBNumberOfRecord() gets a nontatal runtime error when I debug it, if I press continue it gets normal work. So I think the error dialog is improper, but i cannt skip it. Can i skip the error when debugging? thank you! Solved! Go to S

  • Open in CS4 Fit to Screen, from Bridge

    Is there a way I can open a RAW file in  ACR, and when I Open Image in CS4, they always open as fit to screen? The default seems to be 33.33%? Windows XP and CS4. Bob

  • Updating Microsoft Office X

    Long story short, I need to update my work G5 running 10.3.9 to the latest update of Office X so that I can open up the new XML based files created by the newer version of Office. Mine is 10.1.4 and I need at least 10.1.9 to get this to work. I'm hav