Utility to check Java source JVM version compliance

Does anyone know of any utilities that can check Java source for compliance against various JVM versions (other than an appropriate compiler!).
So, for example, we're developing using an IDE that only works against 1.4 and later, but must develop to a rather old JVM. At the moment we need to know to avoid certain language constructs, etc. It would be nice to verify that we are compliant before delivering the system for test.

why other than a compiler? no better test than compiling! later compilers can still compile for an earlier JVM, if you wish
I'd trust the compiler more than I would some third-party checking application

Similar Messages

  • Simple JSP Code to check JVM version

    Does any know a simple code to check the JVM version?

    you can try to use the java.lang.Runtime,and then execute some local system call.
    But I don't know about the exact call
    Runtime runtime=Runtime.getRuntime();
    runtime.exec("*** ");

  • How to check Java Card CC EAL version?

    Hi friends..
    I want to know, how to check the CC EAL version of our Java Card?..
    Roughly, What is the different between Java Card CC EAL4 and Java Card CC EAL5?
    Are both of them differentiated by Cryptography supported by each chip?..
    I mean, whether or not Java Card CC EAL 4 support only Symmetric Key, while Java Card CC EAL 5 support both Symmetric and Asymmetric Key?..
    Please correct me if i'm wrong.
    Thanks

    Hi,
    I want to know, how to check the CC EAL version of our Java Card?..Check out following website. All CC certified products are listed here. Assurance level is also mentioned with the product description.
    http://www.commoncriteriaportal.org/products/
    Are both of them differentiated by Cryptography supported by each chip?..
    I mean, whether or not Java Card CC EAL 4 support only Symmetric Key, while Java Card CC EAL 5 support both Symmetric and Asymmetric Key?..
    CC assurance level has nothing to do with support of cryptographic feature. Check out following link for more more information.
    http://en.wikipedia.org/wiki/Common_Criteria
    Regards,

  • Java JVM version

    Hi,
    In our xMII 11.5  server system, I found that java JVM version is 1.4.2_07. In my client side JVM version is 1.5.0_11. Will it be a problem?
    -Raj

    Hi Govind,
    This depends on the version of xMII you are running. From SR3 onwards (11.5.3), I believe the xMII server needs to have JSDK 1.4.2_13 or newer and officially supports JRE 1.5.0_09 or newer on client machines.
    Maybe you can post the service release your are on and you can get a more accurate answe on this forum...
    Regards,
    Sascha

  • Java Webstart application problem with TLS certificate revocation checks (Java 1.7.0_76)

    We have a problem with our Java Web Start Application regarding the TLS certificate revocation check:
    The application is running on a server within a wide area network which is separated from the internet.
    The application users have access to the WAN, and also access to the internet over some corporate proxy/firewall.
    The user has to enter, for example "https://my-site.de/myapp/ma.jnlp" within a webbrowser or could also call  "javaws https://my-site.de/myapp/ma.jnlp" to start the application client.
    The webserver has a certificate from a trusted certificate authority. This certificate seems to be ok, the browser is even configured to perform OCSP status check.
    The application files are signed with a certificate from another trusted certificate authority. This certificate seems also to be ok. Regarding this certificate there
    are no problems with certificate revocation checks.
    The problem is, while starting the application client there is a message box which tell us something like "the connection to this website ist not trustworthy",
    "Website: https://my-site.de:80", and something about an invalid certificate, meaning the webserver certificate.
    Obviously the jvm runtime, which is executed on the users workstation, tries to perform a revocation check for the webservers certificate, but this fails because
    it cannot fetch the certificate under https://my-site.de:80.
    The application will execute without further problems after that message but the users are very concerned about the "invalid" certificate, so here are my questions:
    - Why is the application trying to get the webserver certificate over Port 80. Our application developers told me, there is no corresponding statement. Calling this address
      has to fail while "https://my-site.de:443" or "https://my-site.de" would not have a problem.
    - Is there a way to make the application go on without performing a tls revocation check? I mean, by adjusting the application sourcecode and not by configuring the users Java Control Panel.
      While disabling the TLS Certificate Revocation check in the Java Control Panel, the Webstart Application executes without a warning message, but this is not a workable solution for
      our users.
    It would be great if someone can help me with a hint so i can send our developers into the right direction;-)
    Many thanks!
    This is a part from a java console output after calling "javaws -verbose https://my-site.de/myapp/"
    (sorry for this is in german... and also my english above)
    network: Verbindung von http://ocsp.serverpass.telesec.de/ocspr mit Proxy=HTTP @ internet-proxy.***:80 wird hergestellt
    network: Verbindung von http://ocsp.serverpass.telesec.de/ocspr mit Proxy=HTTP @ internet-proxy.***:80 wird hergestellt
    security: OCSP Response: GOOD
    network: Verbindung von http://ocsp.serverpass.telesec.de/ocspr mit Proxy=HTTP @ internet-proxy.***:80 wird hergestellt
    security: UNAUTHORIZED
    security: Failing over to CRLs: java.security.cert.CertPathValidatorException: OCSP response error: UNAUTHORIZED
    network: Cacheeintrag gefunden [URL: http://crl.serverpass.telesec.de/rl/TeleSec_ServerPass_CA_1.crl, Version: null] prevalidated=false/0
    cache: Adding MemoryCache entry: http://crl.serverpass.telesec.de/rl/TeleSec_ServerPass_CA_1.crl
    cache: Resource http://crl.serverpass.telesec.de/rl/TeleSec_ServerPass_CA_1.crl has expired.
    network: Verbindung von http://crl.serverpass.telesec.de/rl/TeleSec_ServerPass_CA_1.crl mit Proxy=HTTP @ internet-proxy.***:80 wird hergestellt
    network: Verbindung von http://crl.serverpass.telesec.de/rl/TeleSec_ServerPass_CA_1.crl mit Proxy=HTTP @ internet-proxy.***:80 wird hergestellt
    network: ResponseCode für http://crl.serverpass.telesec.de/rl/TeleSec_ServerPass_CA_1.crl: 200
    network: Codierung für http://crl.serverpass.telesec.de/rl/TeleSec_ServerPass_CA_1.crl: null
    network: Verbindung mit http://crl.serverpass.telesec.de/rl/TeleSec_ServerPass_CA_1.crl trennen
    CacheEntry[http://crl.serverpass.telesec.de/rl/TeleSec_ServerPass_CA_1.crl]: updateAvailable=true,lastModified=Tue Mar 24 10:50:01 CET 2015,length=53241
    network: Verbindung von http://crl.serverpass.telesec.de/rl/TeleSec_ServerPass_CA_1.crl mit Proxy=HTTP @ internet-proxy.***:80 wird
    network: Verbindung von socket://ldap.serverpass.telesec.de:389 mit Proxy=DIRECT wird hergestellt
    security: Revocation Status Unknown
    com.sun.deploy.security.RevocationChecker$StatusUnknownException: java.security.cert.CertPathValidatorException: OCSP response error: UNAUTHORIZED
        at com.sun.deploy.security.RevocationChecker.checkOCSP(Unknown Source)
        at com.sun.deploy.security.RevocationChecker.check(Unknown Source)
        at com.sun.deploy.security.RevocationCheckHelper.doRevocationCheck(Unknown Source)
        at com.sun.deploy.security.RevocationCheckHelper.doRevocationCheck(Unknown Source)
        at com.sun.deploy.security.RevocationCheckHelper.checkRevocationStatus(Unknown Source)
        at com.sun.deploy.security.X509TrustManagerDelegate.checkTrusted(Unknown Source)
        at com.sun.deploy.security.X509Extended7DeployTrustManagerDelegate.checkServerTrusted(Unknown Source)
        at com.sun.deploy.security.X509Extended7DeployTrustManager.checkServerTrusted(Unknown Source)
        at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)
        at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
        at sun.security.ssl.Handshaker.processLoop(Unknown Source)
        at sun.security.ssl.Handshaker.process_record(Unknown Source)
        at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
        at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
        at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
        at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
        at com.sun.deploy.net.HttpUtils.followRedirects(Unknown Source)
        at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
        at com.sun.deploy.net.BasicHttpRequest.doGetRequestEX(Unknown Source)
        at com.sun.deploy.cache.ResourceProviderImpl.checkUpdateAvailable(Unknown Source)
        at com.sun.deploy.cache.ResourceProviderImpl.isUpdateAvailable(Unknown Source)
        at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
        at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
        at com.sun.deploy.model.ResourceProvider.getResource(Unknown Source)
        at com.sun.javaws.jnl.LaunchDescFactory._buildDescriptor(Unknown Source)
        at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
        at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
        at com.sun.javaws.Main.launchApp(Unknown Source)
        at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
        at com.sun.javaws.Main.access$000(Unknown Source)
        at com.sun.javaws.Main$1.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
        Suppressed: com.sun.deploy.security.RevocationChecker$StatusUnknownException
            at com.sun.deploy.security.RevocationChecker.checkCRLs(Unknown Source)
            ... 35 more
    Caused by: java.security.cert.CertPathValidatorException: OCSP response error: UNAUTHORIZED
        at sun.security.provider.certpath.OCSP.check(Unknown Source)
        at sun.security.provider.certpath.OCSP.check(Unknown Source)
        at sun.security.provider.certpath.OCSP.check(Unknown Source)
        ... 36 more
    security: Ungültiges Zertifikat vom HTTPS-Server
    network: Cacheeintrag nicht gefunden [URL: https://my-site.de:80, Version: null]

    Add the JSF Jars to the WEB-INF/lib directory of the application. If still getting error add to the CLASSPATH variable in the startWebLogic script in the domain/bin directory.

  • Check java on users PC and give message

    The following code has been written with Java 1.4 and works great, but if a user has Java 1.3 they get an error message and if a user has Java 1.2 nothing happens at all. Is there a way to check if the user is using a version older than 1.4 and if so pop up a message telling them they need to download a newer version of Java?
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.util.List;
    import java.io.*;
    import java.util.*;
    import javax.xml.parsers.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.*;
    import javax.xml.transform.stream.*;
    import org.w3c.dom.*;
    public class Sametime extends JFrame implements ActionListener {
        private int indentation = -1;
        JPanel panel = new JPanel();
        JTextArea jta = new JTextArea(
        //Instructions for user
        "For a successful buddy list migration do the following:\n"
        + "1. Save your current Sametime Buddy List to your PC.\n   "
        + "The default location should be: C:/Program Files/Lotus/Sametime Client.\n"
        + "  A. Open the Sametime Client.\n"
        + "  B. Click on People\n"
        + "  C. Click on Save List.\n"
        + "  D. Save as your first.last.dat\n"
        + "     Ex. john.doe.dat\n"
        + "NOTE: If you have AOL contacts in your Sametime buddy list they will not be migrated.\n");
        JButton browse = new JButton("Continue");
        JButton exit = new JButton("Exit");
        public Sametime() {
            super("Sametime Buddy List Migration");
            setSize(610, 245);
            Container c = this.getContentPane();
            c.add(panel);
            browse.addActionListener(this);
            exit.addActionListener(this);
            panel.add(jta);
            panel.add(browse);
            panel.add(exit);
            jta.setEditable(false);
            setLookAndFeel();
            setVisible(true);
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        } //end Sametime
        public class DATFilter extends javax.swing.filechooser.FileFilter {
            public boolean accept(File f) {
                //if it is a directory -- we want to show it so return true.
                if (f.isDirectory())
                    return true;
                String extension = getExtension(f);//get the extension of the file
                //check to see if the extension is equal to "dat"
                if ((extension.equals("dat")))
                    return true;
                //default -- fall through. False is return on all
                //occasions except:
                //a) the file is a directory
                //b) the file's extension is what we are looking for.
                return false;
            }//end accept
            public String getDescription() {
                return "dat files";
            }//end getDescription
             * Method to get the extension of the file, in lowercase
            private String getExtension(File f) {
                String s = f.getName();
                int i = s.lastIndexOf('.');
                if (i > 0 &&  i < s.length() - 1)
                    return s.substring(i+1).toLowerCase();
                return "";
            }//end getExtension
        }//end class DATFilter
        public void actionPerformed(ActionEvent e) {
            //Default Location for JFileChooser search
            String error = "The file selected is not a .dat file!\n"
            + "Please select your recently saved .dat file and try again.";
            JFileChooser fc = new JFileChooser("/Program Files/Lotus/Sametime Client");
            fc.setFileFilter(new DATFilter());
            fc.setFileSelectionMode( JFileChooser.FILES_ONLY);
            String user = System.getProperty("user.name");// finds who the current user is
            if (e.getSource() == browse) {
                int returnVal = fc.showSaveDialog(Sametime.this);
                if (returnVal == JFileChooser.APPROVE_OPTION) {
                    //if (fc.getSelectedFile().getName().equals(".dat")){
                    if (fc.getSelectedFile().getName().endsWith(".dat")){ // checks to see if selected file is .dat
                    }else{
                        JOptionPane.showMessageDialog(null, error, "Wrong File", JOptionPane.ERROR_MESSAGE);
                        return;
                    }//end else
                    try {
                        String[] contactArray = parseDatFile(fc.getSelectedFile());
                        Document document = createXMLDocument(contactArray);
                        saveToXMLFile(
                        document,
                        new File(
                        "C:/Documents and Settings/" + user +"/My Documents/OLCS/",// looks for directory for list
                        "contacts-list_migration.ctt"));
                    } catch (Exception exc) {
                        File f = new File("C:/Documents and Settings/" + user +"/My Documents/OLCS/");// setting directory for list if not there
                        boolean yes = true;
                        yes = f.mkdir();// creating directory
                        try {
                            String[] contactArray = parseDatFile(fc.getSelectedFile());
                            Document document = createXMLDocument(contactArray);
                            saveToXMLFile(
                            document,
                            new File(
                            "C:/Documents and Settings/" + user +"/My Documents/OLCS/",// used only if the directory didn't exist
                            "contacts-list_migration.ctt"));
                            //exc.printStackTrace();// not sure if this is needed?
                        } catch (Exception exc1) {
                            exc1.printStackTrace();
                        }//end inner catch
                    }// end catch
                }// end if
                if(returnVal==JFileChooser.CANCEL_OPTION){
                    String Warning = "You did not migrate your Sametime buddy list at this time.";
                    JOptionPane.showMessageDialog(null, Warning, "Migration Canceled", JOptionPane.WARNING_MESSAGE);
                    return;
                }else{
                    String thankyou = "Thank You for Migrating your Sametime buddy list to OLCS"
                    + "\nYour new OLCS buddy list has been saved to:"
                    + "\nC:/Documents and Settings/" + user +"/My Documents/OLCS"
                    + "\n as: Contact-List_migration.ctt"
                    + "\n\n To be able to use Contact-List_migration.ctt for Windows Messenger:"
                    + "\n1. Log into Windows Messenger."
                    + "\n2. Click on File"
                    + "\n3. Click on 'Import Contacts from a Saved File...'"
                    + "\n4. Open OLCS in My Documents"
                    + "\n5. Click on 'Contact-list_migration.ctt'"
                    + "\n6. Click Open to import the list."
                    + "\n   A window will pop up confirming that you want to add all of the contacts"
                    + "\n   Click 'yes'"
                    + "\n   Your buddy list is ready to be used.";
                    JOptionPane.showMessageDialog(null, thankyou, "Migration Completed", JOptionPane.INFORMATION_MESSAGE);//Change this when defualt directory is known.
                }//end if else statement
            } //end if
            System.exit( 0 );
            if (e.getSource() == exit) {
                System.exit( 0 );
            } //end if
        } //end actionPerformed
        String[] parseDatFile(File datFile)
        throws Exception    {
            List list = new ArrayList();
            BufferedReader br = new BufferedReader(new FileReader(datFile));
            String line;
            while ((line = br.readLine()) != null) {
                line = line.trim();
                if (line.indexOf("U") != 0)
                    continue;
                int p = line.indexOf("::");
                if (p == -1)
                    continue;
                line = line.substring(p + 2).trim();
                if (line.indexOf("AOL") == 0)
                    continue;
                p = line.indexOf(",");
                if (p != -1)
                    line = line.substring(0, p);
                line = line.trim() + "@mci.com";
                if (list.indexOf(line) == -1)
                    list.add(line);
            }//end while
            br.close();
            String[] contactArray = new String[list.size()];
            list.toArray(contactArray);
            return contactArray;
        }// end String
        // setting up the XML file
        Document createXMLDocument(String[] contactArray) throws Exception {
            DocumentBuilderFactory dBF = DocumentBuilderFactory.newInstance();
            DocumentBuilder builder = dBF.newDocumentBuilder();
            DOMImplementation domImpl = builder.getDOMImplementation();
            Document document = domImpl.createDocument(null, "messenger", null);
            Element root = document.getDocumentElement();
            Element svcElm = document.createElement("service");
            Element clElm = document.createElement("contactlist");
            svcElm.setAttribute("name", "Microsoft RTC Instant Messaging");
            svcElm.appendChild(clElm);
            root.appendChild(svcElm);
            for (int i = 0; i < contactArray.length; i++) {
                Element conElm = document.createElement("contact");
                Text conTxt = document.createTextNode(contactArray);
    conElm.appendChild(conTxt);
    clElm.appendChild(conElm);
    }//end for
    return document;
    }// end Document
    void saveToXMLFile(Document document, File xmlFile) throws Exception {
    OutputStream os =
    new BufferedOutputStream(new FileOutputStream(xmlFile));
    TransformerFactory tFactory = TransformerFactory.newInstance();
    Transformer transformer = tFactory.newTransformer();
    transformer.setOutputProperty(OutputKeys.INDENT, "yes");//puts information on seperate lines
    transformer.setOutputProperty(OutputKeys.METHOD, "xml");
    transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");//gives the XML file indentation
    transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
    DOMSource source = new DOMSource(document);
    StreamResult result = new StreamResult(os);
    transformer.transform(source, result);
    os.close();
    }//end saveToXMLFile
    public static void main(String[] args) {
    Sametime st = new Sametime();
    ImageIcon picIcon = new ImageIcon(st.getClass().getResource("/ST_Migration/images/mci.gif"));//Change when default is known!
    st.setIconImage(picIcon.getImage());
    } //end main
    private void setLookAndFeel() {
    try {
    UIManager.setLookAndFeel(
    UIManager.getSystemLookAndFeelClassName());
    SwingUtilities.updateComponentTreeUI(this);
    } catch (Exception e) {
    System.err.println("Could not use Look and Feel: " + e);
    } //end catch
    } //end void setLookAndFeel
    } //end public class Sametime

    Well, if you don't want to use Package.isCompatibleWith and the version numbers will always be of the form x.y where y is at most one digit, you can use Double.parseDouble() and then compare the numbers. Otherwise you need to write a method of your own.

  • How to read the Java source code (in Netbeans)

    I use OS X10.5.5, NetBeans 6.1 and JSE 6 on a 64 bit mac.
    When I downloaded NB6.1 it had JSE 5 as it's default (and only) java platform. I ran Software Update to get Java 6 from Apple, used the Java Prefrences utitlity to set JSE6 as default. In NB I added the JDK6 platform, registered the JDK6 javadocs and noticed that I also have the option of registering the Java source code.
    I have three questions:
    1) How do I make JDK6 the default in NetBeans. The JDK5 keeps being default after I did the steps above and I don't see anywhere to change that.
    2) How do I read the Java 6 source code? I can see sun provides [source code| http://download.java.net/jdk6/] for their supported platforms. I dont see Apple doing the same for its JDK port. What would I need to do to get to read the java SE6 sources? or is it actually hiding somewhere in the /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home hierarchy?
    3) Where does the JVM look for the binary code to run when I make a call to, say java.util.ArrayList or any other library. In my naivety I would have assumed it would be a .class file somewhere in the java Home folder, but I don't see anything like it.
    thanks in advance,
    chris

    This is taken from the help included with netbeans. In response to question 1.
    By default, the IDE uses the version of the Java SE platform (JDK) with which the IDE runs as the default Java platform
    for compilation, execution, and debugging. You can view your IDE's JDK version by choosing Help > About and clicking the
    Detail tab. The JDK version is listed in the Java field.
    You can run the IDE with a different JDK version by starting the IDE with the --jdkhome jdk-home-dir switch on the command line
    or in your IDE-HOME/etc/netbeans.conf file. For more information, see IDE Startup Parameters.
    In the IDE, you can register multiple Java platforms and attach Javadoc and source code to each platform. For example, if you
    want to work with the new features introduced in JDK 5.0, you would either run the IDE on JDK 5.0 or register JDK 5.0 as a
    platform and attach the source code and Javadoc to the platform.
    In  , you can switch the target JDK in the Project Properties dialog box. In  , you have to set the target JDK in the Ant script itself,
    then specify the source/binary format in the Project Properties dialog box.
    To register a new Java platform:
    Choose Tools > Java Platforms from the main window.
    Click New Platform and select the directory that contains the Java platform. Java platform directories are marked with a  
    in the file chooser.
    Use the Sources and Javadoc tabs to attach Javadoc documentation and source code for debugging to the platform.
    Click Close.
    To set the default Java platform for a standard project:
    Right-click the project's root node in the Projects window and choose Properties.
    In the Project Properties dialog box, select the Libraries node in the left pane.
    Choose the desired Java platform in the Java Platform combo box.
    Switching the target JDK for a standard project does the following:
    Offers the new target JDK's classes for code completion.
    If available, displays the target JDK's source code and Javadoc documentation.
    Uses the target JDK's executables (javac and java) to compile and execute your application.
    Compiles your source code against the target JDK's libraries.
    If you want to register additional Java platforms with the IDE, you can do so by clicking the Manage Platforms button.
    Then click the Add Platform button and navigate to the desired platform.
    To set the target Java platform for a free-form project:
    In your Ant script, set the target JDK as desired in the javac, java, and javadoc tasks.
    Right-click the project's root node in the Projects window and choose Properties.
    In the Sources panel, set the level of JDK you want your application to be run on in the Source/Binary Format combo box.
    When you access Javadoc or source code for JDK classes, the IDE searches the Java platforms registered in the
    Java Platform Manager for a platform with a matching version number. If no matching platform is found, the IDE's default platform is used instead.
    See Also
    Managing the Classpath
    Declaring the Classpath in a Free-Form Project
    Stepping Through Your Program
    Legal Notices

  • 1.1 vs 1.4 : SDK API's and how they relate to JVM versions

    Hey all,
    I'm hoping some Java expert/guru/enthusiast can help me understand a little (OK, a lot) more about designing applets for backward compatibility .
    My situation is that I need to design applets which are compatibile with the built-in Java features of Internet Explorer and Netscape 6.x - which appears to be JVM versions 1.1.4. I know going with Java2, JDK 1.4, web start whatever would be MUCH better, and will do whatever I can to push clients to plug-in & non-MS browsers, etc. etc., but believe me, supporting MS JVM 1.1.4 is a requirement...
    ...So my question is, are there any things added to the JDK since 1.1.4 that can be used in a 1.1 JVM? If so, how would I be able to determine what those things are without testing them all?
    Like could i take java source for some 1.4 SDK code and add them to a 1.1 project? how do I know if the api requires a new intrinsic or not? (native keyword?)
    Also, I'm using the 1.4 SDK compiling for 1.1 targets, aside from the 1.4 SDK api's & packages, will there be any code I can write that will happily compile for a 1.1 target but then mysteriously fail when testing? What I mean is, if I use a new language feature or compiler feature since 1.1, will the 1.4 compiler's byte-code still be 1.1 compatible, or will there be some potential run-time problems?
    thanks

    As a rule of thumb, avoid all swing components (just use awt) because they are only available in 1.2. You can use all enhancements and bug fixes to awt components that are available in 1.4 (even 1.5).
    ;o)
    V.V.

  • Compiling a java source in pl/sql developer - problems

    Hi,
    i'm using pl/sql developer and i created a javasource like this:
    import net.sf.jasperreports.engine.JRException;
    import net.sf.jasperreports.engine.JasperFillManager;
    create or replace and compile java source named Test as
    import net.sf.jasperreports.engine.JasperPrint;
    import net.sf.jasperreports.view.JasperViewer;
    import persistencia.JdbcDaoFactory;
    * @author igor.simoes
    public class ProcessoRelController {
    the problem is: when i compile the source, an error is displayed(canno't find symbol) in the first line (import net.sf.jasperreports.engine.JRException;)
    i wanna know how can i make the oracle JVM see the package(.jar) that contains net.sf.jasperreports.engine.JRException class, and the others classes in the import statement..
    thank's
    Igor Simões

    Hi,
    Refer the 'Implementing the report service' section in the following article: http://java.dzone.com/articles/java-reporting-part-2
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import java.util.HashMap;
    import net.sf.jasperreports.engine.JRException;
    import net.sf.jasperreports.engine.JRExporterParameter;
    import net.sf.jasperreports.engine.JasperCompileManager;
    import net.sf.jasperreports.engine.JasperExportManager;
    import net.sf.jasperreports.engine.JasperFillManager;
    import net.sf.jasperreports.engine.JasperPrint;
    import net.sf.jasperreports.engine.JasperReport;
    import net.sf.jasperreports.engine.export.JRXlsExporter;
    public static Connection establishConnection()
    Connection connection = null;
    try
    Class.forName("oracle.jdbc.driver.OracleDriver");
    String oracleURL = "jdbc:oracle:thin:@localhost:1521:mySID";
    connection = DriverManager.getConnection(oracleURL,"username","password");
    connection.setAutoCommit(false);
    catch(SQLException exception)
    exception.printStackTrace();
    return connection;
    -Priyanka

  • Our Java application is built with java 1.4 version and oracle 10g

    Our Java application is built with java 1.4 version and oracle 10g version database, is it possible to upgrade oracle database to 11g?

    is it possible to upgrade
    Yes. SE and the other editions have a migration/upgrade utility, not seeing any mention of that program in the XE license docs. To upgrade to 11gR2 from 10g, the 10g instance must be at patch 10.2.0.2 or higher.
    So if you're a GUI dba, might be out of luck. But the the XE install has the catalog upgrade scripts that need to be run, there is a MOS note explaining the manual upgrade steps.
    Or set up a brand new 11g database instance and datapump your user schema(s) from the 10g instance to the new 11g instance. The database doesn't care what java version you're using, it just does what its told with the data. DDL, DCL, DML ... its not much different. Quite a few new features in 11g.
    But if you're after JVMs that piece is not supported with XE.

  • BUG: Import Java Sources, can delete file contents.

    When I was recreating my project files because I had a problem with migrating from Preview 2. I went to import all my source into the new project... via File > Import > Java Sources... This is when I realized I setup the path wrong for the project I had c:\projects\application\projectname\projectname\src for the source where it was suppose to be c:\projects\application\projectname\src.
    Anyway instead of recreating again I just changed the Copy to 'c:\projects\application\projectname\src' and I set the copy from to the same exact directory 'c:\projects\application\projectname\projectname\src', then clicked ok to import.
    Well 10minutes later after adding the rest of the stuff I need and fixing the directory paths I realized all the source files were there but the contents were deleted!
    Wasn't a big deal for me because I backup my files and I just right clicked on the source folder in vista and restored the previous versions (what a handy feature)... But I don't remember getting a warning and why would it delete the contents anyways? Shouldn't it do a check to see if its copying the file onto it self before copying and just skip the copy part and import.
    Stupid me for messing up the path but for someone who doesn't backup their files this would really suck bad.
    Thanks,
    Art

    When I was recreating my project files because I had a problem with migrating from Preview 2. I went to import all my source into the new project... via File > Import > Java Sources... This is when I realized I setup the path wrong for the project I had c:\projects\application\projectname\projectname\src for the source where it was suppose to be c:\projects\application\projectname\src.
    Anyway instead of recreating again I just changed the Copy to 'c:\projects\application\projectname\src' and I set the copy from to the same exact directory 'c:\projects\application\projectname\projectname\src', then clicked ok to import.
    Well 10minutes later after adding the rest of the stuff I need and fixing the directory paths I realized all the source files were there but the contents were deleted!
    Wasn't a big deal for me because I backup my files and I just right clicked on the source folder in vista and restored the previous versions (what a handy feature)... But I don't remember getting a warning and why would it delete the contents anyways? Shouldn't it do a check to see if its copying the file onto it self before copying and just skip the copy part and import.
    Stupid me for messing up the path but for someone who doesn't backup their files this would really suck bad.
    Thanks,
    Art

  • Oracle 8i jvm version

    Is there any standard pl-sql procedure or java procedure , that gives the version of JVM , within oracle 8i.From the readme.txt I am sure that the version of JVM is 1.2.1 , but I would like to have a function callable from within sqlplus which gives the same result.

    Hi Chandrashekaran,
    Please note that I can't verify this for you at the time of writing,
    but I think that one of the "System" properties gives you the version
    of the JVM. So you could write a java stored procedure that retrieves
    the JVM version from the appropriate System property. Check the javadoc
    for the java.lang.System class. From memory, there is also a method
    that lists all the property names -- so you can locate the relevant
    one and then use that to get the required information regarding the
    JVM version.
    Hope this helps,
    Avi.

  • How to detect JVM version in Internet Explorer

    Hello, I have a site I need to do a check to determine if the user has the Sun JVM or Microsoft JVM and the version of each. This needs to be fully client side and preferably in JavaScript.
    The problem is I can't seem to grab the JVM versions. Do I use a version number or objectID? If I have to use an object number like this 08B0E5C0-4FCB-11CF-AAA5-00401C608500, where do I find those numbers?
    I did a pretty extensive web search and can't find a lot of options. Thanks.

    Hi
    I am also looking for solution for same problem..
    While Searching in this forum I came across this thread..
    Re: wf installation/monitor configuration
    Please install the plugin on the following url http://www.java.com/en/download/manual.jsp. This will view all the images and the applet.
    Sharat
    I am now going to try this... Also I have a doubt whether it is because of IE version less than 6 ... As somewhere in requirements I have read IE 6 is required. Cant remember where
    Sanjeev

  • Can't find java source to web services tutorial

    When I down load the Java Web Services Tutorial zip file, all that is in there are html files. I've read all sorts of references to the source, even a directory structure, but I cannot find the files.
    I have gone to:
    http://java.sun.com/webservices/downloads/webservicespack.html
    And clicked on the Java WebServices Tutorial, v1.5_01 Download.
    The java source files to the tutorial are NOT in that zip file.

    Hmm, the URL for the tutorial you gave isn't working for me.
    I've checked a bit more through the tutorial and JWSDP examples, and they all match for me. I'm looking at JWSDP version 1.5, and the tutorial here:
    http://java.sun.com/webservices/docs/1.5/tutorial/doc/index.html
    I can't find a 'HelloService' in this tutorial (I also have the tutorial downloaded, grep gave no results). The tutorial refers to, for example, to an example in <JWSDP_HOME>/xmldsig/samples/validate, which I have in my JWSDP. (The page that refers to this example is http://java.sun.com/webservices/docs/1.5/tutorial/doc/XMLDigitalSignatureAPI8.html#wp511406)
    If you're really looking at the tutorial version 1.3 (as the URL looks) that could explain it. So, my hunch is a version mismatch, but I could be way off the mark.
    -Tim

  • Recommended JVM Version for ZfS 6.5 SP1 on NetWare 6 SP5 w/NCS

    Quick question - what is the recommended version of the NetWare JVM to use
    with ZfS 6.5 SP1? I'm running NW6SP5, ZfS65 with SP1 applied, and Tomcat
    3.3. Right now I'm using JVM 1.4.2_6 and just wanted to verify there are no
    known issues with JVM 1.4.2_6 playing well with ZfS 6.5 SP1. Running on on
    a 2 node cluster.I plan to add ZfD 6.5 SP1 to the cluster soon - primarily
    for HA inventory services. Thanks in advance for any input.

    Ron,
    Thanks for the general advice. That's what I thought, but sometimes we
    all need a sanity check. Especially when you see java thread death
    messages when the distributor starts up :-) Not due to the JVM.
    > In General, use the JVM version that shipped at the same time as the
    NetWare
    > Service Pack you're using.
    >
    > For NetWare 6 this still gives you the choice between JVM 1.3.x and
    1.4.x,
    > my preference is the JVM 1.4.2 as it has better performance then the
    1.3.x.
    > The 1.4.2_6 your using is quit stable, no major issues known.
    >
    > Ron
    >
    >
    > <[email protected]> wrote in message
    > news:MaeMe.444$[email protected]..
    > > Quick question - what is the recommended version of the NetWare JVM
    to use
    > > with ZfS 6.5 SP1? I'm running NW6SP5, ZfS65 with SP1 applied, and
    Tomcat
    > > 3.3. Right now I'm using JVM 1.4.2_6 and just wanted to verify there
    are
    > no
    > > known issues with JVM 1.4.2_6 playing well with ZfS 6.5 SP1. Running
    on on
    > > a 2 node cluster.I plan to add ZfD 6.5 SP1 to the cluster soon -
    primarily
    > > for HA inventory services. Thanks in advance for any input.
    >
    >

Maybe you are looking for