Jar file , which jdk version ?

I have a question that i want to ask for a long time. Let say someone give you a jar file, how do we check which version of JDK it is compile ?

You can get an easy, but approximate, answer by looking in the jar manifest:
$ jar -xf somejar.jar META-INF/MANIFEST.MF
$ cat META-INF/MANIFEST.MF
Manifest-Version: 1.0
Class-Path: someotherjar.jar
Created-By: 1.6.0 (Sun Microsystems Inc.)
Main-Class: Main
The Created-By attribute says which JDK version created the jar file. However, that's not always the same as the version that was used to compile the classes. To get an exact answer, you'd need to look at the class file version number, and you'd have to do it for each class file since they don't all have to be the same. Gory details left as an exercise. Here's a reference to get you started:
http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html#80959

Similar Messages

  • Required the details of jar files which is loaded in the database

    Hi
    We are having a 10g database which is running under Solaris machine. There are lot of .jar files which are loaded into the database. I would like to know how to find those .jar file details atlease the name of the files which are loaded in the database. Is there any view for this.
    I couldnt find anything from the Java option in TOAD
    Please provide a solution.
    Thanks
    SHIYAS M

    From 11g onwards, you have
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE 11.2.0.3.0 Production
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    SQL> desc javajar$
    Name Null? Type
    NAME NOT NULL VARCHAR2(30)
    OWNER# NOT NULL NUMBER
    PATH VARCHAR2(4000)
    CONTENTS BLOB
    SQL> desc javajarobjects$
    Name Null? Type
    JARNAME NOT NULL VARCHAR2(30)
    OWNER# NOT NULL NUMBER
    OBJNAME NOT NULL VARCHAR2(40)
    NAMESPACE NOT NULL NUMBER

  • How to execute a jar file which has an applet, without using a html file ?

    I have a jar file which contains a set of class files. iam able to execute the jar file by using this html code
    <html>
    <applet code="file.class" archive="file.jar" width="500" height="300">
    <param name="name" value="value">
    </applet>
    </html>
    I want to know how to execute this class file without using the html tags.
    pls help me out in this.
    Anki

    Hi,
    You can make an executable jar file such that when you double click on that it starts running. Just follow the steps.
    1. Open a notepad and write the following
    Main-Class: XXXXXXXX
    XXXXXXX means Your Main Class name. Don't forget to press Enter after you write your class name.
    2. Save the file as Mani.mf
    3. In the commant prompt ( your directory ) type following lines.
    jar cmf Mani.mf Demo.jar *.*
    4. This will make a jar file which is executable jar file
    Hope this will help you.
    Deepak

  • JAR file which needs other JAR files

    Hi,
    I try to run a jar file, which imports some external classes. These classes are in the library "reader.jar", which is added to the classpath. But if I start it with ...
         D:\TestProject>java -cp ./reader.jar -jar viewer.jar
    ... I get an error: java.lang.NoClassDefFoundError: de/readers/TestReader
    If I copy the file "reader.jar" to "... j2sdk1.4.2/jre/lib/ext", I can start
    "viewer.jar" successfull with ...
         D:\TestProject>java -jar viewer.jar
    Why can't I add "reader.jar" to the classpath or why is it not used by Java?

    When you run JAR's, you can not use the classpath defined at the command prompt (well, you can use it, it is just ignored). The JAR has its own class path defined in its manifest file. Add:
    CLASS-PATH: reader.jar
    to the manifest file of the viewer.jar and it should work.

  • Can't find jar file which contains com.sap.portal.directory - Constants

    Hi,
    I am not able to find a jar-file which contains the Constants class of com.sap.portal.directory.
    Does anybody know where to find it?
    Thank you in advance.
    Kind regards, Patrick.

    Hi,
    Refer this link
    Using JAR Class Finder
    in the server u can find the jar files required for the application....
    C:usrsapJ2EJC00j2eeclusterserver0appssap.comirjservlet_jspirj
    ootWEB-INFportal
    Regards,
    Senthil K.

  • How should I create JAR file which  contain JMF library and project classes

    Hi,
    I installed the JMF windows pack. I compiled and ran successfully myApplet (which use JMF librarie) in Internet Explorer on my machine. When I run this applet on some different machine, where JMF isn�t installed- it�s not running.
    There is an error:
    java.lang.NoClassDefFoundError: javax/media/ControllerListener
    I was trying to create jar file, which contain librarie JMF.jar and all other files which are require to run myApplet (*.jar, *.class, the files from folder �MyApplet�) and run it on the other computer. It still doesn�t work.
    Also I ran a JMF Customizer and created customize.jar but this file contains only JMF classes. I don�t know how add other files to it.
    How should I create a jar file which will contains all essential files to run myApplet on other machine (something like �All In One� J )
    I�m using Eclipse.
    Can somebody help me?.
    Thank You!
    Best regards:
    Peter

    Hi
    i want to make a jar file of application which is using JMF to play audio
    and video. it works well during compilation and execution but doesn't
    works in jar file.
    please help me how i make a jar file whic will run audio and video too
    your's truely
    abdul

  • How to create a jar file which is in the remote system?

    Hi,
    I have a set of files that resides in a remote system,which have to be "jar"red. I have a firewall in between. I want to create a jar file out of the files situated in the remote system.How do i go about this process.?

    Hi,
    You can't do that in a simple way. You need to have a port open in the firewall, and you need to have a server process on the remote machine.
    Kaj

  • Is there way to debug JAR file,which doesnt has sources.

    Hi
    I have jar file called myjar.jar,which contains only .class files.Assume,I dont have sources for this jar.
    Is there way to debug myjar.jar file??
    However,I can use Djcompiler and get the sources for the jar and use it for debugging.I think,Its not good Idea??
    Thanks in advance.
    Thanks
    kaleem

    Hello,
    Yes - Alt+92 works, but it is too complicated method for most users. As \ is used so often (e.g. login into domain, file and UNC paths) there should be more direct support in keyboard layout.
    Some users are using other Languages (English, Russian) keyboard layout, just to enter that single character.
    Those who know about presence of Microsoft Keyboard Layout Creator load the existing layout and modify it so that VK_OEM_5 key with "\ |" on it in combination with space produce "\" and not "°".
    I would suggest to map "\" to AltGr + "/" key, because it is physically close to VK_OEM_5 and also conceptually idea that AltGr changes meaning from one slash to other is quite logical. That combination is not currently used, so it can be used for that new
    purpose without breaking anything.
    Dainis

  • Can we make executable jar file which dont have main method?

    I have a problem.
    With whatever R&D i have done so far my understanding is that in order to create executable jar files i need a main method.
    my problem is i have certain MIS reports which are developed in java and deployed through JSP pages...so my java program has no Main Method and only objects of the classes are being called in the JSP pages.
    for e.g: i have a java class file BulkSms.class and i make an object of it in the JSP page through which my purpose is achieved by calling various method in the BulkSms through it s objects and there is no main method.
    Can i make an executable jar file without a main method and if so please give me a detailed procedure of how to go about it.
    i want to make it executable so tht on the click of it the MIS report is displayed from the JSP page.

    I am completely ignorant of JSPs, but you can not execute a jar or any java application unless you have a main method. It sounds like you need a way to launch the JSP - can't you do this with a browser?

  • How to add jar files which point to project

    when i create project in jse8 i added jar files form system.
    then when i move that project to another system it is asking for jar files.it is pointing to location from where we added.
    how to make jar files available locally so that i can move anywhere.

    This might be a CRUDE solution, but it helps :-)
    1. Create a new folder (e.g. lib) under your project
    2. Copy the interested Jars to the folder. ( I am not sure how to do from within the IDE, I just copied the jars using Explorer.
    3. Right-Click on the Libraries Node to add the Jars and Add them from the folder created in step 1.
    This works... :-)

  • Netweaver SR3 on Linux Enterprise 10 - Which JDK Version

    Hello experts,
    we are facing problems installing Netweaver SR3 (Java) on Linux Enterprise. The problem is that the step Import Java Dump hangs and the installation does not continue. According to other forum threads one problem might be a wrong JDK version. We run Linux on 64 Bit AMD.
    Could anyone provide a link for the appropriate JDK version for Linux 64 Bit AMD or further informations (SAP Notes, except 716604)?
    Many thanks in advance.
    Marco

    Hi
    Check note [1172419 - Linux: Supported Java versions on the x86_64 platform|https://service.sap.com/sap/bc/bsp/spn/sapnotes/index2.htm?numm=1172419]
    Symptom
    You need to install a supported and certified Java VM on Linux x86_64 in order run SAP products based on SAP WebAS Java.
    Solution
    The currently required version of the IBM JDK 1.4.2 is SR12.
    Best regards, Michael

  • Can't able to access the Jar files which is kept inside the folder.

    Hi,
    I am using the eclipse IDE, my project folder contains the folders src, bin, .metadata, .settings
    if i place the jar file in the same location of the above mentioned folder means i can able to use the Jar file in eclipse(in my project).
    But i create one folder in the same location in the name of Jar or anything and all jar files are placed inside the folder,then i can't able to access the jar file in eclipse(in my project).
    How i can solve this problem?

    RajivGuna wrote:
    ..How i can solve this problem?Put Eclipse aside for the moment and learn how the SDK tools work at the level of the command line, then you will be much better placed to figure how to do it in the IDE. If you are still having problems, I suggest you ask on an [Eclipse forum|http://www.eclipse.org/forums/].

  • Making excecutable jar file which contains folder

    hi,
    I have a strange (at least for me it is) problem. I made an excecutable *.jar file of one of my projects. The problem is, that it only works if the *.jar file is in the same folder as my project.
    my project uses subfolders. i noticed, that if i deleted everything, leavin only the *.jar file and the folders, then it works.
    so my question is: how can i tell my java programm to look for the folders inside the jar file?
    yes, i did put all folders inside the jar file and yes i used relative paths within my programm.
    thanx
    Usul

    for example:
      analysePoints.addImage(new File("Candidates", "A.png"));
      analysePoints.addImage(new File("Candidates", "Circle.png"));
      analysePoints.addImage(new File("Candidates", "Cross.png"));
      analysePoints.addImage(new File("Candidates", "Heart.png"));
      analysePoints.addImage(new File("Candidates", "TriangleN.png"));
      analysePoints.addImage(new File("Candidates", "TriangleSW.png"));or
       while( helpInt < pathsToImagesVT.size() )
         File currentImagePath = (File)pathsToImagesVT.elementAt(helpInt);
         Image currentImage = null;
        try{
          currentImage = getToolkit().createImage(currentImagePath.getCanonicalPath());
          MediaTracker helpMT = new MediaTracker(this);
          helpMT.addImage(currentImage,0);
          helpMT.waitForAll();
         } catch(InterruptedException e) {System.out.println(e.toString());}
           catch(IOException f){System.out.println(f.toString());}

  • Which JDK version is required for NWDS v 7.01.07

    Hi,
    Can someone point me in the right direction to find out whcih JDK version is required for NWDS v 7.01.07.
    I currently have j2sdk1.4.2_19 installed but I am getting a build error when creating a new project from ESS of:
    No 'default' JDK defined, will use running VM.
    The TARGET variable for the shortcut and JAVA_HOME env variables are set.
    The JRE_SRCROOT variable in NWDS is empty.
    Regards,
    Rob

    In NWDS set default JDK version.
    Windows - preferences - java Installed JREs
    Select chk box for JRE you want.
    Hope this helps.

  • Reload same jar file of diffrent version

    Hi Freinds ,
    I have used the code below for loading the jar at runtime, but I need to reload the same jar of different version during runtime with out restarting my apllication.
    is it possible, if yes Could you please help in that ?
    public void addURL(URL u) throws IOException {
    URLClassLoader sysloader = (URLClassLoader)ClassLoader
    .getSystemClassLoader();
    Class sysclass = URLClassLoader.class;
    try {
    Method method = sysclass.getDeclaredMethod("addURL", PARAMETERS);
    method.setAccessible(true);
    method.invoke(sysloader, new Object[] { u });
    catch (Throwable t) {
    t.printStackTrace();
    throw new IOException(
    "Error, could not add URL to system classloader");
    }// end try catch
    }// end method
    Thanks a lot in advance.
    Please copy the code snippet.
    Thanks,
    KK

    Obviously you can't do this. ADF projects done in version x need a server with ADF runtime x. Check http://wp.me/pcBZk-7S for matching versions.
    What You can try is to open the 11.1.1.6 property in11.1.1.5 and compile it and create a new jar in the lower version.
    Timo

Maybe you are looking for

  • Table is not in the same position form 1 page to next

    Hi, Following my earlier posts regarding my website and the lack of text. I thought if I created a new index page with text and and enter site button this would go some way to sorting out the problem. The problem now is that the indes page table is n

  • How can we define time stamp in rough cut planning profile

    Hi all There is no time stamp(From date to date) in Rough cut planning profile and it is just time span (0-5 ,5-10,... workdays) . If I have different capacity for my resource in different intervals how should I define it so that in planning table it

  • Windows 8.1 and Hyper-V

    Hi All I have successfully installed windows 8.1 and Hyper-V on my HP Probook 4540s having previously run Windows 8 but I have been totally unable to import any of my Generation 1 Virtual Machines as the wizard says no machine found. These all previo

  • Receiver File Adapter Problem

    Hello, I m message is in "To be Delivered" status In the detials i could see following error : Admin action: Redelivering the message failed, due to: com.sap.aii.af.ra.ms.api.DuplicateMessageException: Message ID 995b0348-a504-7441-e100-00000a1974ee(

  • Cancelling Query Results in Continually Busy Connection -- SQL Dev 2.1 EA2

    Hello All -- I am running SQL Developer 2.1 EA2 on the Windows 7 Release Candidate (64-bit). I have had issues when canceling long-running queries. Usually what happens is I run something, and realize after a couple of minutes that it's going to take