How to check the JDK version of a compiled java file

can anybody tell me how to check the JDK version of a compiled java file ?
Edited by: gbhatia8 on Sep 9, 2010 7:04 AM

The major/minor version of the class file is the way to go.
Also, it's not necessary to write a separate program to get to those. javap prints them out when being passed the -v flag.
Note, however that "JDK version" is not a correct term, as I can create 1.4-compatible class files with a Java 6 JDK (by passing the -target flag to javac). Those won't look any different than .class files written with a 1.4 JDK.

Similar Messages

  • How to check the verity version in our PeopleSoft Installation?

    How to check the verity version in our PeopleSoft Installation? I am not sure if the verity is installed or not and also if installed what is the version?

    yes. it says the version is 5.0.1
    Is there any difference in installation or configuration when the app and web server are in same machine and when the app and web server are installed in different servers?
    ============================================
    D:\fs840\webserv\peoplesoft>mkvdk
    mkvdk - Verity, Inc. Version 5.0.1 (_nti40, Jul 23 2004)
    Usage: mkvdk [<option>...] <filespec>...
    Where <option> can be a VDK switch, or any of:
    -about Show the collection's about resources
    -autodel Delete bulk insert file when no longer needed
    -backup <dir> Specify collection backup location
    -bulk Submit bulk insert file(s)
    -charmap <name> Specify the character map to VDK
    -collection <path> Specify the collection (required)
    -create Create the collection
    -credentials <user> Specify user[:passwd][:domain][:mailbox]
    -datapath <path> Specify VDK datapath
    -datefmt <fmt> Specify date format to VDK
    -debug Enable debugging output
    -delete Delete documents
    -description <desc> Set the collection's description
    -diskcache <num> Set VDK's disk cache size (kbytes)
    -extract Extract field values from text
    -help Print this usage information
    -insert Insert documents (default)
    -locale <locale> Specify the locale to VDK
    -logfile <file> Save output in a log file
    -loglevel <num> Set the VDK output level for the log
    -mailboxes This option is depracated. Use the credentials option inste
    ad
    -maxfiles <num> Set VDK's maximum number of open files
    -maxmemory <num> Set VDK's maximum memory usage (kbytes)
    -mode <mode> Set the indexing mode
    -modify Modify fields using field/value pairs from a bulkfile
    -nohousekeep Disable housekeeping
    -noindex Disable indexing
    -nolock Turns off locking (dangerous)
    -nooptimize Disable optimizations
    -nosave Don't save collection work list
    -noservice Prevents servicing of submitted work
    -nosubmit Don't submit work to VDK
    -numdocs <num> Number of documents to insert from bulk insert file(s)
    -numpages <num> Synonym for diskcache for backward compatibility
    -offset <num> Specify offset into bulk insert file(s)
    -online Flag for online Bulk Modify
    -optimize <spec> Optimize the collection
    -outlevel <num> Set the VDK output level
    -persist Service the collection forever
    -purge Remove all documents from collection
    -purgeback Purge in the background
    -purgewait <secs> Specify delay before purge
    -quiet Suppress all non-error messages
    -repair Repair the collection
    -servlev <spec> Advanced option for overriding service level
    -sleeptime <secs> Interval between service calls for persist
    -style <dir> Specify style directory for create
    -submit Synonym for noservice for backward compatibility
    -synch Perform work synchronously
    -topicset <path> Specify VDK topic set
    -update Update documents
    -vdkhome <path> Specify VDK home
    -verbose Output more information
    -words Build word assist list
    -wordindex Build word assist index
    The <spec> for -optimize is a hyphenated string of:
    maxmerge Perform maximal merging of partitions
    squeeze Recover space from deleted documents
    vdbopt Build optimized VDB's
    spanword Create word list spanning all partitions
    ngramindex Create ngram index into spanning word list
    maxclean Really clean (not for read-write)
    readonly Make the collection read-only
    tuneup Fully optimize for read-write use
    publish Fully optimize for read-only use
    The <spec> for -servlev is a hyphenated string of:
    search Enable search and retrieval
    insert Enable adding and updating documents
    optimize Enable opportunistic collection optimization
    assist Enable building of word list
    housekeep Enable housekeeping of unneeded files
    delete Enable document deletion
    backup Enable backup
    purge Enable background purging
    repair Enable collection repair
    dataprep Same as search-index-optimize-assist-housekeep
    index Same as insert-delete
    Error: must specify collection
    mkvdk done
    D:\fs840\webserv\peoplesoft>

  • How to check the firmware version of my DR8?

    Hi,
    How to check the firmware version of my DR8?

    Go to:
    http://www.cdspeed2000.com/
    to get the software Nero CD-DVD Speed V2.11.  

  • How to check the firmware version of my MSI DR8-A

    Hi guys,
    How do I check the firmware version of my DVD writer MSI DR8-A ?
    I just bought this DVD writer, burned a DVD using a Melody DVD disc.
    And have problem reading it.
    Does it have anything to do with the firmware version?
    Is there a list of recommended DVD disc to be used with this burner ?
    Thanks a lot !!!

    Click Start, then Run and then type msinfo32.
    When the box pops up it'll have the options for your listed components. Open this tree and find your DVD-RW. To the right it will list your firmware for this drive.
    I do not know of any problems with these drives and certain media, but then again I haven't used any yet as I've only just got the drive. Don't scare me.

  • How to change the jdk version of the sun one appserver 8.1

    hi
    i have installed appserver8.1 with a jdk 1.5 .
    i am facing some problem with the parsers (my application needs to use a crimson parsers which is not supported by jdk1.5 i guess)
    so i am trying to change the jdk version by changing the asenv.conf file
    but the appservers wont start up if i do so.
    help !! please

    This is strange. Setting AS_JAVA to the install location of your jdk instance should work. I have done it many times.
    What kind of errors are you getting in the server log file?

  • How to check the existence of DB400 library from java

    Hi all,
    I actunally need to validate a DB400 library via java. so is there any way to check the existence of DB400 library from java side.
    Thanks in advance.

    Hi Sarvan,
    You might not even need a function to tell you if a record exists or not.
    Here in below example i do a check with exists .you will find couple of other ways too..
    create table t as select * from emp where deptno=10now i set salary of every person present in table 'T' to 1111 in emp table.
    update emp e
    set sal=1111
    where exists
            (select 1
              from t
              where t.empno=e.empno) Remember that plain SQL will always outperform PLSQL.
    Hope it helps
    CKLP
    Edited by: CKLP on Sep 26, 2011 3:41 AM

  • How to check the OLite version and isntalled patches?!

    Hi,
    A couple of months ago we installed the consolidated patch 9535503 in the Mobile Server version (10.3.0.2.0). All the clients (WIN32) were supossed to make a synchronization with mSync.exe and install the patch when exit the sync (similar to first installation)
    There is now a client which faces the same bug (or this looks like) and i don't know how to check if it is possible to check if the above patch has been installed in the client or not.
    Any idea?
    Thanks in advance...
    Tomeu

    the device manager should be running, if not start it up. the client version should be on the main display screen, and you can see the individual component versions in file>version
    If it is patches you are looking for, open the polite.ini file and there should be a section at the end [DMC.UPDATE] that should show the installed patches

  • How to determine the JDK version required to use a jar?

    Hi all.
    I am using a hosted server that uses JDK 1.4.2 and I cannot upgrade the VM. I have been finding it extremely difficult to install web applications on this server since I find that after installing the app, the web server complains the bytecode used in the jar is newer than the VM can understand (or it complains that the app uses JEE servlet or JSP methods it cannot find).
    To compound the problem, only about 25% of the sites I've visited that provide jars for download mention the minumum JDK version required to use them. (Some do not mention any system requirements at all besides 'requires Java and a Java application server').
    Do any of you know of any tools that can analyze a jar and determine the bytecode version it uses?
    (Another helpful tool would be one that can determine the minimum JEE APIs required to run a web app..., but that's probably wishful thinking :)).
    Thanks for your help.
    Michael N. Christoff

    The major/minor version of the class file is the way to go.
    Also, it's not necessary to write a separate program to get to those. javap prints them out when being passed the -v flag.
    Note, however that "JDK version" is not a correct term, as I can create 1.4-compatible class files with a Java 6 JDK (by passing the -target flag to javac). Those won't look any different than .class files written with a 1.4 JDK.

  • How to check for a logic bomb in compiled java code ?

    I have couple of security requirements.
    1. How do I check for logic bomb in the compiled java code ?
    2. Is there any way to monitor memory utilized by class when running inside a constructor ?

    1. Let me see if you can define 'logic bomb', then maybe a answer can be supplied. If you simply mean malicious code, then in general you cannot. You can attempt to do the kinds of things that antivirus software does, like check for the existence of known malicious code and code patterns, but that won't work any better on Java than it does on anything else.
    2. Google java profiling. Also, for something relatively simple, read about jconsole.

  • How to pass the value of variable to another java file?

    Hi. I have 2 java files (LogonAction.java and PCAction.java). The value of variable(String getrole) depends on the logon user. How can I use this value of variable in PCAction.java? I want to execute a sql statement in PCAction.java which is (String sql="Select * from PP where role"+"='" + getrole + "'") Thanks a lot.
    LogonAction.java is below:
    package test;
    import test.jdbc.util.ConnectionPool;
    import java.sql.*
    import java.util.*;
    import javax.servlet.http.*;
    import org.apache.commons.logging.*;
    import org.apache.struts.action.*;
    import org.apache.struts.util.*;
    import org.apache.commons.beanutils.PropertyUtils;
    public final class LogonAction extends Action {
    private Log log = LogFactory.getLog("org.apache.struts.webapp.Example");
    private ConnectionPool pool;
    public LogonAction() {
    pool = ConnectionPool.getInstance();
    public String getrole;
    public ActionForward execute(ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception {
    Locale locale = getLocale(request);
    MessageResources messages = getResources(request);
    ActionErrors errors = new ActionErrors();
    String username = (String)PropertyUtils.getSimpleProperty(form, "username");
    String password = (String)PropertyUtils.getSimpleProperty(form, "password");
    String getusername=CheckUser(username,password);
    getrole=getusername;
    java.lang.System.out.println(getrole);
    if ("".equals(getusername))
    errors.add(ActionErrors.GLOBAL_ERROR,
    new ActionError("error.password.mismatch"));
    getusername=username+getusername;
    // Report any errors we have discovered back to the original form
    if (!errors.isEmpty()) {
    saveErrors(request, errors);
    return (mapping.getInputForward());
    // Save our logged-in user in the session
    HttpSession session = request.getSession();
    session.setAttribute(Constants.USER_KEY, getusername);
    if (log.isDebugEnabled()) {
    log.debug("LogonAction: User '" + username +
    "' logged on in session " + session.getId());
    // Remove the obsolete form bean
    if (mapping.getAttribute() != null) {
    if ("request".equals(mapping.getScope()))
    request.removeAttribute(mapping.getAttribute());
    else
    session.removeAttribute(mapping.getAttribute());
    // Forward control to the specified success URI
    return (mapping.findForward("success"));
    * Look up the user, throwing an exception to simulate business logic
    * rule exceptions.
    * @param database Database in which to look up the user
    * @param username Username specified on the logon form
    * @exception ModuleException if a business logic rule is violated
    public String CheckUser(String username,String password){
    Connection con = null;
    try
    con = pool.getConnection();
    String sql = "SELECT * from user WHERE userid = ? AND password= ?";
    PreparedStatement ps = null;
    ResultSet rs = null;
    try {
    if (con.isClosed()) {
    throw new IllegalStateException("error.con.isClosed");
    ps = con.prepareStatement(sql);
    ps.setString(1,username);
    ps.setString(2,password);
    rs = ps.executeQuery();
    String returnstr="";
    while(rs.next())
    returnstr=rs.getString("role");
    java.lang.System.out.println(returnstr);
    return returnstr;
    } catch (SQLException e) {
    e.printStackTrace();
    throw new RuntimeException("error.ps.executeQuery");
    } finally {
    try {
    if (ps != null)
    ps.close();
    if (rs != null)
    rs.close();
    } catch (SQLException e) {
    e.printStackTrace();
    throw new RuntimeException("error.rs.close");
    catch (SQLException e)
    e.printStackTrace();
    throw new RuntimeException("Unable to get connection.");
    finally
    try
    if (con != null)
    con.close();
    catch (SQLException e)
    throw new RuntimeException(e.getMessage());
    }

    You can use PreparedStatement and
    String cmd = "select * from PP where role=?";
    PreparedStatement stmt = conn.prepareStatement(cmd);
    stmt.setString(1,theRole);

  • How to check the Oracle Release?

    Hi,
    How to check the release version in Oracle AS ?
    And
    How to find what oracle AS release has happened in year (example 2005)?
    Best Regards

    There are a couple of ways I use to find the version:
    1. Open the Oracle Universal Installer on the machine where the OAS is installed, click on Installed Products. That should display the product and the version number.
    2. Set the oracle environment variables, then run the command below
    +$ORACLE_HOME/jdk/jre/bin/java -jar $ORACLE_HOME/j2ee/home/oc4j.jar -version+
    This should display the version of the OC4J which generally is the version of the OAS (unless you have applied any one-off patches)
    Have no idea about the second part of your question. Sorry.
    - Steve

  • Checking the ADF version on EBS environment

    How to check the ADF version on an EBS environment for 12.2 branch

    Not sure if this is what you are looking for as I don't know too much about ESB, but you can try Terre web service I developed here http://wp.me/pcBZk-eI
    Timo

  • How to check the report builder version from the rdf file

    Hi,
    I have a rdf file but I don't the developer using which version of report builder to develop the rdf file. So, does anyone knows how to check the rdf file is developed by which version of report builder?
    When I try to use the notepad to open the rdf file, it shows the string "ROS.60050". So, does it means that the rdf file is developed by Oracle report 6i?
    Besides, do anyone knows if Oracle report 6i are still offer from Oralce (as I know, the latest verison of oracle report is 11g). So, in case Oralce not offer oracle 6i and I need to buy oracle report 11g, do u know it is compatiable or I need to do the migration from 6i to 11g?
    Thanks!

    Hi,
    The ROS version you are seeing in the RDF file does not mean the version where that RDF was developed. I am not aware of a way to check this but something that may help is that when you try to open a RDF developed in a higher version
    of Reports with a lower version of Reports builder the following warning will be displayed
    Warning. Opening a report saved with a newer version of Reports Builder.
    Functionality may be lost. Continue?
    "You tried to open a report with a version of Reports Builder older than the version used to
    create the report. If the report uses functionality unavailable in the older version, that
    functionality will be eliminated from the report.
    Regarding Oracle Developer 6i. This version is not supported any more. Regarding how to upgrade Reports 6i to 11g and what to have in mind during the upgrade please review the following documentation.
    References
    http://docs.oracle.com/cd/E24269_01/doc.11120/e24478/toc.htm
    How To Migrate Forms and Reports From 6i and/or 9i To 11g? (Doc ID 1275515.1)
    Hope it helps.
    Regards, RZ

  • How to check SAP Component version and what is the latest patch installed

    Hi Experts,
    Can you please tell me that how to check SAP Component version and what is the latest patch installed.
    Thanks

    there are 2 easy ways
    1) log on to SAp System, on menu bar, slect system > Status...
    2) log on to system URL and click on system Status...
    Thanks,
    Prasant K Paichha

  • How to check the dependency of Timesten Application version 11.2.1 for OEL 6U4

    How to check the dependency of Timesten Application version 11.2.1 for OEL 6U4

    Hi Chris,
    THank for your reply.. My requirement is I am planning to upgrade my Server OS from OEL 5U8/5U3 servers to OEL 6U4. And we are using timesten application 11.2.1 version as of now. So wanted to check if the same version of TImesten can we install them on OEL 6U4 . if we can install it successfully what are the dependent RPM packages we need to consider for installing the timesten application and will there be any issues using the application? .
    Is timesten 11.2.2 is the officially supported and stable version on OEL6U4?
    And also can you suggest me if I want to check other applications dependency like rhino-2.3 and postgres 8.1.23 version how I need to check if this applications versions are certified to run on OEL 6U4.
    IT would be great help if you can suggest me on this.
    Naveen

Maybe you are looking for

  • Use presentation variable in date filter

    Hi, I have a Date presentation variable pvEffDt whose value is set in a dashboard prompt. How do I access this variable in a Date between filter? I actually need data for chosen date's previous month (weird, why don't I choose the previous month itse

  • How to show Word properties in PDF doc

    I'd like to be able to see the Title from a Word document also show as a Title of a converted PDF file in a separate column when using the detail view of explorer in Vista.  I changed conversion settings to include document properties, but why won't

  • VC in CE 7.2 does not start

    Hi everybody, in our newly installed CE 7.2 (SP1) the Visual composer refuses to start. The message we get is: Failed to fetch the kit core.gml2:core.kit I already applied patch 1 for VCFREESTYLEKIT. Does anyone have an idea? Thanks and best regards,

  • Bluetooth LG Soundbar not recognized by mac mini

    Streams fine from my iphone 4s and ipad 1 and 2, but mac mini won't recognize it.  Doesn't even show up as available device, where as the portable devices pick it up right away.  Any ideas?

  • Where to download Oracle client installation .exe file

    Hi, I need to install an Oracle client on a Windows Server 2008 (32-bit), how do I do that? I want to install Oracle client version 10.2.0.4 (Instant Client Package - Basic: All files required to run OCI, OCCI, and JDBC-OCI applications). I can't fin