Java is a Compiler or Interpreter?

Java is a Compiler or Interpreter?

If you mean the executable called "java" that comes with the jre, it is actually both... it's an interpreter that compiles parts of the code it's interpreting to machine code to make it run faster.

Similar Messages

  • ABAP is a compiler or interpreter ?

    ABAP is a compiler or interpreter ? also how is it ? or why ?

    hi there
    Abap to some extent has both...
    Before an ABAP program is executed, the ABAP compiler must translate it into an intermediate language.
    This form of program i.e. the program in this intermediate form is called an ABAP load.
    Then the ABAP virtual machine comes into the picture. ABAP virtual machine is an interpreter for ABAP loads, that is, it can execute ABAP loads.
    You can somewhat correlate the whole scenario with the process of Java compilation-interpret process.
    for further assistance u can check the link below...
    http://www.thaisapclub.com/forums/showthread.php?t=45
    reward if helpful
    regards
    niharika

  • 'Hello' does not want to compile and interpret

    I recently downloaded the latest JDK Update 12 from the sun website.
    I typed the basic hello program. The problem is in the compiling and interpreting of the program. In the command prompt, I made a new directory(folder) titled javacoding; in which I also saved the source code for the hello world program. After which i switched to it and I set the path of bin containing the compiler and interpreter to this directory. I typed in the following; javac Hello.java.
    I set the path thus: C:\javacoding> set path =%path%;C:\Program Files\Java\jdk1.6.0_11\bin;.;
    However, the program does not compile and the following message is displayed instead:
    'javac' is not recognized as an internal or external command, operable program or batch file.
    Here is a sample of the program I typed
    class Hello
    /*This program displays Hello*/
    public static void main (String args[])
    //This is the main method
    System.out.println("Hello, World!");
    For the record this was done on a Vista system.
    Thank you.

    Melanie_Green wrote:
    Variable ___________ Value
    Path ______________ C:\Program Files\Java\jdk1.6.0_11\bin;
    // Set this for both user and system variable*@Mel:* Ummm. Not to be too rude, but I'm almost certain that's incorrect, or atleast sub-optimal.
    Presuming that the OP (that's you Ikenna) is a system administrator on there own box, then just set the system PATH... all users will pick it up from there... also setting at the user-level just appends a useless duplicate entry to the PATH, slowing down (unsucessful) path-searches... not that you'd notice.
    *@OP:* Show us a dir of your jdk-bin directory... we'll need the exact command and it's output (at least down to javac.exe)... Question is: Is that directory exactly what's in your PATH? so also show us the command and output of echo %PATH% ... just post the whole command session (typos and all) between a pair of {code} tags.
    Cheers. Keith.

  • How to track the information/error of java code while compiling.

    Hi,
    I want all the information or errors of java code during compilation.
    So that I can use this information or I can show these errors with different style.
    How to get the java syntax errors?

    Hi,
    I want all the information or errors of java code
    during compilation.
    So that I can use this information or I can show these
    errors with different style.
    How to get the java syntax errors?Redirect the STDOUT/STDERR from the the JAVA/JAVAC command to a file is one way...
    For instance at the commmand line:
    javac myClass.java > STDOUT.txt 2> STDERR.txt (Works for Unix variants or Windows OS's)
    Then you can do what ever you want with the data contained in the files.
    Hope this helps

  • Java(FX) Property Compiler

    Hi!
    We implemented a small Java(FX) Property Compiler which enables you to use a powerful PropertyHint-annotation. The "compiler" is implemented as an Post-"Java Compiler"-Bytecode-Modification-Tool (using asm-4).
    Here are 3 small example so you can get the idea.
    First Example
    public class Case1 {
        @PropertyHint public String one;
        public enum Two { Zero, One, Two }
        @PropertyHint public Two two;
    }If you compile this class with Java Compiler and the Property Compiler you get the following byte-code-equivalent (I used Java Decompiler to reflect the code):
    public class Case1
      public String one;
      public Two two;
      private SimpleObjectProperty<Two> _twoField;
      private SimpleStringProperty _oneField;
      @Property(writeable=true, name="two", dataSignature="Lde/chimos/property/test1/Case1$Two;", dataSignatureGeneric="", humanReadableName="")
      public final ObjectProperty<Two> twoProperty()
        if (this._twoField == null)
          this._twoField = new SimpleObjectProperty(this, "two");
        return (ObjectProperty)this._twoField;
      private final Two _getTwo()
        return (Two)twoProperty().getValue();
      @XmlElement
      public Two getTwo()
        return _getTwo();
      private final void _setTwo(Two value)
        twoProperty().setValue(value);
      public void setTwo(Two value)
        _setTwo(value);
      @Property(writeable=true, name="one", dataSignature="Ljava/lang/String;", dataSignatureGeneric="", humanReadableName="")
      public final StringProperty oneProperty()
        if (this._oneField == null)
          this._oneField = new SimpleStringProperty(this, "one");
        return (StringProperty)this._oneField;
      private final String _getOne()
        return (String)oneProperty().getValue();
      @XmlElement
      public String getOne()
        return _getOne();
      private final void _setOne(String value)
        oneProperty().setValue(value);
      public void setOne(String value)
        _setOne(value);
      public static enum Two
        Zero, One, Two;
    }The fields "public String one" and "public Two two" are still in there to keep the Java Compiler (representing the first pass of the compiling process) working. It is possible to configure the Property Compiler via a setting called "dummyFields".
    All references to these fields (dummy fields) are replaced by getter and setter calls. As you can see in the next example.
    Second Example
    This is what you type and compile:
    public class Main {
         * @param args the command line arguments
        public static void main(String[] args)
            Case1 case1 = new Case1();
            case1.one = "Test";
            case1.two = Case1.Two.Two;
            System.out.println("case1.one = "+case1.one);
            System.out.println("case1.two = "+case1.two);
            Case3 case3 = new Case3();
            System.out.println("case3.one = "+case3.one);
            case3.update();
            System.out.println("case3.one = "+case3.one);
            Case4 case4 = new Case4();
            case4.one = Case4.One.Two;
            System.out.println("case4.one = "+case4.one);
            case4.one = Case4.One.Zero;
            System.out.println("case4.one = "+case4.one);
            Case5 case5 = new Case5();
            case5.one = Case5.One.Two;
            System.out.println("case5.one = "+case5.one);
    }This is what you really get (reflected via Java Decompiler):
    public class Main
      public static void main(String[] args)
        Case1 case1 = new Case1();
        case1.setOne("Test");
        case1.setTwo(Case1.Two.Two);
        System.out.println("case1.one = " + case1.getOne());
        System.out.println("case1.two = " + case1.getTwo());
        Case3 case3 = new Case3();
        System.out.println("case3.one = " + case3.getOne());
        case3.update();
        System.out.println("case3.one = " + case3.getOne());
        Case4 case4 = new Case4();
        case4.setOne(Case4.One.Two);
        System.out.println("case4.one = " + case4.getOne());
        case4.setOne(Case4.One.Zero);
        System.out.println("case4.one = " + case4.getOne());
        Case5 case5 = new Case5();
        case5.setOne(Case5.One.Two);
        System.out.println("case5.one = " + case5.getOne());
    }Amazing, right?
    Third Example
    In case you provide a getter or setter it is used automatically:
    public class Case5 {
        public enum One { Zero, One, Two }
        @PropertyHint public One one;
        public One getOne()
            System.out.println("Case5.getOne()");
            if(one == One.Two)
                return One.Zero;
            return one;
    }This is what you get (reflected via Java Decompiler):
    public class Case5
      public One one;
      private SimpleObjectProperty<One> _oneField;
      public One getOne()
        System.out.println("Case5.getOne()");
        if (_getOne() == One.Two)
          return One.Zero;
        return _getOne();
      @Property(writeable=true, name="one", dataSignature="Lde/chimos/property/test1/Case5$One;", dataSignatureGeneric="", humanReadableName="")
      public final ObjectProperty<One> oneProperty()
        if (this._oneField == null)
          this._oneField = new SimpleObjectProperty(this, "one");
        return (ObjectProperty)this._oneField;
      private final One _getOne()
        return (One)oneProperty().getValue();
      private final void _setOne(One value)
        oneProperty().setValue(value);
      public void setOne(One value)
        _setOne(value);
      public static enum One
        Zero, One, Two;
    Sourcecode and documentation
    We published the code as LGPL. The project an more examples are available on http://code.google.com/p/java-property-compiler/source/browse/
    The first draft of documentation is still work in progress (Gerrit is currently working on the documentation).
    IDE integration
    The Eclipse-integration is done via an ant-builder. It works but is not perfect. Apart from the fact that the configuration requires some mouse clicks, you have to manually activate the "auto,clean" trigger. We would like to implement a real builder-plugin. Can anyone help us?
    We tried a Netbeans-integration via "-post-compile", etc.. But that does not work properly. If you try to debug a project which uses the Property Compiler, the post-compiled byte-code is simply ignored and you run the unprocessed bytecode. Any idea?
    JavaFX-Tree Chart
    There is another project called "javafx-treechart": http://code.google.com/p/javafx-treechart/wiki/TreeChart
    Gerrit will write about it as soon as the documentation is online.
    Regards, Niklas
    Edited by: Niklas on 28.11.2011 16:23

    Hi all!
    Thank you for your responses and comments!
    Sorry for the late response. I am in Australia on vacation at the moment (just visited Brisbane and Whitsundays - and I am going to visit Sydney tomorrow :-).
    @zonski:
    Lombok is really a masterpiece. I had a look at the code. They use AST and (if I'm not mistaken) byte code manipulation too. I think we can learn a lot from Lombok.
    The IDE integration of Lombok is kind of black magic - my personal point of view. I simply don't like those Eclipse API interceptions which are implemented in the Eclipse agent. I rather stick to standard interfaces - like a custom Eclipse-Builder, etc... (I still don't know the Netbeans-way, but I am going to figure that out).
    This is one of the reasons why I decided to use the (awesome) Lombok source code as inspiration, but not to use my resources at hand to extend Lombok itself.
    Further reasons:
    a) We developed a different annotation philosophy (not implemented yet but we are going too).
    b) I developed a small "deterministic destructor" mechanism based on byte-code manipulation and some (important) variable assignment restrictions - to keep performance up and avoid side effects. We want to provide an annotation for this mechanism.
    We probably stick to byte code-manipulation. Not sure if we use AST (makes IDE integration very hard - see Jonathan Giles' comment).
    @bouye:
    I understand the concerns regarding "manual code tweaking", but I really hate the property boilerplate code - it results in unreadable source code. Our implementation still allows custom implementations of getter and setter in case you want to tweak your code. We extended our concept to allow even more flexibility (not implemented yet).
    @Richard Bair:
    I agree, developers might be confused if the know plain java and have no idea about the magic going on. But this is a matter of documentation and communication. If you know the concepts and the tools the code is easier to read.
    I agree with you that Java really needs native property support. The annotation solutions are just placeholder solutions.
    @Jonathan Giles:
    IDE support is definitely an issue. That’s the reason why I want to stick to byte code manipulation. You can integrate the required build steps in Eclipse easily (still not sure about Netbeans). Using AST requires a lot of black magic as you can see in the Lombok source code.
    Actually I had absolutely no debugging issues with our approach if we talk about Eclipse. If there is a way to hook into the Netbeans build process properly it shouldn't be a problem either. Of course the injected code needs to be crafted and tested carefully (no surprises policy).
    The next version of our post-compiler will be splitted in two parts. The first part can be used within the regular build process and does a lot of modification (probably based on the ASM tree API). The second part gets called from a class loader and performs some final tweaks, e.g. dropping unnecessary fields (based on the fast ASM core API). In case the loaded class file did not pass the first part (detected while loading), it is entirely processed within the loading sequence. This should avoid surprises. The post-compiler can be restricted to specific namespaces.
    Our current big commercial project is going to depend heavily on the post-compiler. We decided to provide the post-compiler as open source as we want to contribute to the Java community.
    I'll keep you posted!
    Niklas

  • Getting java code to compile on unix/linux

    I have been using borland JBuilder to run and compile my java code. Recently i tried moving the code to a linux machine in which i have downloaded the JDK to. My classes only use standard java classes with the exception of a jbcl.jar file which has a class that one of my classes relies on. It turns out when i try to run my class i get error messages because it cant find the jar file. Where should I put this jar file? by the way in my class i use the statement: where jbcl.layout is the class i need.
    import jbcl.layout.*;

    another question. In my class I use the statement
    import jbcl.layout.*;
    so all i need to do is add the jbcl.jar to my class
    path? is my import statement correctIf it compiles in your IDE, then it's correct. You shouldn't have to change anything at all in your source code to use a different compiler or to compile on a different platform. You just have set up the proper environment and parameters--tell it which .java files to compile, which jars or directories to search for classes in (classpath), etc. For IDEs you do that with the Preferences or Options menu item. For command line compilation you do this with command line arguments, config files (a la build.xml for ant), or environment variables (although relying on the CLASSPATH env var is generally a bad idea).

  • Java.io.IOException: Compiler failed executable.exec

    I m trying to deploy a EAR file which has a single EJB.
    It deploys fine but when i try to start it it throws the exception trac
    ebelow.
    Any ideas on how to solve ? I ve put Jrockit javac in path, set BEA_HOME
    and tried a few other things with no luck.
    Any ideas ?
    /s
    Unable to deploy EJB: hello_ejb_wls9.jar from hello_ejb_wls9.jar:
    There are 1 nested errors:
    java.io.IOException: Compiler failed executable.exec
    at
    weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvo
    ker.java:435)
    at
    weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:
    295)
    at
    weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:
    303)
    at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:284)
    at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:470)
    at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:439)
    at
    weblogic.ejb20.deployer.EJBDeployer.runEJBC(EJBDeployer.java:436)
    The server compiler and ejb compiler are set as javac in the options.

    Hi,
    I think you are not creating that ear correctly.
    Could you check the following points ?
    1. make sure all the files you need are there
    2. make sure folder hierararchy is ok
    If that's cool: And its still doesnt work:
    Export your example ear from weblogic and use that one
    Regards
    Anilkumar kari

  • Java 2 SDK compilator for beginners

    Hi to all here.
    I am really sorry to disturb you all,
    I am beginner in Java and I need to download Java 2 SDK compilator in order to compile my homeworks. I went lost in all the reliese EE, SE and so on I saw in Sun homepage.
    Which one is the right one ?
    I have Windows Vista Home edition in my computer.
    Thanks for helping me.
    Flavio

    Download and install a Java SE 6 JDK for your Windows platform which is available here:
    http://java.sun.com/javase/downloads/index.jsp
    If you want some GUI Application you may choose the version containing NetBeans, if you only want the compiler and runtime environment install the first option (JDK 6 Update 4).
    Edited by: mezler on Feb 20, 2008 2:13 PM

  • Simple Java created with compilation errors.

    Hi,
    While I am using Oracle for many years (currently 9.2.0.6.0) I am completely new to Java in the database.
    I found a very simple example to get started (please see SQL*Plus dump below) ... but I get a compilation error. Can anyone tell what I am doing wrong?
    SQL> CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED Fibonacci AS
    2 public class Fibonacci
    3 {
    4 public static int fib (int n)
    5 {
    6 if (n == 1 || n == 2)
    7 return 1;
    8 else
    9 return fib(n - 1) + fib(n - 2);
    10 }
    11 }
    12 /
    Warning: Java created with compilation errors.
    SQL> show errors java source Fibonacci
    No errors.
    SQL>
    (It must be a simple thing, the example I found seems correct, but what about grants, settings etc.)
    Thanks in advance,
    Stefan

    Stefan,
    I cannot see anything in your code that would cause a compilation error. However, according to the example in the "Oracle 9i SQL Reference", it looks like you need to enclose the name in double quotes, as in:
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "Fibonacci" AS ...Alternatively (and this is the way I do it), you could compile the class outside of the database, and load the compiled class file. Just create a file called "Fibonacci.java" (that contains your java code), compile it, and then use the "loadjava" tool to load the "Fibonacci.class" file into the database. Please refer to the Oracle 9i Java Developer's Guide for more details.
    Good Luck,
    Avi.

  • Is pl/sql programming language compiler or interpreter language?

    Hello guys,
    Is pl/sql programming language compiler or interpreter language?
    Thanks
    Edited by: Polat on 14.Mar.2012 09:09

    >
    Is pl/sql programming language compiler or interpreter language?
    >
    Both -
    See Compiling PL/SQL Units for Native Execution in the PL/SQL Language Doc
    http://docs.oracle.com/cd/E18283_01/appdev.112/e17126/tuning.htm#sthref1023
    >
    You can usually speed up PL/SQL units by compiling them into native code (processor-dependent system code), which is stored in the SYSTEM tablespace.
    You can natively compile any PL/SQL unit of any type, including those that Oracle Database supplies.
    Natively compiled program units work in all server environments, including shared server configuration (formerly called "multithreaded server") and Oracle Real Application Clusters (Oracle RAC).
    >
    And this from the section How PL/SQL Native Compilation Works
    >
    How PL/SQL Native Compilation Works
    Without native compilation, the PL/SQL statements in a PL/SQL unit are compiled into an intermediate form, system code, which is stored in the catalog and interpreted at run time.
    With PL/SQL native compilation, the PL/SQL statements in a PL/SQL unit are compiled into native code and stored in the catalog. The native code need not be interpreted at run time, so it runs faster.
    Because native compilation applies only to PL/SQL statements, a PL/SQL unit that uses only SQL statements might not run faster when natively compiled, but it does run at least as fast as the corresponding interpreted code. The compiled code and the interpreted code make the same library calls, so their action is the same.

  • Getting one java program to compile another

    Was wondering if anyone knew if it is possible ot get one java program to compile another .java file and capture any errors.

    public static void RunCommand( String theCommand ) throws Exception
    Runtime runtime = Runtime.getRuntime();
    System.out.println( "Running Command " + theCommand ) ;
    Process process = runtime.exec(theCommand);
    String s = null ;
    BufferedReader stdInput = new BufferedReader(new InputStreamReader(process.getInputStream()));
    BufferedReader stdError = new BufferedReader(new InputStreamReader(process.getErrorStream()));
    // read the output from the command
    System.out.println("Here is the standard output of the command:\n");
    while ((s = stdInput.readLine()) != null) {
         System.out.println(s);
    // read any errors from the attempted command
    System.out.println("Here is the standard error of the command (if any):\n");
    while ((s = stdError.readLine()) != null) {
         System.out.println(s);

  • Support of Query newQuery(java.lang.Object compiled)

    The implementation of the Query newQuery(java.lang.Object compiled)
    method doesn't copy the Class of the candidate instances but it should
    ad the documentation says :
    "All of the settings of the other Query are copied to this Query, except
    for the candidate Collection or Extent."
    Thanks.

    You can't query on a blob column.

  • Compilation and Interpretation

    class test {
    public static void main() {
    if i am running this program ...it compiles but it doesnt run...
    why it didnt give me a compilation error..
    Could someone tell me what is done during compilation and interpretation..
    Thanks,

    I purposely missed String args[] in the main...
    wat my question is
    why the compiler didnt check the main method signature...its done only when i run...

  • Evaluator.java won't compile due to issues with javax.tools.*

    * Evaluator.java
    * Created on January 23, 2007, 4:17 PM
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package ObjectTools;
    import java.io.*;
    import java.net.*;
    import javax.tools.*;
    import java.lang.reflect.*;
    * Utilizes {@link java.lang.reflect} package
    * @author ppowell-c
    public abstract class Evaluator {
        public static boolean writeSource(final String sourcePath, final String sourceCode)
        throws FileNotFoundException {
            PrintWriter writer = new PrintWriter(sourcePath);
            writer.println(sourceCode);
            writer.close();
            return true;
        public static boolean compile(final String sourcePath) throws IOException {
            final JavaCompilerTool compiler = ToolProvider.defaultJavaCompiler();
            final JavaFileManager manager = compiler.getStandardFileManager();
            final JavaFileObject source =
                    manager.getFileForInput(sourcePath); /* java.io.IOException */
            final JavaCompilerTool.CompilationTask task = compiler.run(null, source);
            return task.getResult();
        public static final java.lang.Class loadExpression(final String path, final String className)
        throws MalformedURLException,
                ClassNotFoundException { /* java.net.MalformedURLException */
            final URLClassLoader myLoader = new URLClassLoader(new java.net.URL[] {
                new File(path).toURI().toURL()
            /* java.lang.ClassNotFoundException */
            return Class.forName(className, true, myLoader);
        public static java.lang.Object evalExpression(final Class test)
        throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
            final Class[] parameterType = null;
            /* java.lang.NoSuchMethodException */
            final Method method = test.getMethod("expression", parameterType);
            final Object[] argument = null;
            Object instance = null;
            /* java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException */
            return method.invoke(instance, argument);
        public static Object eval(final String expression)
        throws FileNotFoundException, IOException, MalformedURLException,
                ClassNotFoundException, NoSuchMethodException, IllegalAccessException,
                InvocationTargetException {
            final Object result;
            final String path = "c:/";
            final String className = "ExpressionWrapper";
            final String sourcePath = path + className + ".java";
            writeSource(/* to */ sourcePath,
                    "public class " + className + "\n" +
                    "{ public static java.lang.Object expression()\n" +
                    "  { return " + expression + "; }}\n" );
            if(compile(sourcePath)) {
                final Class class_ =
                        loadExpression(/* from */ path, className);
                result = evalExpression(class_);
            } else {
                result = null;
            return result;
    }Produces compiler errors on javax.tools.ToolProvider along with nearly everything else in javax.tools to boot.
    I'm using J2SE 1.5.0 with NetBeans 5.5 so they all should be there. I'm following the example at http://userpage.fu-berlin.de/~ram/pub/pub_jf47ht9Ht/evaluating-expressions-with-java since all I want to do is come up with a Java equivalent of "eval()", which I use in PHP whenever I need it.
    Help appreciated, I'm lost here.
    Thanx
    Phil

    How do you do the Java equivalent of eval()?The language provides no support for that.
    Reflection lets you call any method, where you
    specify that method's name as a string and go through
    a few other steps to build the proper Method object
    with the proper args.
    (http://java.sun.com/docs/books/tutorial/reflect/) It
    won't let you just evaluate Java source code as a
    script interpreter though. To do that, see
    www.beanshell.org. Jython and I think Ruby on Rails
    also give you scriptingin Java. Jython uses Python's
    syntax, but gives you access to your Java classes. I
    don't know ayhthing about RoR.I am going to look up PHP/Java myself as I know no Python right offhand (but probably could learn it in about 10,000 years). Tried to figure out reflection but couldn't figure out how to do what in PHP we do like this:
    $msg = eval('JButton ' . $nameArray[$i][0] . ' = new JButton("' . $nameArray[$i][1] . '");');

  • Urgent,java Error when compiling class file for jsp

    Hi!
    Reference to statement is ambbiguous,both class java.sql.statement in java.sql and class.java.beans.statement in java beans match.
    this is my file . When i comment the java.import.bean headre it does compile but my server is not able to recognize the class file.,Cud someone help me.
    THis is my source file
    package dbmg;
    //import java.beans.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class DbBean
    Connection con;
    ResultSet rs;
    String sql;
    boolean queryType;
    int edited;
    public DbBean() throws Exception
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con = DriverManager.getConnection("jdbc:odbc:Forums");
    public void setQueryType(String s)
    queryType=s.equalsIgnoreCase("select");
    public void setSql(String s)
    sql = s;
    synchronized public void processRequest(HttpServletRequest req) throws
    Exception
    if (queryType)
    Statement stmt=con.createStatement();
    rs=stmt.executeQuery(sql);
    else
    PreparedStatement ps=null;
    ps=con.prepareStatement(sql);
    int count=0;
    String sqlParam,paramValue;
    boolean set=true;
    while (set)
    count++;
    sqlParam="param"+String.valueOf(count);
         if (sqlParam==null)
              set=false;
              continue;
    paramValue=req.getParameter(sqlParam);
         if (paramValue==null)
    set=false;
    continue;
              else
                   paramValue=paramValue.trim();
    try
                   ps.setString(count,paramValue);
              catch(Exception ex)
                   set=false;
                   continue;
    try
    edited=ps.executeUpdate();
    catch(SQLException e)
    edited=0;
    public Connection getConnection()
    return con;
    public ResultSet getResultSet()
    return rs;
    public int stored()
    return edited;
    public void closeCon() throws Exception
    con.close();
    rs = null;

    No need of commenting your import statement. Whenever there is ambiguity, you can use full class name (with package).
    Like,
    java.sql.Statement stmt=con.createStatement();
    Now there is no ambiguity.
    Sudha

Maybe you are looking for

  • Safari doesn't open

    It says it quit unexpectedly last time. It presents options ignore, report an re-open. But except ignore nothing works. Here is a report. Process:               Safari [671] Path:                  /Applications/Safari.app/Contents/MacOS/Safari Identi

  • Report Background Engine  Crashes

    I have a problem with Report Background Engine. When I try running a report through forms, the Report Background Engine and the Forms Runtime hangs. And If I End Task the Forms Runtime, the forms runtime closes and the background engine shows the rep

  • Problem with printing photos

    What do you do when you print a photo and it comes out with black lines all across it ?

  • Gmail not working right since Mavericks install, even after 10.9.1 upgrade

    I use Apple mail. Comcast, which is POP, is my internet provider. In order to use IMAP capability I forward my email to my Gmail acct. All worked flawlessly until Mavericks came along. Even after the 10.9.1 upgrade Here are my issues: (1) draft email

  • Process to automatically upload Denial List file from service provider in GTS server.

    Hi Experts, At present we manually perform the uploading of denial list file provided by service provider manually. We first download it ,then upload it through menupath SAP Compliance Management-->SPL Screening--> Master Data-->Load Sanct. Party Lis