Deprecated API, pls help

ARRRRGH! pls Help!
import java.applet.*;
import java.awt.*;
public class Project extends Applet {
private int last_x, last_y;
public boolean mouseDown(Event e, int x, int y)
last_x = x; last_y = y;
return true;
public boolean mouseDrag(Event e, int x, int y)
g.drawLine(last_x, last_y, x, y);
last_x = x;
last_y = y;
return true;
I get a error on compile time where a arrow points at the g in the
g.drawLine method, and it says "Project.java uses or overrides a depricated api"
If you can, copy and paste the code and fix what you can, what I want to do is make lines useing the mouse

implement the MouseListener and MouseMotionListener:
public class Project extends Applet
                     implements MouseListener, MouseMotionListenerwhen you implement an interface though, you need to define each of the functions in that interface. Even if you aren't particularly interested in some of the methods, you must atleast leave them blank (unless you use an adapter):
MouseListener methods:
void mouseClicked(MouseEvent e)
Invoked when the mouse button has been clicked (pressed and released) on a component.
void mouseEntered(MouseEvent e)
Invoked when the mouse enters a component.
void mouseExited(MouseEvent e)
Invoked when the mouse exits a component.
void mousePressed(MouseEvent e)
Invoked when a mouse button has been pressed on a component.
void mouseReleased(MouseEvent e)
Invoked when a mouse button has been released on a component.
MouseMotionListener methods:
void mouseDragged(MouseEvent e)
Invoked when a mouse button is pressed on a component and then dragged.
void mouseMoved(MouseEvent e)
Invoked when the mouse button has been moved on a component (with no buttons down).

Similar Messages

  • What is wrong with this api Pls help

    I am creating api to migrate jobs from an extenal table to hr but when executing the script it only inserts the first record and gives this message
    "-20001 ORA-20001: The job you have entered already exists in this Business Group. Please enter a unique name for your job."
    as I mentioned the job which he means already created is the first row of the table
    here is the code
    DECLARE
    l_count Number :=0;
    v_business_group_id Number :=101;
    v_date_from date := TO_DATE('01-01-1900','DD-MM-YYYY');
    v_job_group_id number := 21;
    v_object_version_number number :=1;
    v_segment1 varchar2(10);
    v_segment2 varchar2(150);
    v_attribute2 varchar2(150);
    v_attribute3 varchar2(100);
    v_attribute4 varchar2(50);
    v_attribute5 varchar2(50);
    v_attribute6 varchar2(50);
    cursor job is select DESGN_CODE,
         DESGN_DESP_M_A,
         DESGN_DESP_F_A,
         DESGN_DESP_E ,
         DESGN_TYPE ,
         DESGN_CAT_CODE,
         GRP_CODE
    from aa_tdesignation
    Where rownum < 10
    and desgn_desp_e is not null;
    v_segment5 varchar2(100) := NULL;
    v_segment6 varchar2(100) := NULL;
    v_job_id number;
    v_job_definition_id number;
    v_name varchar2(100);
    begin
    dbms_output.put_line('##########################################################');
    dbms_output.put_line('Data Migration Of Jobs:');
    dbms_output.put_line('##########################################################');
    dbms_output.put_line('Start Time : ' || TO_CHAR(SYSDATE,'DD-MON-YYYY HH24:MI:SS'));
    for my_cur in job
    LOOP
    BEGIN
    v_segment1 := my_cur.DESGN_CODE;
    v_segment2 := my_cur.DESGN_DESP_M_A;
    v_attribute2 := my_cur.DESGN_DESP_F_A;
    v_attribute3 := my_cur.DESGN_DESP_E;
    v_attribute4 := my_cur.DESGN_TYPE;
    v_attribute5 := my_cur.DESGN_CAT_CODE;
    v_attribute6 := my_cur.GRP_CODE;
    HR_JOB_API.CREATE_JOB
    (p_business_group_id => v_business_group_id
    ,p_date_from => v_date_from
    ,p_job_group_id => v_job_group_id
    ,p_object_version_number => v_object_version_number
    ,p_segment1 => v_segment1
    ,p_segment2 => v_segment2
    ,p_segment5 => v_segment5
    ,p_segment6 => v_segment6
    ,p_attribute2 => v_attribute2
    ,p_attribute3 => v_attribute3
    ,p_attribute4 => v_attribute4
    ,p_attribute5 => v_attribute5
    ,p_attribute6 => v_attribute6
    ,p_job_id => v_job_id
    ,p_job_definition_id => v_job_definition_id
    ,p_name => v_name);
    Dbms_output.put_line('Sucess'||' '||my_cur.DESGN_CODE||' '||my_cur.DESGN_DESP_M_A);
    L_COUNT:=L_COUNT+1;
    END;
    END LOOP;
    DBMS_OUTPUT.PUT_LINE ('Total Nubmer of record'||L_COUNT);
    Exception
    When others then
    dbms_output.put_line(sqlcode||' '||sqlerrm);
    DBMS_OUTPUT.PUT_LINE ('Total Nubmer of record'||L_COUNT);
    end;
    Thanks

    You've got to remove either the semicolon or the slash at the end of the script as both will execute it, so the second time with the same info it fails.

  • Need help with java uses or overrides a deprecated API.

    i have some issues and have not clue where the issue is this is the error that i receive
    Note: C:\Documents and Settings\Adam\My Documents\JCreator LE\MyProjects\Pokemon\src\Pokemon.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    here is my code

    public void boundry()
                   int i;
                   //System.out.println("y is "+  (y+23) );
                   //System.out.println("x is "+ (x+17) );
                   //X10=wall[1].getX();
                   //System.out.println("wall[1]X is" + X10);
                   //check to see if over boundary
                   rightflag=2;
                   leftflag=2;
                   downflag=2;
                   upflag=2;
              for(i=0; i<=8; i++)
                   System.out.println("i is" +i);
                    //left side
                    if ( ( (x+17) > (wall.getX() ) )
                   && ( (y) < (wall[i].getY() + wall[i].getHeight()-5) )
                   && ( (y+23) > (wall[i].getY()+5 ))
                   && ( (x) < (wall[i].getX() + (wall[i].getWidth()/2) )) )
                        rightflag=1;
                        System.out.println("left");
                   else
                        rightflag=2;
                   //right side
                   if ( ( (x) < ((wall[i].getX() + wall[i].getWidth() )))
                   && ( (y) < wall[i].getY() + wall[i].getHeight()-5 )
                   && (y > (wall[i].getY() ))
                   && ( (x) > ((wall[i].getX()+(wall[i].getWidth()/2))) ) )
                        leftflag=1;
                        System.out.println("right");
                   else
                        leftflag=2;
                   //top side
                   if ( ( (y+23) > wall[i].getY() )
                   && ( (y+23) < ( wall[i].getY() + (wall[i].getHeight()/2-5) ))
                   && ( (x+17) > wall[i].getX())
                   && ( (x) < (wall[i].getX()+(wall[i].getWidth() ))) )
                   upflag=1;
                        System.out.println("top");
                   else
                        upflag=2;
                   //bottom boundry
                   if(
                   (y < (wall[i].getY()+wall[i].getHeight() ))
                   && (y > (wall[i].getY() ))
                   && ((x+17) > (wall[i].getX()))
                   && (x < (wall[i].getX()+wall[i].getWidth() ) ))
                        downflag=1;
                        System.out.println("bottom");
                   else
                        downflag=2;
                   System.out.println("test");
                   //stop them from being over boundary
                   if (rightflag==1)
                   x=x-10;
                   else if (leftflag==1)
                   x=x+10;
                   else if (upflag==1)
                   y=y-10;
                   else if (downflag==1)
                   y=y+10;
                   //draw the player
              public boolean handleEvent (Event e)
                   //Get the scroll bars to work
                   Y2 = indicatestrength.getValue();
                   Y3 = X2.getValue();
                   Y4 = Width2.getValue();
                   Y5 = height2.getValue();
                   repaint();
                   return true;
              public void save ()     
                   File dataFile = new File ("Users/jeffrey/Server/Test.rtf");
                   FileWriter out;
                   BufferedWriter writeFile;
                   //sample data to write
                   double testnumber = -34.454;
                   String testname="this is a string";
              try{
                   out =new FileWriter (dataFile);
                   writeFile = new BufferedWriter(out);
                   //write all data as strings
                   writeFile.write(testname);
                   writeFile.newLine();
                   writeFile.write(String.valueOf(testnumber));
                   writeFile.newLine();
                   //Close file
                   writeFile.close();
                   out.close();
                   System.out.println ("data written to file");
                   catch (IOException e)
                        System.out.println("there was a error writing to the file");

  • Deprecated API and RFC connection issues in PI 7.1

    Hi all,
    I am new to this Forum..
    I am working in File to Proxy scenario where i am using UDF to implemnt few functions.
    But i am getting the following Error :
    Source text of object Message Mapping: MM_FILE_10_943 | urn://fiat.com/mm/if_10_943 has syntax errors:
    Function sendMonitor, Line 14:
    cannot find symbol symbol  : class CallRFCManager location: class com.sap.xi.tf._MM_FILE_10_943_    CallRFCManager rfc=new CallRFCManager();    ^
    Function sendMonitor, Line 14:
    cannot find symbol symbol  : class CallRFCManager location: class com.sap.xi.tf._MM_FILE_10_943_    CallRFCManager rfc=new CallRFCManager();                           ^
    Function sendMonitor, Line 17:
    cannot find symbol symbol  : variable Constants location: class com.sap.xi.tf._MM_FILE_10_943_         if(rfc.connect(Constants.XISYSTEM)){                             ^ Note: /disk2/sap/TX0/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map9c6141de40a611e0ad290000003d38da/source/com/sap/xi/tf/_MM_FILE_10_943_.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: /disk2/sap/TX0/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map9c6141de40a611e0ad290000003d38da/source/com/sap/xi/tf/_MM_FILE_10_943_.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 3 errors
    The code i am using is:
       //write your code here
       // INPUT: activate ; id; descrizione
       AbstractTrace trace;
       String messID;
       java.util.Map map;
       trace = container.getTrace();
       map = container.getTransformationParameters();
       messID = (String) map.get(StreamTransformationConstants.MESSAGE_ID);
       CallRFCManager rfc=new CallRFCManager();
       if (a.equals("true")){
            if(rfc.connect(Constants.XISYSTEM)){     
                  try{
                        rfc.traceMonitor(messID,b,c);
                        trace.addInfo("Ok trace monitor");
                        rfc.disconnect();
                  } catch (Exception ex) {
                        trace.addInfo("Errore in sendMonitor CAUSA:" + ex.getMessage());
                        rfc.disconnect();
            }else{
                      trace.addInfo("Errore in sendMonitor CAUSA: errore sulla connessione ad XI"); 
       return a;
    Pleasae help me ....what is the reason for this ???

    Hi ,
    the package com.fiat.sapiens.udf.* is saved in the IA_JAVA.zip file.
    I imported it in the imported archive and added this jar in the import tab of function library
    i also added ti in the archive used tab in function.
    But still it is showing this Error.
    under IA_JAVA.zip  i have  testJCO.java which has the folowing code:
    package com.fiat.sapiens.xi.udf;
    // Referenced classes of package com.fiat.sapiens.xi.udf:
    //            CallRFCManager
    public class TestJCO
        public TestJCO()
        public static void main(String args[])
            System.setProperty("SAPSYSTEMNAME", "DX0");
            CallRFCManager rfc = new CallRFCManager();
            rfc.connect("XI");
            try
                rfc.schedNR("10", "20", "30", "40", "50", "60");
            catch(Exception e1)
                e1.printStackTrace();
            if(rfc.connect())
                rfc.connect();
                try
                    String a = rfc.checkRARCRE("ZZ");
                    System.out.println(a);
                catch(Exception e)
                    e.printStackTrace();
            System.out.println("");

  • Problem in creating ear file using weblogic 10....Pls help

    Hi,
    part of build.batwhere error occure::
    @echo off
    echo.
    echo -------------Hub 2.0 Core Build System-------------
    echo.
    echo.
    @set JAVA_HOME=C:\Program Files\Java\jdk1.5.0_13
    set JAVA_HOME=C:\Program Files\Java\jdk1.5.0_13
    set PATH=C:\Program Files\Java\jdk1.5.0_13\bin;%PATH%
    if "%JAVA_HOME%"=="" goto no_java_home
    if "%ANT_HOME%"=="" goto no_ant_home
    :anthomeset
    echo Using Ant at %ANT_HOME%
    goto dobuild
    :no_ant_home
    set ANT_HOME=C:\ant1.6.1
    set ANT_OPTS=-Xms1024m -Xmx2048m
    set CLEAR_ANT_HOME=yes
    echo ANT_HOME was not set - setting to %ANT_HOME% for current build
    goto dobuild
    :dobuild
    set BUILD_CLASSPATH=D:\Projects\Quadriga\Hub20\HUB\buildscripts\core\build\classes;D:\Projects\Quadriga\Hub20\HUB\buildscripts\estate\build\classes;D:\Projects\Quadriga\Hub20\HUB\buildscripts\application\build\classes;D:\Projects\Quadriga\Hub20\HUB\buildscripts\application\dist;
    set CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar;C:\bea\wlserver_10.0\server\lib\**/*.jar;D:\projects\Quadriga\Hub20\HUB\lib\bea.weblogic\**/*.jar;
    echo.
    echo CLASSPATH=%CLASSPATH%
    call %ANT_HOME%\bin\ant.bat -debug -buildfile buildscripts\application\build.xml %1
    if "%CLEAR_ANT_HOME%"=="yes" goto clear_ant
    goto end
    :no_java_home
    echo Please set the environment variable JAVA_HOME on your box.
    goto end
    :clear_ant
    set ANT_HOME=
    goto end
    :end
    set CLEAR_ANT_HOME=
    the error in console is:
    The ' characters around the executable and arguments are
    not part of the command.
    [java] Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/
    utils/compiler/Tool
    [java] at java.lang.ClassLoader.defineClass1(Native Method)
    [java] at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    [java] at java.security.SecureClassLoader.defineClass(SecureClassLoader
    .java:124)
    [java] at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    [java] at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
    [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    [java] at java.security.AccessController.doPrivileged(Native Method)
    [java] at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    [java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
    [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    [java] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    [java] at weblogic.appc.main(appc.java:14)
    [ant] Exiting D:\projects\Quadriga\Hub20\HUB\buildscripts\core\build.xml.
    BUILD FAILED
    D:\projects\Quadriga\Hub20\HUB\buildscripts\application\build.xml:104: The follo
    wing error occurred while executing this line:
    D:\projects\Quadriga\Hub20\HUB\buildscripts\core\build.xml:447: Java returned: 1
    at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(Projec
    tHelper.java:539)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:384)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    at org.apache.tools.ant.Task.perform(Task.java:364)
    at org.apache.tools.ant.Target.execute(Target.java:341)
    at org.apache.tools.ant.Target.performTasks(Target.java:369)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
    cutor.java:40)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
    at org.apache.tools.ant.Main.runBuild(Main.java:668)
    at org.apache.tools.ant.Main.startAnt(Main.java:187)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
    Caused by: D:\projects\Quadriga\Hub20\HUB\buildscripts\core\build.xml:447: Java
    returned: 1
    at org.apache.tools.ant.taskdefs.Java.execute(Java.java:87)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    at org.apache.tools.ant.Task.perform(Task.java:364)
    at org.apache.tools.ant.Target.execute(Target.java:341)
    at org.apache.tools.ant.Target.performTasks(Target.java:369)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(Single
    CheckExecutor.java:37)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
    ... 12 more
    --- Nested Exception ---
    D:\projects\Quadriga\Hub20\HUB\buildscripts\core\build.xml:447: Java returned: 1
    at org.apache.tools.ant.taskdefs.Java.execute(Java.java:87)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    at org.apache.tools.ant.Task.perform(Task.java:364)
    at org.apache.tools.ant.Target.execute(Target.java:341)
    at org.apache.tools.ant.Target.performTasks(Target.java:369)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(Single
    CheckExecutor.java:37)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    at org.apache.tools.ant.Task.perform(Task.java:364)
    at org.apache.tools.ant.Target.execute(Target.java:341)
    at org.apache.tools.ant.Target.performTasks(Target.java:369)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
    cutor.java:40)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
    at org.apache.tools.ant.Main.runBuild(Main.java:668)
    at org.apache.tools.ant.Main.startAnt(Main.java:187)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
    Total time: 37 seconds
    Pls help me.....
    Thanks,
    Anindya

    hI,
    I ll send the bild.xml file:
    part of build.xml in 1st file:
    <target name="build-core" depends="init" unless="core.nobuild">
    <ant antfile="build.xml" dir="${buildscripts.home}/core" target="build-deployment-units" inheritAll="false"/>
    </target>
    part of build.xml of 2nd file:
    <!-- ================================================================= -->
    <!-- classpath settings -->
    <!-- ================================================================= -->
    <path id="lido.classpath">
    <fileset dir="${lib}/lido">
    <include name="*.jar"/>
    </fileset>
    </path>
    <path id="compile.classpath">
    <pathelement location="${lib}/jakarta.apache/log4j-1.2.9.jar"/>
    <pathelement location="${lib}/jakarta.apache/jakarta-regexp-1.2.jar"/>
    <pathelement location="${lib}/bea.weblogic/webservices.jar"/>
    <pathelement location="${lib}/bea.weblogic/weblogic.jar"/>
    <pathelement location="${lib}/bea.weblogic/wls-api.jar"/>
    <pathelement location="${lib}/bea.weblogic/api.jar"/>
    <pathelement location="${lib}/bea.weblogic/wljmsclient.jar"/>
    <pathelement location="${lib}/bea.weblogic/wljmxclient.jar"/>
    <pathelement location="${lib}/bea.weblogic/wlxbean.jar"/>
    <pathelement location="${lib}/bea.weblogic/wlutil.jar"/>
    <pathelement location="${lib}/bea.weblogic/xquery.jar"/>
    <pathelement location="${lib}/bea.weblogic/xqrl.jar"/>
    <pathelement location="${lib}/bea.weblogic/xmlx.jar"/>
    <pathelement location="${lib}/bea.weblogic/wsse.jar"/>
    <pathelement location="${lib}/bea.weblogic/wseeclient.jar"/>
    <pathelement location="${lib}/bea.weblogic/weblogic-container-binding.jar"/>
    <pathelement location="${lib}/bea.weblogic/classes12.zip"/>
    <pathelement location="${lib}/jdom.org/jdom.jar"/>
    <pathelement location="${lib}/java.sun/jmxtools.jar"/>
    <pathelement location="${lib}/mindterm/mindterm.jar"/>
    <pathelement location="${lib}/java.sun/jsse1.0.3/jcert.jar"/>
    <pathelement location="${lib}/java.sun/jsse1.0.3/jnet.jar"/>
    <pathelement location="${lib}/java.sun/jsse1.0.3/jsse.jar"/>
    <pathelement location="${lib}/mindterm/Qmindterm.jar"/>
    <pathelement location="${lib}/mindterm/java40.jar"/>
    <pathelement location="${lib}/mindterm/jtStubs.jar"/>
    <pathelement location="${lib}/junitee/junit.jar"/>
    <pathelement location="${lib}/junitee/junitee.jar"/>
    <pathelement location="${lib}/enterprisedt/ftp-1.2.2/ftp.jar"/>
              <pathelement location="${lib}/jakarta-commons/commons-collections-3.1.jar"/>
         <pathelement location="${lib}/xml-writer-0.2.jar"/>
         <fileset dir="${lib}/jaxb">
    <include name="*.jar"/>
    </fileset>
    <path refid="lido.classpath"/>
    </path>
    <path id="built.classpath">
    <pathelement location="${classes}"/>
    <path refid="compile.classpath"/>
    </path>
    <path id="jdos.classpath">
    <pathelement location="${classes}"/>
    </path>
    <taskdef classpathref="compile.classpath" name="wlappc" classname="weblogic.ant.taskdefs.j2ee.Appc"/>
    <java classname="weblogic.appc" fork="yes" failonerror="yes">
    <sysproperty key="weblogic.home" value="C:/bea/wlserver_10.0/server"/>
    <arg line="-keepgenerated -compiler javac ${dist}/${wl-entity-jarfile}.jar"/>
    <classpath>
    <path refid="built.classpath"/>
    </classpath>
    </java>
    eroor in console now:
    [java] Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/
    descriptor/BeanUpdateListener
    [java] at java.lang.ClassLoader.defineClass1(Native Method)
    [java] at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    [java] at java.security.SecureClassLoader.defineClass(SecureClassLoader
    .java:124)
    [java] at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    [java] at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
    [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    [java] at java.security.AccessController.doPrivileged(Native Method)
    [java] at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    [java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
    [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    [java] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    [java] at java.lang.Class.forName0(Native Method)
    [java] at java.lang.Class.forName(Class.java:164)
    [java] at weblogic.logging.MessageLogger.<clinit>(MessageLogger.java:45
    [java] at weblogic.logging.WLMessageLogger.log(WLMessageLogger.java:51)
    [java] at weblogic.j2ee.J2EELogger.logAppcFailedWithError(J2EELogger.ja
    va:5257)
    [java] at weblogic.application.compiler.Appc.runBody(Appc.java:174)
    [java] at weblogic.utils.compiler.Tool.run(Tool.java:158)
    [java] at weblogic.utils.compiler.Tool.run(Tool.java:115)
    [java] at weblogic.application.compiler.Appc.main(Appc.java:183)
    [java] at weblogic.appc.main(appc.java:14)
    [ant] Exiting D:\projects\Quadriga\Hub20\HUB\buildscripts\core\build.xml.
    BUILD FAILED
    D:\projects\Quadriga\Hub20\HUB\buildscripts\application\build.xml:103: Following
    error occured while executing this line
    D:\projects\Quadriga\Hub20\HUB\buildscripts\core\build.xml:460: Java returned: 1
    at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(Projec
    tHelper.java:537)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:385)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
    at org.apache.tools.ant.Task.perform(Task.java:364)
    at org.apache.tools.ant.Target.execute(Target.java:301)
    at org.apache.tools.ant.Target.performTasks(Target.java:328)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
    at org.apache.tools.ant.Main.runBuild(Main.java:632)
    at org.apache.tools.ant.Main.startAnt(Main.java:183)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
    Caused by: D:\projects\Quadriga\Hub20\HUB\buildscripts\core\build.xml:460: Java
    returned: 1
    at org.apache.tools.ant.taskdefs.Java.execute(Java.java:80)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
    at org.apache.tools.ant.Task.perform(Task.java:364)
    at org.apache.tools.ant.Target.execute(Target.java:301)
    at org.apache.tools.ant.Target.performTasks(Target.java:328)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
    ... 10 more
    --- Nested Exception ---
    D:\projects\Quadriga\Hub20\HUB\buildscripts\core\build.xml:460: Java returned: 1
    at org.apache.tools.ant.taskdefs.Java.execute(Java.java:80)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
    at org.apache.tools.ant.Task.perform(Task.java:364)
    at org.apache.tools.ant.Target.execute(Target.java:301)
    at org.apache.tools.ant.Target.performTasks(Target.java:328)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
    at org.apache.tools.ant.Task.perform(Task.java:364)
    at org.apache.tools.ant.Target.execute(Target.java:301)
    at org.apache.tools.ant.Target.performTasks(Target.java:328)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
    at org.apache.tools.ant.Main.runBuild(Main.java:632)
    at org.apache.tools.ant.Main.startAnt(Main.java:183)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
    Total time: 14 seconds
    pls reply...

  • Workflow API = Need Help

    Hello All
    We are trying to cusotomize the already shipped fingood order type . we are creating one more order type which should not got down to wms for processing. The already exisisting one is working fine.It is going to the the else part and processing fine.If it is 'Y' it should not go down to wms for processing and complete the workflow. It is not going there at all.we have defined a lookup to fetch the records for processing i.e it should not go down to wms. I am using the org_organization_definitions table to join with the lookup. Could anyone pls help me.This is my first workflow api.
    PROCEDURE GET_DELIVERY_NAME_AS
    ITEMTYPE IN VARCHAR2,
    ITEMKEY IN VARCHAR2,
    ACTID IN NUMBER,
    FUNCMODE IN VARCHAR2,
    RESULTOUT OUT VARCHAR2
    ) IS
    l_shipper_id NUMBER;
    l_delivery_name VARCHAR2(30);
    x_return_status VARCHAR2(10);
    x_error_message VARCHAR2(2000);
    x_header_rec oe_Order_Pub.Header_Rec_Type;
    PW Warehouse Change
    l_lookup_enabled VARCHAR2(1) := 'N';
    l_order_number VARCHAR2(30);
    l_lookup_type gcca.gcca_fnd_lookup_values_all.lookup_type%TYPE;
    --x_line_rec                        oe_Order_Pub.Line_Rec_Type;
    --x_line_tbl                          OE_ORDER_PUB.Line_Tbl_Type;
    l_organization_id org_organization_definitions.organization_id%TYPE;
    l_ship_from_org_id oe_order_lines_all.ship_from_org_id%TYPE;
    BEGIN
    IF funcmode = 'RUN' THEN
    BEGIN
    INSERT INTO gcca_wf_ordtyp_tmp(ENABLED_FLAG)VALUES('1');
    --COMMIT;
    SELECT lookup_type,
         NVL(enabled_flag,'N')
         INTO l_lookup_type,
         l_lookup_enabled
         FROM apps.org_organization_definitions ood,
         gcca.gcca_fnd_lookup_values_all glv
         WHERE glv.lookup_type = 'GCCA_OM_WMS_EXCLUDE'
         AND glv.enabled_flag = 'Y'
         AND ood.organization_code = glv.lookup_code
    AND ood.organization_id = l_ship_from_org_id; --NVL(x_line_rec.ship_from_org_id,l_organization_id);
    EXCEPTION
    WHEN OTHERS THEN
    l_lookup_enabled := 'N';
    END;
    --INSERT INTO gcca_wf_ordtyp_tmp(enabled_flag)VALUES('l_lookup_enabled');
    INSERT INTO gcca_wf_ordtyp_tmp(enabled_flag)VALUES('2');
    --COMMIT;
    --SELECT order_number
    --INTO   l_order_number
    --FROM   apps.oe_order_headers_all
    WHERE header_id = x_header_rec.header_id;   TO_NUMBER(itemkey);
    INSERT INTO gcca_wf_ordtyp_tmp VALUES (x_header_rec.header_id,x_header_rec.attribute6,l_lookup_type,l_lookup_enabled);
    IF l_lookup_enabled = 'Y' THEN
    INSERT INTO gcca_wf_ordtyp_tmp(ENABLED_FLAG)VALUES('3');
    --COMMIT;   
    l_order_number := GCGX.GWMS_COMMON_PKG.CONSTRUCT_DELIVERY_NAME(GCGX.GWMS_COMMON_PKG.GET_SHIPPER_UID);
    x_header_rec := OE_ORDER_PUB.G_MISS_HEADER_REC;
    x_header_rec.header_id := to_number(itemkey);
    x_header_rec.attribute6 := l_order_number;
    x_header_rec.operation := OE_GLOBALS.G_OPR_UPDATE;
    GCCA_ONT_BRET_UTIL.update_header
    P_HEADER_REC => x_header_rec,
    X_RETURN_STATUS => x_return_status,
    X_ERROR_MESSAGE => x_error_message
    Gcca_Ont_wf_util.Add_Log_Msg('Return Status : '||x_return_status);
    resultout := 'COMPLETE:SUCCESS';
    --To test the values    
    --INSERT INTO gcca_wf_ordtyp_tmp VALUES (x_header_rec.header_id,x_header_rec.attribute6,l_lookup_type,l_lookup_enabled);
    --COMMIT;
    ELSIF l_lookup_enabled = 'N' THEN
    INSERT INTO gcca_wf_ordtyp_tmp(ENABLED_FLAG)VALUES('4');
    --COMMIT;
    GCGX.GWMS_Already_Shipped_Orders.Process_Already_Shiped_Order
    to_number(itemkey),
    l_shipper_id,
    x_return_status
    INSERT INTO gcca_wf_ordtyp_tmp(ENABLED_FLAG)VALUES('5');
    --COMMIT;
    IF to_number(x_return_status) > 0 THEN
    wf_core.context
    'GCCA_ONT_WF_UTIL',
    'GET_DELIVERY_NAME_AS',
    itemtype,
    itemkey,
    TO_CHAR(actid),
    funcmode
    resultout := 'COMPLETE:FAIL';
    ELSE
    l_delivery_name := GCGX.GWMS_COMMON_PKG.CONSTRUCT_DELIVERY_NAME
    l_shipper_id
    x_header_rec := OE_ORDER_PUB.G_MISS_HEADER_REC;
    x_header_rec.header_id := to_number(itemkey);
    x_header_rec.attribute6 := l_delivery_name;
    x_header_rec.operation := OE_GLOBALS.G_OPR_UPDATE;
    GCCA_ONT_BRET_UTIL.UPDATE_HEADER
    P_HEADER_REC => x_header_rec,
    X_RETURN_STATUS => x_return_status,
    X_ERROR_MESSAGE => x_error_message
    Gcca_Ont_wf_util.Add_Log_Msg('Return Status : '||x_return_status);
    resultout := 'COMPLETE:SUCCESS';
    --INSERT INTO gcca_wf_ordtyp_tmp VALUES (x_header_rec.header_id,TO_NUMBER(l_delivery_name),l_lookup_type,l_lookup_enabled);
    END IF;
    END IF;
    END IF;
    IF FUNCMODE = 'CANCEL' THEN
    RESULTOUT := 'COMPLETE';
    END IF;
    EXCEPTION when OTHERS THEN
    wf_core.context('GCCA_ONT_WF_UTIL','GET_DELIVERY_NAME_AS',
    itemtype,itemkey,TO_CHAR(actid),funcmode);
    RAISE;
    END GET_DELIVERY_NAME_AS;

    I'm opening up an old thread, because it seems reasonably relevant to my problem.
    If I'm using database users as my workflow users, can I send them e-mail notifications? The view wf_user populates the e-mail column with contents of the column username from dba_users -- so clearly this column will never contain a valid e-mail address (unless there are varying versions of this view and I have the wrong one installed for my purposes).
    And can anyone point me to the relevant documentation on this. I've gone through the Admin Guide and the Developers Guide.
    Many thanks,
    Scott

  • Deprecated API compilation error

    Please help. Attached is my source code. I'm receiving a compilation error that reads 'RnrBooksApp.java uses or overrides a deprecated API. Recompile with -deprecation for details.' I'm very new to Java, so I appreciate any assistance. Thank you!
    //ClassName: RnrBooksApp
    import java.sql.*;
    import java.awt.*;
    import java.awt.event.*;
    public class RnrBooksApp extends Frame implements ItemListener, ActionListener
         //Declare database variables
         Connection conBook;
         Statement cmdBook;
         ResultSet rsBook;
         boolean blnSuccessfulOpen = false;
         //Declare components
         Choice lstBooks               = new Choice();
         TextField txtISBN          = new TextField(13);
         TextField txtTitle          = new TextField(50);
         TextField txtAuthor = new TextField(30);
         TextField txtPublisher     = new TextField(30);
         Button btnAdd      = new Button("Add");
         //Button btnUpdate = new Button("Update");
         Button btnEdit     = new Button("Save");
         Button btnCancel = new Button("Cancel");
         Button btnDelete = new Button("Delete");
         Label lblMessage = new Label(" ");
         public static void main(String args[])
              //Declare an instance of this application
              RnrBooksApp thisApp = new RnrBooksApp();
              thisApp.createInterface();
         public void createInterface()
              //Load the database and set up the frame
              loadDatabase();
              if (blnSuccessfulOpen)
                   //Set up frame
                   setTitle("Books Database");
                   addWindowListener(new WindowAdapter()
                                  public void windowClosing(WindowEvent event)
                                  stop();
                                  System.exit(0);
                   setLayout(new BorderLayout());
                   //Set up top panel
                   Panel pnlTop = new Panel(new GridLayout(2, 2, 10, 10));
                   pnlTop.add(new Label("ISBN"));
                   lstBooks.insert("Select a Book to Display", 0);
                   lstBooks.addItemListener(this);
                   pnlTop.add(lstBooks);
                   pnlTop.add(new Label(" "));
                   add(pnlTop, "North");
                   //Set up center panel
                   Panel pnlMiddle = new Panel(new GridLayout(5, 2, 10, 10));
                   pnlMiddle.getInsets();
                   pnlMiddle.add(new Label("ISBN"));
                   pnlMiddle.add(txtISBN);
                   pnlMiddle.add(new Label("Title"));
                   pnlMiddle.add(txtTitle);
                   pnlMiddle.add(new Label("Author"));
                   pnlMiddle.add(txtAuthor);
                   pnlMiddle.add(new Label("Publisher"));
                   pnlMiddle.add(txtPublisher);
                   setTextToNotEditable();
                   Panel pnlLeftButtons = new Panel(new GridLayout(0, 2, 10, 10));
                   Panel pnlRightButtons = new Panel(new GridLayout(0, 2, 10, 10));
                   pnlLeftButtons.add(btnAdd);
                   btnAdd.addActionListener(this);
                   pnlLeftButtons.add(btnEdit);
                   btnEdit.addActionListener(this);
                   pnlRightButtons.add(btnDelete);
                   btnDelete.addActionListener(this);
                   pnlRightButtons.add(btnCancel);
                   btnCancel.addActionListener(this);
                   btnCancel.setEnabled(false);
                   pnlMiddle.add(pnlLeftButtons);
                   pnlMiddle.add(pnlRightButtons);
                   add(pnlMiddle, "Center");
                   //Set up bottom panel
                   add(lblMessage, "South");
                   lblMessage.setForeground(Color.red);
                   //Display the frame
                   setSize(400, 300);
                   setVisible(true);
              else
                   stop(); //Close any open connection
                   System.exit(-1); //Exit with error status
         public Insets insets()
              //Set frame insets
              return new Insets(40, 15, 15, 15);
         public void loadDatabase()
              try
                   //Load the Sun drivers
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              catch (ClassNotFoundException err)
                   try
                   //Load the Microsoft drivers
                   Class.forName("com.ms.jdbc.odbc.JdbcOdbcDriver");
                   catch (ClassNotFoundException error)
                   System.err.println("Drivers did not load properly");
              try
                   //Connect to the database
                   conBook = DriverManager.getConnection("jdbc:odbc:Book");
                   //Create a ResultSet
                   cmdBook = conBook.createStatement();
                   rsBook = cmdBook.executeQuery(
                        "Select * from Book;");
                   loadBooks(rsBook);
                   blnSuccessfulOpen = true;
              catch(SQLException error)
                   System.err.println("Error: " + error.toString());
         public void loadBooks(ResultSet rsBook)
              //Fill ISBN list box
              try
                   while(rsBook.next())
                   lstBooks.add(rsBook.getString("ISBN"));
              catch (SQLException error)
                   System.err.println("Error in Display Record." + "Error: " + error.toString());
         public void itemStateChanged(ItemEvent event)
              //Retrieve and display the selected record
              String strISBN = lstBooks.getSelectedItem();
              lblMessage.setText(""); //Delete instructions
              try
                   rsBook = cmdBook.executeQuery(
                        "Select * from Book where [ISBN] = '"
                        + strISBN + "';");
                   txtISBN.setText(strISBN);
                   displayRecord(rsBook);
                   setTextToEditable();
              catch(SQLException error)
                   lblMessage.setText("Error in result set. " + "Error: " + error.toString());
         public void displayRecord(ResultSet rsBook)
              //Display the current record
              try
                   if(rsBook.next())
                        txtTitle.setText(rsBook.getString("Title"));
                        txtAuthor.setText(rsBook.getString("Author"));
                        txtPublisher.setText(rsBook.getString("Publisher"));
                        lblMessage.setText("");
                   else
                        lblMessage.setText("Record not found");
                        clearTextFields();
              catch (SQLException error)
                   lblMessage.setText("Error: " + error.toString());
         public void actionPerformed(ActionEvent event)
              //Test the command buttons
              Object objSource = event.getSource();
              if(objSource == btnAdd && event.getActionCommand () == "Add")
                   Add();
              else if (objSource == btnAdd)
                   Save();
              else if(objSource == btnEdit)
                   Edit();
              else if(objSource == btnDelete)
                   Delete();
              else if(objSource == btnCancel)
                   Cancel();
         public void setTextToNotEditable()
              //Lock the text fields
              txtISBN.setEditable(false);
              txtTitle.setEditable(false);
              txtAuthor.setEditable(false);
              txtPublisher.setEditable(false);
         public void setTextToEditable()
              //Unlock the text fields
              txtISBN.setEditable(true);
              txtTitle.setEditable(true);
              txtAuthor.setEditable(true);
              txtPublisher.setEditable(true);
         public void clearTextFields()
              //Clear the text fields
              txtISBN.setText("");
              txtTitle.setText("");
              txtAuthor.setText("");
              txtPublisher.setText("");
         public void Add()
              //Add a new record
              lblMessage.setText(" ");     //Clear previous message
              setTextToEditable();                //Unlock the text fields
              clearTextFields();                //Clear text field contents
              txtISBN.requestFocus ();
              //Set up the OK and Cancel buttons
              btnAdd.setLabel("OK");
              btnCancel.setEnabled(true);
              //Disable the Delete and Edit buttons
              btnDelete.setEnabled(false);
              btnEdit.setEnabled(false);
         public void Save()
                        //Save the new record
                        // Activated when the Add button has an "OK" label
                        if (txtISBN.getText().length ()== 0 || txtAuthor.getText().length() == 0)
                             lblMessage.setText("The ISBN or Author is blank");
                        else
                             try
                                  cmdBook.executeUpdate("Insert Into Book "
                                            + "([ISBN], [Title], [Author], [Publisher]) "
                                            + "Values('"
                                            + txtISBN.getText() + "', '"
                                            + txtTitle.getText() + "', '"
                                            + txtAuthor.getText() + "', '"
                                            + txtPublisher.getText() + "')");
                                  //Add to name list
                                  lstBooks.add(txtISBN.getText());
                                  //Reset buttons
                                  Cancel();
                             catch(SQLException error)
                                  lblMessage.setText("Error: " + error.toString());
         public void Delete()
                        //Delete the current record
                        int intIndex = lstBooks.getSelectedIndex();
                        String strISBN = lstBooks.getSelectedItem();
                        if(intIndex == 0)          //Make sure a record is selected
                                                      //Position 0 holds a text message
                             lblMessage.setText("Please select the record to be deleted");
                        else
                             //Delete the record from the database
                             try
                                  cmdBook.executeUpdate(
                                       "Delete from Book where [ISBN] = '" + strISBN + "';");
                                  clearTextFields();               //Delete from screen
                                  lstBooks.remove(intIndex);          //Delete from list
                                  lblMessage.setText("Record deleted");     //Display message
                             catch(SQLException error)
                                  lblMessage.setText("Error during Delete."
                                       + "Error: " + error.toString());
         public void Cancel()
                        //Enable the Delete and Edit buttons
                        btnDelete.setEnabled(true);
                        btnEdit.setEnabled(true);
                        //Disable the Cancel button
                        btnCancel.setEnabled(false);
                        //Change caption of button
                        btnAdd.setLabel("Add");
                        //Clear the text fields and status bar
                        clearTextFields();
                        lblMessage.setText("");
         public void Edit()
                        //Save the modified record
                        int intIndex = lstBooks.getSelectedIndex();
                        if(intIndex == 0)          //Make sure a record is selected
                                                      //Position 0 holds a text message
                             lblMessage.setText("Please select the record to change");
                        else
                             String strISBN = lstBooks.getSelectedItem();
                             try
                                  cmdBook.executeUpdate("Update Book "
                                       + "Set [ISBN] = '" + txtISBN.getText() + "', "
                                       + "[Title] = '" + txtTitle.getText() + "', "
                                       + "[Author] = '" + txtAuthor.getText() + "', "
                                       + "[Publisher] = '" + txtPublisher.getText() + "' "
                                       + "Where [ISBN] = '" + strISBN + "';");
                                  if (!strISBN.equals(txtISBN.getText()))
                                       //Last name changed; change the list
                                       lstBooks.remove(intIndex); //Remove the old entry
                                       lstBooks.add(txtISBN.getText()); //Add the new entry
                             catch(SQLException error)
                                  lblMessage.setText("Error during Edit. " + "Error: " + error.toString());
         public void stop()
              //Terminate the connection
              try
                   if (conBook != null)
                   conBook.close();
              catch(SQLException error)
                   lblMessage.setText("Unable to disconnect");

    How DO you compile then?
    If you don't type "javac", you must be using an IDE.
    In your IDE there should be some kind of configuration
    tab or option for "compiler options" or compilation options
    or compiler arguments... something like that.
    put "-deprecation" in that text box and recompile.
    Your compiler should tell you all about which methods
    are deprecated -- you then go to your trust JavaDocs
    and lookup those methods in the API and read WHY they
    are deprecated (i.e. OLD, outdated, defunct, no longer used)
    and what you should use instead. Then, correct your
    code to no longer use the deprecated methods and instead
    do things as suggested in the deprecation comments.

  • Final Year Project, pls help me! _

    Does anyone knows how to open the serial port in Palm for read/write?
    I have tried many times but always fail.
    Pls help! Urgent!

    Thank you very much!
    I found the KVM.prc, KVMutil.prc and the cldc API.
    Then I try to code a program like this:
    import java.io.*;
    import javax.microedition.io.*;
    import com.sun.kjava.*;
    class CommTest extends Spotlet
         OutputConnection oc=null;
         OutputStream dataOut=null;
         String strURL="comm:0";
    public static void main(String[] args){
    (new CommTest()).register(NO_EVENT_OPTIONS);
    public CommTest(){
    try{
              oc=(OutputConnection)Connector.open(strURL);
              oc.close();
         catch (Exception e){
                   System.err.println("Send data exception " + e);
    I tried to run this program, however, I got this:
    Send data exception javax.microedtion.io.ConnectionNotFoundException:
    The required protocol does not exist comm:0
    How can I solve this problem?

  • How to get date and time? pls help~   ~.~

    i tried to get time and date, but dint noe hw to get it.. anyone knows hw to get it? pls help mi ~.~
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.util.Calendar.*;
    public class Login extends JFrame
    private JFrame mainFrame;
    private JPanel p1;
    private JLabel lblUserId, lblPassword;
    private JTextField tf1, tf2;
    private JButton btnLogin, btnClear;
    public Login()
         mainFrame=new JFrame();
         mainFrame.setTitle("Student Attendance System");
         mainFrame.setSize(400,200);
         mainFrame.setLocation(100,100);
         mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         p1=new JPanel();
         p1.setLayout(new GridLayout(3,2));
         lblUserId=new JLabel("User ID");
         lblPassword=new JLabel("Password");
         tf1=new JTextField(20);
         tf2=new JTextField(20);
         btnLogin=new JButton("Login");
         btnLogin.addActionListener(new ButtonHandler());
         btnClear=new JButton("Clear");
         btnClear.addActionListener(new ButtonHandler());
         p1.add(lblUserId);
         p1.add(tf1);
         p1.add(lblPassword);
         p1.add(tf2);
         p1.add(btnLogin);
         p1.add(btnClear);
         mainFrame.add(p1);
    mainFrame.setVisible(true);
    //inner class event handler
    public class ButtonHandler implements ActionListener
         public void actionPerformed(ActionEvent evt)
              Calendar rightNow = Calendar.getInstance();
              if(evt.getSource()==btnLogin)
                   String login=tf1.getText();
                   String password=tf2.getText();
                   JOptionPane.showMessageDialog(mainFrame, "Student ID "+login+" Login at " + rightNow ,
                   "Response", JOptionPane.PLAIN_MESSAGE);
              if(evt.getSource()==btnClear)
                   tf1.setText("");
                   tf2.setText("");
    public static void main(String []args)
         JFrame.setDefaultLookAndFeelDecorated(true);
         Login l=new Login();
    }

    First off, from http://www.catb.org/~esr/faqs/smart-questions.html
    h1. How To Ask Questions The Smart Way:
    h3. Write in clear, grammatical, correctly-spelled language
    More generally, if you write like a semi-literate boob you will very likely be ignored. So don't use instant-messaging
    shortcuts. Spelling "you" as "u" makes you look like a semi-literate boob to save two entire keystrokes. Worse: writing like
    a l33t script kiddie hax0r is the absolute kiss of death and guarantees you will receive nothing but stony silence (or, at best,
    a heaping helping of scorn and sarcasm) in return.
    Next, use a SimpleDateFormat object. You can use it directly or use a date format string to tell it how you want your date string formatted. The API will give you lots of information on how to use this. Note that you'll have to translate the Calendar object to a date object via the getTime() method:
        class ButtonHandler implements ActionListener
            public void actionPerformed(ActionEvent evt)
                Calendar rightNow = Calendar.getInstance();
                //** use SimpleDateFormat
                SimpleDateFormat dateFormat = new SimpleDateFormat();
                String dateString = dateFormat.format(rightNow.getTime());
                if (evt.getSource() == btnLogin)
                    String login = tf1.getText();
                    String password = tf2.getText();
                    JOptionPane.showMessageDialog(mainFrame, "Student ID " + login
                            + " Login at " + dateString,
                            "Response",
                            JOptionPane.PLAIN_MESSAGE);
                if (evt.getSource() == btnClear)
                    tf1.setText("");
                    tf2.setText("");
        }Finally, when posting your code, please use code tags so that your code will retain its formatting and be readable. To do this, either use the "code" button at the top of the forum Message editor or place the tag &#91;code] at the top of your block of code and the tag &#91;/code] at the bottom, like so:
    &#91;code]
      // your code block goes here.
    &#91;/code]

  • Deprecated API error??`

    hi!
    i m getting this error :
    Note: FileInputDemo.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    for the code:
    /* * * FileOutputDemo
    * * Demonstration of FileOutputStream and
    * PrintStream classes
    import java.io.*;
    class FileInputDemo {
    public static void main(String args[]) {
         if (args.length == 1) {
              try {
                   // Open the file that is the first
                   // command line parameter
                   FileInputStream fstream = new FileInputStream(args[0]);
                        // Convert our input stream to a
                        // DataInputStream
                        DataInputStream in = new DataInputStream(fstream);
                        // Continue to read lines while
                        // there are still some left to read
                        while (in.available() !=0) {
                             // Print file line to screen
                             System.out.println (in.readLine());
                        in.close();
                   catch (Exception e) {
                        System.err.println("File input error");
              else System.out.println("Invalid parameters");
    someone plz help me!!
    thanks
    :)

    i m getting this error :It is a "note" or warning, not an error.
    Note: FileInputDemo.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.Have you tried recompiling it with -Xlint:deprecation?

  • Pls help me on finding info abt classes and methods....

    hi.. I'm new to java .. but i know the very basics of it.. so that i could write a couple of simple programs.. I've been working wit .NET all these days and MSDN library helps me a gr8 deal.. it gives explanation for every class and methods of the class, even explaining the parameters passed into the methods.. I'm currently workin wit J2ME for developing MIDlets... As i know the basics programming isnt very bad.. but where can i find the explanation for the classes used in micro edition or the methods that belong to the classes...
    Is there any facility like MSDN library for java where i can find the whole information...?????
    Pls help with....
    Thanks for ur patience...

    * Goto [http://java.sun.com/j2me/docs/|http://java.sun.com/j2me/docs/]
    * Click on link "MIDP 2.0 Specification (JSR 118)"
    * Under Specification, Click on Download
    * Hit Accept License Agreement
    * Download ZIP file (not the pdf version)
    * Unzip file and view files
    * Enter folder "midpng-javadoc-final"
    * Open Overview.html
    * Find link "JavaDoc API Documentation".
    [Ref.|http://www.java-tips.org/java-me-tips/midp/where-is-j2me-api-javadoc.html]

  • Having problems linking two java classes getting a "deprecated API" error??

    Hi,
    I am tryin to link one page to another in my program, however i get the followin msg:-
    Project\alphaSound.java uses or overrides a deprecated API.
    Note: Recompile with -deprecation for details.
    Process completed.
    this only happens when i add the bold piece of code to the class; even though the italic piece of code does take you to a new page?:-
    public class alphaSound extends JPanel implements ActionListener
    {static JFrame f = new JFrame("AlphaSound");
    public alphaSound() {
    public void actionPerformed(ActionEvent event) {
                 Object source = event.getSource();
    else if(source == vowel)
    { Vowelm vm = new Vowelm();
    vm.setSize(Toolkit.getDefaultToolkit().getScreenSize());
    vm.show();
    f.dispose();
    else if(source == back)
    { MainPage main = new MainPage();
    main.setSize(400,300);
    main.show();
    f.dispose();}
    public static void main(String s[]) {
            WindowListener l = new WindowAdapter() {
                public void windowClosing(WindowEvent e) {System.exit(0);}
            //JFrame f = new JFrame("AlphaSound");
            f.addWindowListener(l);
            f.getContentPane().add(new alphaSound());
            f.setSize(Toolkit.getDefaultToolkit().getScreenSize()); 
            f.show();
    }here is the class its tryin to call
    public class Vowelm extends JPanel implements ActionListener
    {static JFrame v = new JFrame("VowelSound");
       public Vowelm() {
                                                   ..etc...
    public static void main(String s[]) {
            WindowListener l = new WindowAdapter() {
                public void windowClosing(WindowEvent e) {System.exit(0);}
            //JFrame f = new JFrame("VowelSound");
            v.addWindowListener(l);
            v.getContentPane().add(new VowelmSound());
            v.setSize(Toolkit.getDefaultToolkit().getScreenSize()); 
            v.show();
    }Im pretty sure ther is some conflict between the two classes due to the way they are called and designed?
    Hope you can help!
    Kind Regards
    Raj

    You may want to check your show() calls and see if
    they can be replaced with setVisible(). Forexample,
    in your Vowelm code, you have a static JFrame v.
    At
    the end of your main function, you use v.show().As
    of JDK1.1, this has been deprecated in favour of
    setVisible(boolean).hey show() in JFrame is from Window and in windowits
    not deprecated ..
    show is not decrecated thats for sure ... i dontknow
    y you said that ...
    you can look in docs as well..
    True - but this in turn overrides show() from
    java.awt.Component, which has been deprecated. My
    guess is that's where the problem comes from.
    Thanks for the Dukes!
    FlicAnd then again - perhaps not. After looking into this a bit more, I take back my last comment about the Component override. However, as I said in my original reply, compiling with -deprecation should tell you which show() call is flagging the error. There is definitely one somewhere that the JVM doesn't like - without seeing your complete code, it's hard to say exactly where. Based on what you've posted, my guess is that it is within the Vowelm class.
    Next time, I'll try to avoid 'shooting from the hip'.
    Again, thanks for the Dukes,
    Flic

  • When i compile my program i get overrides a deprecated API.

    there is no error in the program but this message override a deprecated API and there is no execute. here is the program please help me.
    * Swing version.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.BorderFactory.*;
    import javax.swing.border.* ;
    public class ff extends JPanel implements ActionListener {
    JButton n5,n2,n7,b1,b2,b3,b4,b5,b6,b7,b8,b9;
    public ff(){
    boolean inAnApplet = true;
    JPanel topPanel = new JPanel();
    topPanel.setLayout(new FlowLayout());
    //topPanel.setBackground(lightBlue);
    Border etchedBorder = BorderFactory.createEtchedBorder(Color.blue,Color.cyan);
    topPanel.setBorder(BorderFactory.createTitledBorder(etchedBorder,"Dog Products",
    TitledBorder.DEFAULT_JUSTIFICATION,
    TitledBorder.DEFAULT_POSITION,
    new Font("Serif",Font.BOLD,15),
    Color.black));
    Icon h5 = new ImageIcon( "c:\\a\\birdfood1t.gif" );
    n5 = new JButton("Button 1",h5);
    topPanel.add(n5);
    n5.setActionCommand("n5");
    n5.addActionListener(this);
    //getContentPane().add(topPanel,BorderLayout.NORTH);
    Icon h2 = new ImageIcon( "c:\\a\\birdfood1t.gif" );
    n2 = new JButton("Button 1",h2);
    topPanel.add(n2);
    n2.setActionCommand("n2");
    n2.addActionListener(this);
    //getContentPane().add(topPanel,BorderLayout.NORTH);
    Icon h7 = new ImageIcon( "c:\\a\\birdfood1t.gif" );
    n7 = new JButton("Button 2",h7);topPanel.add(n7);
    n7.setActionCommand("n7");
    n7.addActionListener(this);
    //getContentPane().add(topPanel,BorderLayout.NORTH);
    //birdfoodw();
    //public void birdfoodw() {
    //Container contentPane = getContentPane();
    JPanel v=new JPanel();
    v.setLayout(new BorderLayout());
    // setLayout(new BoxLayout(contentPane,
    JPanel v1=new JPanel();
    v1.setLayout(new GridLayout(9,1));
    v1.add(n5);
    v1.add(n2);
    v1.add(n7);
    JScrollPane sp=new JScrollPane(v1);
    v.add(sp);
    add(v,BorderLayout.CENTER);
    protected void buildToyList() {
    Icon x1 = new ImageIcon("c:\\a\\dogtoys1t.gif");
    b1.setIcon(x1);
    b1.setActionCommand("toys1");
    b1.setText("Dog toy #1");
    Icon x2 = new ImageIcon("c:\\a\\dogtoys2t.gif");
    b2.setIcon(x2);
    b2.setActionCommand("toys1");
    b2.setText("Dog toy #1");
    Icon x3 = new ImageIcon("c:\\a\\dogtoys3t.gif");
    b3.setIcon(x3);
    b3.setActionCommand("toys1");
    b3.setText("Dog toy #1");
    Icon x4 = new ImageIcon("c:\\a\\dogtoys4t.gif");
    b4.setIcon(x4);
    b4.setActionCommand("toys1");
    b4.setText("Dog toy #1");
    Icon x5 = new ImageIcon("c:\\a\\dogtoys5t.gif");
    b5.setIcon(x5);
    b5.setActionCommand("toys1");
    b5.setText("Dog toy #1");
    Icon x6 = new ImageIcon("c:\\a\\dogtoys6t.gif");
    b6.setIcon(x6);
    b6.setActionCommand("toys1");
    b6.setText("Dog toy #1");
    Icon x7 = new ImageIcon("c:\\a\\dogtoys7t.gif");
    b7.setIcon(x7);
    b7.setActionCommand("toys1");
    b7.setText("Dog toy #1");
    Icon x8 = new ImageIcon("c:\\a\\dogtoys1t.gif");
    b8.setIcon(x8);
    b8.setActionCommand("toys1");
    b8.setText("Dog toy #1");
    Icon x9 = new ImageIcon("c:\\a\\dogtoys1t.gif");
    b9.setIcon(x9);
    b9.setActionCommand("toys1");
    b9.setText("Dog toy #1");
    protected void buildFoodList() {
    Icon x1 = new ImageIcon("c:\\a\\dogfood1t.gif");
    b1.setIcon(x1);
    b1.setActionCommand("food1");
    b1.setText("Dog toy #1");
    Icon x2 = new ImageIcon("c:\\a\\dogfood2t.gif");
    b2.setIcon(x2);
    b2.setActionCommand("food1");
    b2.setText("Dog toy #1");
    Icon x3 = new ImageIcon("c:\\a\\dogfood3t.gif");
    b3.setIcon(x3);
    b3.setActionCommand("food1");
    b3.setText("Dog toy #1");
    Icon x4 = new ImageIcon("c:\\a\\dogfood4t.gif");
    b4.setIcon(x4);
    b4.setActionCommand("food1");
    b4.setText("Dog toy #1");
    Icon x5 = new ImageIcon("c:\\a\\dogfood5t.gif");
    b5.setIcon(x5);
    b5.setActionCommand("food1");
    b5.setText("Dog toy #1");
    Icon x6 = new ImageIcon("c:\\a\\dogfood6t.gif");
    b6.setIcon(x6);
    b6.setActionCommand("food1");
    b6.setText("Dog toy #1");
    Icon x7 = new ImageIcon("c:\\a\\dogfood7t.gif");
    b7.setIcon(x7);
    b7.setActionCommand("food1");
    b7.setText("Dog toy #1");
    Icon x8 = new ImageIcon("c:\\a\\dogfood1t.gif");
    b8.setIcon(x8);
    b8.setActionCommand("food1");
    b8.setText("Dog toy #1");
    Icon x9 = new ImageIcon("c:\\a\\dogfood1t.gif");
    b9.setIcon(x9);
    b9.setActionCommand("food1");
    b9.setText("Dog toy #1");
    protected void buildTreatList() {
    Icon x1 = new ImageIcon("c:\\a\\dogtreats1t.gif");
    b1.setIcon(x1);
    b1.setActionCommand("treats1");
    b1.setText("Dog toy #1");
    Icon x2 = new ImageIcon("c:\\a\\dogtreats2t.gif");
    b2.setIcon(x2);
    b2.setActionCommand("treats1");
    b2.setText("Dog toy #1");
    Icon x3 = new ImageIcon("c:\\a\\dogtreats3t.gif");
    b3.setIcon(x3);
    b3.setActionCommand("treats1");
    b3.setText("Dog toy #1");
    Icon x4 = new ImageIcon("c:\\a\\dogtreats4t.gif");
    b4.setIcon(x4);
    b4.setActionCommand("treats1");
    b4.setText("Dog toy #1");
    Icon x5 = new ImageIcon("c:\\a\\dogtreats5t.gif");
    b5.setIcon(x5);
    b5.setActionCommand("treats1");
    b5.setText("Dog toy #1");
    Icon x6 = new ImageIcon("c:\\a\\dogtreats6t.gif");
    b6.setIcon(x6);
    b6.setActionCommand("treats1");
    b6.setText("Dog toy #1");
    Icon x7 = new ImageIcon("c:\\a\\dogtreats7t.gif");
    b7.setIcon(x7);
    b7.setActionCommand("treats1");
    b7.setText("Dog toy #1");
    Icon x8 = new ImageIcon("c:\\a\\dogtreats1t.gif");
    b8.setIcon(x8);
    b8.setActionCommand("treats1");
    b8.setText("Dog toy #1");
    Icon x9 = new ImageIcon("c:\\a\\dogtreats1t.gif");
    b9.setIcon(x9);
    b9.setActionCommand("treats1");
    b9.setText("Dog toy #1");
    public void actionPerformed(ActionEvent e) {
    if (e.getActionCommand() == "n5")
    buildFoodList();
    else if (e.getActionCommand() == "n7")
    buildToyList();
    else if (e.getActionCommand() == "n2")
    buildTreatList();
    public static void main(String args[]) {
    ff window = new ff();
    //window.inAnApplet = false;
    //window.setTitle("bird food");
    window.setSize(123,233);
    window.show();
    window.setVisible(true);

    Sana,
    Look at your last but one line where you have used ".show()", which is a deprecated API. Change to ".repaint()" and try it out.
    window.setSize(123,233);
    window.show(); // show() is deprecated API...
    window.setVisible(true);Cool
    Ravi

  • Where can I find all list for 'deprecated API' in upgrade Oracle 11.2.0.4 to 12c?

    Dear all:
    Thanks in advance for help!  we are upgrading oracle 11.2.0.4 to 12c (most recent release).  However, so far we have a diffculty in get & confirm a complete list of 'all deprecated API' for 12c upgrade; because we need to assess this before proceed to kick-off upgrade.
    Our application is written in JAVA.  The following API/parameters are recommended by others for assessment upgrade 12c impact:
    OraclePreparedStatement.setExecuteBatch()
    OraclePreparedStatement.getExecuteBatch()
    OracleCallableStatement.setExecuteBatch()
    getEndToEndMetrics
    getEndToEndECIDSequenceNumber
    setEndToEndMetrics
    setApplicationContext
    clearAllApplicationContext
    Basically, which area we should look into:  JDBC, Universal Connection Pool, webLogic server, or Oracle ODBC driver? to ensure application continuity after upgrade to 12c?  I get this note today but it is for 'Java ALL API': https://docs.oracle.com/database/121/JAJDB/deprecated-list.html
    Is there any metalinke Note you can refer to check?  I'll check with application team about their code writting.
    thank you very much!

    Hi Srini:  sorry I wasn't able to get our applicaition full architect yet...-:((, I'm a new hire in the team, it is my 2nd week; so that's why I say 'thanks in advance to everyone' in my post.  All I know is 'App is written by Java', and probably use JDBC/ODBC to connect to DB (and by which type of connection pooling mechanism I'm not sure).
    We may also have WebLogic, or app interface with OBIEE/SAP tools.
    Those parameters of 'OraclePreparedStatement.setExecuteBatch' was taken in URL in my post, I feel someone write as 'to-do' in checklist but may not fully understand it.  At this moment to clarify further, we are worried if any changes like PL/SQL stored procedure, oracle library source code, API parameters that are changed in 12c from 11.2.0.4 (or 11gR2 in general) to affect the application?  is there any metalink note can help us get more info about this?
    Sure I'll consider open an SR for our case, any note is also welcome because nobody here has expertise knowledge for API impacted from upgrade 11.2.0.4 to 12c.
    thank you very very much!

  • JCo (in UDF) throws: "...uses or overrides a deprecated API."

    Hi everybody,
    when using JCO in UDF I get the error:
    <b>MyMapping_.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. 1 error</b>
    Does anybody know how to solve the problem?
    The problem occurs only when I try to access the tableParameters:
    <i> codes =     function.getTableParameterList().getTable("COMPANYCODE_LIST");</i>
    Regards Mario

    Hi Mario,
    With every latest Java version its APIs keep changing and some functions are removed or "deprecated", so if you are getting this error which means JRE you are using not have that function available so compile your code with Java -deprecation to suppress that error.
    To check JRE version type Java - version on command prompt and then refer to Java API (also available online) to get detail about that particular function, otherwise you can also chose alternate function to achieve your programming objecting. I prefer if you see JCO API for help on this function.
    Refer to sample code : http://www.sapdevelopment.co.uk/java/jco/jco_callfunc.htm
    Regards,
    Gourav

Maybe you are looking for

  • HP Photosmart Pro B9180 Printing Blank Sheets

    I have a HP Photosmart Pro B9180 printer. I joined two scanned images into one photo and saved it as a .tif file. I then resized it to 8x10 and it printed fine. When I resized it again to print it as an 12x16 on 13x19 paper, the printer will only spi

  • Customisation Query

    Hi, I have a seeded Oracle page - SimpleSearch panel region + the results table The data is fetched from a VO query . e.g select name,type,date from per_participants_table . When the page is first rendered(i.e even before user specifies the search cr

  • Submit Interactive Form using button on Wed Dynpro page instead of in PDF

    Say I've a Web Dynpro page with an interactive form embedded. Is it possible to have on the page an HTMLB button, when clicked, submit the interactive form to an iView on EP? I haven't found any tutorials showing something like this. Please advice. 

  • Oracle Data Guard in WAN

    Hello, I'm planning to setup DG in WAN  with 1GB or less  network pipe. What is the best mode to setup like Maximum availability or Maximum performanance or Max protection? Please share the ML also . thanks

  • Why is the uk version not as good as usa version and i want a woman to talk on my iphone 4s,does anyone know why its not 100%

    Got an Iphone 4s,firstly i would like Siri to be a female voive but that is only available for the Americans, secondly i am finding that the phone is ready for the US market but not for the UK market. Does anyone agree ? is there anything else on pho