Import stmt

I would like to know when is the import stmt in the java file evaluated?Suppose I have
imoport java.io.*;
and I use any function down the line in my code.So when actually is the import stmt expanded and how does it effect memory?
What I think is that it is similar to the #include directive in C/C++.Is the functioning the same as in C/C++?
Thanks

It's more like #define than anything else in C.
if wou have a package "pack" with classes "C1", "C2", "C3" (gee i'm creative today!)
then the lineimport pack.*;is similar to the C code:#define C1 pack.C1
#define C2 pack.C2
#define C3 pack.C3all of these will compile to exactly the same bytecode:import pack.C1;
C1 hello;
import pack.*;
C1 hello;
pack.C1 hello;

Similar Messages

  • Sample Adapter - Error in NWDS for import stmt of class PermissionMode

    Hello,
    I downloaded the latest code of Sample Adapter from the SAPNote 1004000.
    I am trying to build the code in SAP NWDS. I am getting an error for the import statements -
    import com.sap.aii.security.lib.KeyStoreManager;
    import com.sap.aii.security.lib.PermissionMode;
    I looked into the jar for the package com.sap.security. There is no 'lib' folder inside this. These two class are also not in any of the folders and subfolders in this package.
    Now for the KeyStoreManager Class, I found a jar sap.comtcjekeystore_apiAPI.jar which contain a class by the name of KeystoreManager in the package com.sap.engine.interfaces.keystore.
    1. Is this KeystoreManager the same class file as KeyStoreManager?
    2. In which jar can I find the class PermissionMode ?
    Best Regards,
    Neeraj
    Edited by: Neeraj Kumar on Aug 20, 2009 10:44 AM

    Hello Neeraj,
    Now as I mentioned earlier, when I go to com.sap.aii.security package in the jar com.sap.aii.sec.svc_api.jar there is no 'lib' folder. Also there is no security.class in any of the subfolders in com.sap.aii.security .
    - In PI7.1 security.class is in folder ext, check whether you can find the folder ext.
    - Your SampleAdapter has already implementation code in it, as you mentioned in the source there are import statements, so the point to focus is to make your source error free, after compile.
    - In case you have the sap.comtcsecssfcore.jar added to your build path, try to reimport the two classes, still if it show error try to close and open your module project.
    Regards,
    Prasanna

  • Import  from Memory id is not working

    Hi All,
    In the program SAPF110V for Tcode : F110 , I have written an enhancement where when user clicks printout button then a popup will come which will ask for whether date should be printed in the check or not. for this i have used FM : POPUP_TO_CONFIRM . here i am exporting the value if user clicks no (value is 2 for NO).
    exoprt statemnt written :
    export l_v_answer from l_v_answer to memory ID 'ANS'.
    In the driver program for check printing i am importing the value .if value = 2 then i am clearing the date that has to be printed in the check.
    import stmt :
    Import l_v_answer to l_v_answer from memory ID 'ANS'.
    however the value is not getting imported here.
    not able to find the reason why the value is not getting picked with import. please let me know the solution.
    Thanks,
    Preethi.

    called program
    REPORT  ZTEST7.
    selection-screen begin of block b1.
    parameters: a like mara-matnr.
    selection-screen end of block b1.
    types: begin of tp_sel_tab.
          include structure zstr2.
    types: end of tp_sel_tab.
    data: t_sel_tab type standard table of tp_sel_tab with header line.
    data: w_t_sel_tab type tp_sel_tab.
    *call screen 9100.
    start-of-selection.
    select ernam from mara into corresponding fields of table t_sel_tab where matnr = a.
    export t_sel_tab to memory id 'ZTEST7'.
    loop at t_sel_tab into w_t_sel_tab.
    write:/ w_t_sel_tab-ernam.
    endloop.
    calling program
    REPORT  ZTEST8.
    *types: begin of tp_sel_tab.
         include structure zstr2.
    *types: end of tp_sel_tab.
    data: begin of t_sel_tab occurs 0,
          ernam like mara-ernam,
          end of t_sel_tab.
    data: begin of sel_tab occurs 0,
          ernam like mara-ernam,
          end of sel_tab.
    *data: t_sel_tab type standard table of tp_sel_tab.
    *types:  begin of tp_sel_tab1,
           ernam like mara-ernam,
    end of tp_sel_tab1.
    *data: sel_tab type standard table of tp_sel_tab .
    data: w_sel_tab type zstr2.
    submit ztest7 with a = '000000000000000939' and return.
    import  sel_tab = t_sel_tab from memory id 'ZTEST7'.
    loop at sel_tab into w_sel_tab..
    write:/ w_sel_tab-ernam.
    endloop.
    please reward points

  • Extension of seeded page - problem with the import

    Hi
    I was extending a seeded page in SSHR. I found the relevant VO to be changed in order to get the desired functionality.But after I changed the VO and put it back into the server,imported the particular jpx file using jpx import,I am not able to open the pages in self service.
    Now what I want to do is to get the file which I imported to database deleted.But I am not able to do that as I dont know the path of the page.
    Import stmt wat i used is :
    jpximport D:\jDev\jdevhome\jdev\myprojects\LeaveProcess.jpx -userId 1 -username apps -password password -dbconnection "(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(Host = 172.26.149.198)(Port = 32019))) (ADDRESS = (PROTOCOL = TCP)(Host = 'Host Name')(Port = 'PortNUmber')) (CONNECT_DATA = (SID=SID)) (SOURCE_ROUTE = YES))"
    Pls let me know any method to find out the relevant page n delete the imported thing from the db.
    Regards,
    Preeti

    Hi
    Ya actually wat happened is after doing all the thing ,I mean import the jpx,move the classes zip file to server n all ,I am not able to open the self service page.I m getting the following error:
    oracle.apps.fnd.framework.OAException: oracle.jbo.NoDefException: JBO-25002: Definition aos.oracle.apps.per.selfservice.common.server.ExtendedAsgSummaryVO of type View Definition not found
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:862)
         at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(OAException.java:985)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:210)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:679)
         at oracle.apps.per.selfservice.common.webui.SummaryContainerCO.processRequest(SummaryContainerCO.java:91)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java(Compiled Code))
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java(Compiled Code))
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java(Compiled Code))
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java(Inlined Compiled Code))
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java(Compiled Code))
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java(Compiled Code))
         at oracle.apps.fnd.framework.webui.beans.layout.OATableLayoutBean.processRequest(OATableLayoutBean.java:349)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java(Compiled Code))
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java(Inlined Compiled Code))
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java(Compiled Code))
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java(Compiled Code))
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java(Compiled Code))
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java(Inlined Compiled Code))
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java(Compiled Code))
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java(Compiled Code))
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1095)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java(Compiled Code))
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java(Inlined Compiled Code))
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java(Compiled Code))
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java(Compiled Code))
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java(Compiled Code))
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java(Inlined Compiled Code))
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java(Compiled Code))
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java(Compiled Code))
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2298)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1711)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
         at oa_html._OA._jspService(_OA.java:88)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
         at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
         at oa_html._OA._jspService(_OA.java:98)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
         at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
         at oa_html._RF._jspService(_RF.java:102)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java(Compiled Code))
         at org.apache.jserv.JServConnection.run(JServConnection.java(Compiled Code))
         at java.lang.Thread.run(Thread.java(Compiled Code))
    Basically it says the VO definition is not found or watever... I m totally confused.
    Now wat I want is just to clean up the thing .Wanna delete eevrything related to that proj n make a fresh start but I am not able to.As I dont know the path of the file which I imported to database :-( n hence I am not able to delete that part n its erroring out !
    Pls let me know how can I get rid of that file !
    Regards,
    Preeti

  • IMPORT itab FROM MEMORY ID - doubt

    Hello all,
    In my program I am using the statement like given below.
    IMPORT  ITAB_TDR       FROM MEMORY ID 'PPI'.  I am getting Sy-subrc = 4. 
    The reason might be either Unable to import data objects or The ABAP memory was probably empty or The contents of all listed objects remain unchanged.
    Now my question is->  How to store the data in the ABAP memory so that I can get the datas in ITAB_TDR in my import stmt.
    Thanks in advance,
    Balaji

    JUST CHECK RPR_ABAP_SOURCE_SCAN REPORT IN SE38 AND GIVE THE STRING THERE IT WILL SHOW THE REPORT NAME. OR JUST PUT ABAPSOURCESCAN IN SE38 AND PRESS F4. IF IT IS A Z PROGRAM THEN GIVE PROG NAME AS Z*.
    IF YOU GET THE PROG NAME THEN YOU HAVE TO RUN THAT PROG TO EXPORT THE VALUE IN MEMORY ID.
    AFTER THAT ONLY YOU CAN USE IMPORT.
    REGARDS
    SHIBA DUTTA

  • How to access class method in jsp page

    hi ,
    I am new to JSP . I want to access a method returning an arraylist
    of a class.
    this class i saved in WEB-INF>classes folder > where other classes like logonform , etc. are saved ....
    import stmt is <%@ page import="java.io.*, java.util.*, readXml " %>
    <% readXml rd= new readXml();
    Arraylist list=rd.parseDoc();
    %>
    It is not recognizing readXml class......
    Can any body help me in this regard......
    plz help .... i m in urgent need
    thanks in advance.......

    better to put class in a pkg inside webinf> classes folder ...
    but in my case constructor was not public......
    public readXml(){}
    now it works fine...... :)

  • Package NOT accessible outside parent/root directory - NoClassDefFoundError

    I can't seem to import a package I created, EXCEPT UNDER THE TOP LEVEL
    PARENT DIRECTORY. The following chronicles what I attempted. I read, and
    tried related postings in this newsgroup, but they have not totally
    solved my problems.
    /* d:\java\zsamples\zswingpackage1\swing-optgrp-eg1.java
    /* Following package stmts. causing run-time error "Exception in thread
    "main" java.lang.NoClassDefFoundError: zswingpackage1/Swing
    OptGroup1a [(wrong name: java/zsamples/zswingpackage1/SwingOptGroup1a)]".
    Solution: as suggested in newsgroup posting, changed package stmt. to
    include ONLY the SUBDIRECTORIES UNDERNEATH the top level 'java'
    directory (EXCLUDE 'java.' qualifier from package stmt.). Compiled from
    the parent directory of the package path, and also ran from that path
    i.e.
    package zsamples.zswingpackage1;     // omits the top level 'java' directory
    public class swing_optgrp_eg1 extends JFrame {
    Here's how I compiled:
         cd java
         d:\java>javac zsamples\zswingpackage1\swing_optgrp_eg1.java
    Here's how I executed:
         Following WORKED. Uses '.' aot backslash qualifier.
         D:\java>java zsamples.zswingpackage1.swing_optgrp_eg1
         Above package defn. solution allowed a calling program (residing under
         the top level 'java' directory) to successfully import the package
         (refer \java\test-package2.java)!! But having difficulties in importing
         this package when referenced in a calling program RESIDING IN A DEEPER
         LEVEL DIRECTORY, such as d:\java\zsamples (refer package-test1.java).
    Calling program1 (resides under d:\java\package-test2.java): WORKED
         /* This source purposely placed in the 1st level directory to test the
         theory/scenario: is it necessary to store the calling program (that
         accesses my package) in the top level directory (d:\java)? */
         import zsamples.zswingpackage1.swing_optgrp_eg1;     // resides under d:\java
    Calling program2 (resides under d:\java\zsamples\package-test1.java): DID NOT WORK
         /* Following import causing "package zsamples.zswingpackage1 does not exist"
              COMPILE ERROR. But worked in package-test2.java.
         Solution (wasn't necessary in package-test2.java):
              - specified 'java' in classpath i.e.          
                   d:\java\zsamples>javac package-test1.java -classpath .;d:\java
              But subsequently, when RUNNING using D:\java\zsamples>java Package_Test1,
              caused RUN-TIME error "Exception in thread "main" java.lang.NoClassDefFoundError:
              zsamples/zswingpackag e1/swing_optgrp_eg1".
              import zsamples.zswingpackage1.swing_optgrp_eg1;     // resides under d:\java
         /* Unsuccessful remedies:
         1) use -classpath with compiler i.e.
              d:\java\zsamples>javac package-test1.java -classpath .;d:\java\zsamples\zswingpackage1
         2) removed top level 'zsamples' qualifier in package name, compiled
              with, and without -classpath parm. i.e.
              import zswingpackage1.swing_optgrp_eg1;     // resides under d:\java\zsamples
              This caused "cannot access zswingpackage1.swing_optgrp_eg1 bad class
              file: .\zswingpackage1\swing_optgrp_eg1.class class file contains wrong
              class: zsamples.zswingpackage1.swing_optgrp_eg1 Please remove or make
              sure it appears in the correct subdirectory of the classpath."
         3) added top level 'java.' qualifier in package name, compiled with, and
              without -classpath parm. i.e.
              import java.zsamples.zswingpackage1.swing_optgrp_eg1;
              This caused "package java.zsamples.zswingpackage1 does not exist".
         4) when running, specified '.;d:\java\zsamples\zswingpackage1', or
              '.;d:\java\zsamples' in -classpath i.e.
                   D:\java\zsamples>java Package_Test1 -classpath .;d:\java\zsamples\zswingpackage1
                   D:\java\zsamples>java Package_Test1 -classpath .;d:\java\zsamples
         // Following import caused same errors as above import stmt.
         //import zsamples.zswingpackage1.*;
         class Package_Test1 {
    My PC configuration:
         java version "1.4.0_01"
         Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_01-b03)
         Java HotSpot(TM) Client VM (build 1.4.0_01-b03, mixed mode)
         JRun 4 (Build 47304)
         WinNT 4.0 SP5
         IE 5.50
         CLASSPATH=.;D:\jakarta-tomcat-3.3.1\lib\common\servlet.jar;
              C:\JRun4\servers\default\default-ear\default-war\WEB-INF\classes
         JAVA_HOME=C:\j2sdk1.4.0_01
         Path=C:\j2sdk1.4.0_01\bin;C:\WINNT\system32;C:\WINNT;
              C:\Program Files\Network Associates\PGPNT;C:\Program Files\MTS;d:\MSSQL7\BINN

    It's hard for me to follow everything you posted. Perhaps this link will help.
    http://java.sun.com/docs/books/tutorial/java/interpack/packages.html
    Some things to keep in mind. Packages are not directories - they just use the path structure of directories to manage namespaces. No matter where a class is, if your Classpath is d:\java, then the root of any class in a package must be in a directory structure that exists inside d:\java. Also, compilers and the JVM utilize the fully qualified name of a class, meaning the package name plus the class name.

  • Mapping test throughs exception for UDF that does'nt exist anymore

    Hello everybody,
    my mapping test throughs an exception for a UDF that I deleted?
    Any ideas?
    Regards Mario

    Hi Mario,
       Sometimes XI Mapping test may throw an Error if any of the other UDF is having errors.
       So please do the following and check whether you are able to run mapping test.
       1. Check all the UDF for any syntax errors/import stmt error etc.
       2. goto Edit mode and do some dummy changes (Like changing UDF Description etc) and activate and check again.
    Regards,
    Ananth

  • To access a package, the calling class must reside in the root/parent direc

    My goal was to be able to access my package from anywhere within the
    high level root folder (d:\zJava). But it seems the invoking class MUST
    RESIDE IN THE TOP LEVEL PARENT DIRECTORY of the package. Was Java
    designed to behave this way?
    D:\zJava\zsamples\com\zswingpackage1>     <-- packages successfully compiled here
         swing_optgrp_eg1.{class/java}
              package com.zswingpackage1;
              public class swing_optgrp_eg1 extends JFrame implements ItemListener {
    D:\zJava\zsamples\com> <-- classes residing here could NOT successfully                    access the package 'com.zswingpackage1'. The third                    level subfolder is 'com'.
         package_test4.java
              /* Following import stmt. causing RUN-TIME error "Exception in thread     "main" java.lang.NoClassDefFoundError: com/zswingpackage1/swing_optgrp_eg1". */
              import com.zswingpackage1;
         Package_Test4.class          
         /* Unsuccessful remedies:
         i) D:\zJava\zsamples\com>java Package_Test4
                   -classpath .;d:\zJava\zsamples\com\zswingpackage1
                   -classpath .;d:\zJava\zsamples\com
                   -classpath .;d:\zJava\zsamples (also used in compile)
                   -classpath .;d:\zJava
         ii) ran from the root/parent directory of the package d:\zJava\zsamples),with and without classpath i.e.
              D:\zJava\zsamples>java com\Package_Test4 [-classpath .;d:\zJava\zsamples]
         iii) ran from the top level directory (d:\zJava), with and without classpath i.e.
              D:\zJava>java zsamples\com\Package_Test4 [-classpath .;d:\zJava\zsamples]
         Possible causes:
              - maybe the above behaviours are by design i.e. the calling class/program CANNOT be stored within the package hierarchy?
    D:\zJava\zsamples\net> <-- classes residing here could NOT successfully access the package 'com.zswingpackage1'. The third level subfolder is 'net'.
         package-test6.java
              /* Following import stmt. causing RUN-TIME error "Exception in thread "main" java.lang.NoClassDefFoundError: com/zswingpackage1/swing_optgrp_eg1". */
              import com.zswingpackage1;
         Package_Test6.class
         /* Unsuccessful remedies:
         i) D:\zJava\zsamples\net>java Package_Test6
                   -classpath .;d:\zJava\zsamples\com\zswingpackage1
                   -classpath .;d:\zJava\zsamples\com
                   -classpath .;d:\zJava\zsamples (also used in compile)
                   -classpath .;d:\zJava
         ii) ran from the root/parent directory of the package (d:\zJava\zsamples), with and without classpath i.e.
              D:\zJava\zsamples>java net\Package_Test6 [-classpath .;d:\zJava\zsamples]
         iii) ran from the top level directory (d:\zJava), with and without classpath i.e.
              D:\zJava>java zsamples\net\Package_Test6 [-classpath .;d:\zJava\zsamples]
         Possible causes:
              - maybe the above behaviours are by design i.e. the calling class/program MUST be stored in the parent folder of the package hierarchy?
    **D:\zJava\zsamples>     <-- classes residing here SUCCESSFULLY accessed package 'com.zswingpackage1'. NO -classpath parms. were necessary!
    D:\zJava\ <-- classes residing here could NOT successfully access the package 'com.zswingpackage1'. Similar scenarios as above.
    D:\zJavaB\ <-- classes residing here could NOT successfully access the package 'com.zswingpackage1'. I purposely created another folder with the 'B' suffix. Similar scenarios as above.
    My PC configuration:
         java version "1.4.0_01"
         Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_01-b03)
         Java HotSpot(TM) Client VM (build 1.4.0_01-b03, mixed mode)
         JRun 4 (Build 47304)
         WinNT 4.0 SP5
         IE 5.50
         CLASSPATH=.;D:\jakarta-tomcat-3.3.1\lib\common\servlet.jar;
              C:\JRun4\servers\default\default-ear\default-war\WEB-INF\classes
         JAVA_HOME=C:\j2sdk1.4.0_01
         Path=C:\j2sdk1.4.0_01\bin;C:\WINNT\system32;C:\WINNT;
              C:\Program Files\Network Associates\PGPNT;C:\Program Files\MTS;d:\MSSQL7\BINN
    Thank you so much for your expertise.

    Hello,
    I think that you use the import-declarations incorrectly.
    Your code says:
    import com.zswingpackage1;
    ... The meaning of the above declaration is the following: Import the class "zswingpackage1" from the package "com". The compiler cannot find that class, but it is probably never asked to find it in your code, so it won't report an error.
    If you want to import the whole package use the following declaration instead:
    import com.zswingpackage1.*;
    ... That means: import all classes from from the package "com.zswingpackage1".
    You can also import just the classes needed, e.g.:
    import com.zswingpackage1.swing_optgrp_eg1;
    ... I hope that does the job.
    S&oslash;ren

  • Suffering around a class name notation

    I have downloaded a simple package source files from the Net.
    Their original package structure was:
    CWD - aa - bb - example - TestApp.java
                  - xx - yy - Model.java
                            - Widget.java
                            - WidgetUI.javaTestApp.java had a package declaration:
    package aa.bb.example;
    // and import stmts for Model and WidgetOther three had another package declaration:
    package aa.bb.xx.yy;And, in the Widget.java:
      public static final String uiClassID = "aa.bb.xx.yy.WidgetUI";
      public String getUIClassID(){
        return uiClassID;
      }They were all fine. They compiled and ran normally in the specified
    package/directory structure. But a small silly surprise was: the command
    line javac aa/bb/example/TestApp.java didn't compile WidgetUI.
    WidgetUI is logically referenced from Widget but the compiler didn't
    care that type of referencing.
    Here follows the story of my long silly suffering. I had flattened the
    whole package structure of the package in order to make them simple
    teaching material. The new structure was:
    CWD - TestApp.java
        - Model.java
        - Widget.java
        - WidgetUI.javaAnd in the Widget.java:
      public static final String uiClassID = "WidgetUI";They compiled fine without smallest glitches. However, got runtime error:
    UIDefaults.getUI() failed: no ComponentUI class for: Widget
    ......The Widget wasn't drawn on the screen because Java could not find the UI.
    After several hours of futile struggling, I tried below without any ground
    nor confidence:
      public static final String uiClassID = "/WidgetUI";Then, suddenly the success came.
    Why oh why "WidgetUI" failed and "/WidgetUI" succeeded for a class name
    from the unnamed package? Why?

    Thanks for the feedback.
    Another user Pete had the same issue
    (see SQL format problem
    and it was fixed today.
    As for the format width(132 lines) Ill see if I can get this fixed for the next release.
    Regards,
    Dermot.

  • Method printlin missing?

    Could somebody please help w/ this... i can't get it. I get this compile error. Is there something simple I'm missing?
    // ERROR
    ConnectionBean.java:25: cannot resolve symbol
    symbol : method println (java.lang.String,java.lang.ClassNotFoundEx
    eption)
    location: class java.io.PrintStream
    System.err.println("Error making JDBC connection: ", e);
    ^
    ConnectionBean.java:31: cannot resolve symbol
    symbol : method println (java.lang.String,java.sql.SQLException)
    location: class java.io.PrintStream
    System.err.println("Error making JDBC connection: ", e);
    // IMPORTED STMTS
    import java.io.*;
    import java.util.*;
    import java.sql.*;
    import javax.servlet.http.*;

    Post the JSP
    Usually this is caused by a typo in the JSP that results in the JSP compiler building bad code.

  • Could not create web bean  exception

    Hi,
    I am getting following exception at of top of the customer creation page when extending HzPuiAcctOrgSearchCO class.
    Could not create web bean, could not find item metadata Item Name: (HzPuiOrgSearchNonDQM); Region: (accntExtRN)
    Could not create web bean, could not find item metadata Item Name: (HzPuiOrgSearchNonDQM); Region: (TableActionsRN)
    package xx.oracle.apps.ar.hz.components.account.search.webui;
    import oracle.apps.ar.hz.components.account.search.webui.HzPuiAcctOrgSearchCO;
    import oracle.apps.fnd.framework.OAException;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import oracle.apps.fnd.framework.webui.beans.form.OASubmitButtonBean;
    public class XXHzPuiAcctOrgSearchCO extends HzPuiAcctOrgSearchCO {
    public void processRequest(OAPageContext pageContext, OAWebBean webBean) {
    super.processRequest(pageContext, webBean);
    String message = "Test PR - Not even calling PR request. ";
    throw new OAException(message, OAException.INFORMATION);
    public void processFormRequest(OAPageContext paramOAPageContext, OAWebBean paramOAWebBean) {
    super.processFormRequest(paramOAPageContext, paramOAWebBean);
    String message = "Test FR - works fine when click button - no exception";
    throw new OAException(message, OAException.INFORMATION);
    -- Full listings of parent Class for your reference.
    package oracle.apps.ar.hz.components.account.search.webui;
    import oracle.apps.ar.hz.components.base.webui.HzPuiPartySearchBaseCO;
    import oracle.apps.ar.hz.components.util.webui.HzPuiSearchWebUtil;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    public class HzPuiAcctOrgSearchCO extends HzPuiPartySearchBaseCO
    public static final String RCS_ID = "$Header: HzPuiAcctOrgSearchCO.java 120.4 2006/01/17 14:48:59 jhuang noship $";
    public static final boolean RCS_ID_RECORDED = VersionInfo.recordClassVersion("$Header: HzPuiAcctOrgSearchCO.java 120.4 2006/01/17 14:48:59 jhuang noship $", "%packagename%");
    protected void setAttributes(OAPageContext paramOAPageContext)
    super.setAttributes(paramOAPageContext);
    if (paramOAPageContext.isLoggingEnabled(2)) {
    paramOAPageContext.writeDiagnostics(this, "HZPUI: " + getClass().getName() + ".setAttributes(OAPageContext) starts.", 2);
    setAttribute("NonDQMRegionName", "HzPuiOrgSearchNonDQM");
    setAttribute("DQMRegionName", "HzPuiOrgSearchDQM");
    if (getPartyParameterMapping() == null) {
    setPartyParameterMapping(HzPuiSearchWebUtil.getAcctOrgSearchParameters(paramOAPageContext));
    if (paramOAPageContext.isLoggingEnabled(2))
    paramOAPageContext.writeDiagnostics(this, "HZPUI: " + getClass().getName() + ".setAttributes(OAPageContext) done.", 2);
    Getting exception even commented out processRequest process at the same time formsRequest works fine (when clicks button).
    I tried by adding OAWebBeanConstants class and parent parent class HzPuiPartySearchBaseCO in import stmts. but getting the same error.
    Kindly suggest what could be the issue.
    Thank you.
    Murali

    Hi,
    I am getting following exception at of top of the customer creation page when extending HzPuiAcctOrgSearchCO class.
    Could not create web bean, could not find item metadata Item Name: (HzPuiOrgSearchNonDQM); Region: (accntExtRN)
    Could not create web bean, could not find item metadata Item Name: (HzPuiOrgSearchNonDQM); Region: (TableActionsRN)
    package xx.oracle.apps.ar.hz.components.account.search.webui;
    import oracle.apps.ar.hz.components.account.search.webui.HzPuiAcctOrgSearchCO;
    import oracle.apps.fnd.framework.OAException;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import oracle.apps.fnd.framework.webui.beans.form.OASubmitButtonBean;
    public class XXHzPuiAcctOrgSearchCO extends HzPuiAcctOrgSearchCO {
    public void processRequest(OAPageContext pageContext, OAWebBean webBean) {
    super.processRequest(pageContext, webBean);
    String message = "Test PR - Not even calling PR request. ";
    throw new OAException(message, OAException.INFORMATION);
    public void processFormRequest(OAPageContext paramOAPageContext, OAWebBean paramOAWebBean) {
    super.processFormRequest(paramOAPageContext, paramOAWebBean);
    String message = "Test FR - works fine when click button - no exception";
    throw new OAException(message, OAException.INFORMATION);
    -- Full listings of parent Class for your reference.
    package oracle.apps.ar.hz.components.account.search.webui;
    import oracle.apps.ar.hz.components.base.webui.HzPuiPartySearchBaseCO;
    import oracle.apps.ar.hz.components.util.webui.HzPuiSearchWebUtil;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    public class HzPuiAcctOrgSearchCO extends HzPuiPartySearchBaseCO
    public static final String RCS_ID = "$Header: HzPuiAcctOrgSearchCO.java 120.4 2006/01/17 14:48:59 jhuang noship $";
    public static final boolean RCS_ID_RECORDED = VersionInfo.recordClassVersion("$Header: HzPuiAcctOrgSearchCO.java 120.4 2006/01/17 14:48:59 jhuang noship $", "%packagename%");
    protected void setAttributes(OAPageContext paramOAPageContext)
    super.setAttributes(paramOAPageContext);
    if (paramOAPageContext.isLoggingEnabled(2)) {
    paramOAPageContext.writeDiagnostics(this, "HZPUI: " + getClass().getName() + ".setAttributes(OAPageContext) starts.", 2);
    setAttribute("NonDQMRegionName", "HzPuiOrgSearchNonDQM");
    setAttribute("DQMRegionName", "HzPuiOrgSearchDQM");
    if (getPartyParameterMapping() == null) {
    setPartyParameterMapping(HzPuiSearchWebUtil.getAcctOrgSearchParameters(paramOAPageContext));
    if (paramOAPageContext.isLoggingEnabled(2))
    paramOAPageContext.writeDiagnostics(this, "HZPUI: " + getClass().getName() + ".setAttributes(OAPageContext) done.", 2);
    Getting exception even commented out processRequest process at the same time formsRequest works fine (when clicks button).
    I tried by adding OAWebBeanConstants class and parent parent class HzPuiPartySearchBaseCO in import stmts. but getting the same error.
    Kindly suggest what could be the issue.
    Thank you.
    Murali

  • How to link or call two FIELD EXIT

    Hi Friends,
    I've to do a Field exit object for MIGO...and my logic is i've to capture the meory id concept by Export and Import function.So, I heard that I've to create one field exit with Export function and again create under one more field exit to import the memory id from Export.
    I know the logic of Export and Import.But i dont know how to fix it in the function module,means how to create one field exit and call the same under one more field exit.
    Pls do the needful and post me with some good field exit examples for my reference.i.,e How to give codes inbetween Function and End Function. and how to call this field exit with one more field exit for import stmt.
    if u find BADI or USER EXIT is good for MIGO,pls reply with good and correct example functions.
    Thanks and regards
    sankar.
    Edited by: sankar babu on Dec 29, 2007 10:00 AM

    Hello Sankar,
          Just you want to use the functionaly Import and Export , that why you required two Fields Exit in transitation MIGO.
    I suggest MIGO is huge transitation which conver some table like MSEG and BSEG which affect the performance of the program. Better you go with one field Exit . Although there are many Some are attach Below.
    Re: MIGO Enhancement
    Re: How to add field to MIGO Urgent??
    SMOD enhancement MBCF0005 looks promising.
    MBCF0002
    MBCF0005
    MBCF0006
    MBCF0007
    MBCF0009
    MBCF0010
    MBCF0011
    MBCFC003
    MBCFC004
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/QMIMIL/QMIMIL.pdf.
    MB_DOCUMENT_BADI or MB_DOCUMENT_UPDATE
    and these exits: MBCF0002, MB_CF001
    Regards
    Swati Namdeo

  • Crypt::cbc encrypt / decrypt using javax.crypto

    I am having a bit of a time encrypting with crypt::cbc and decrypting with java. To get to the point, here is my code, perl first, java 2nd - I have tried to keep things very simple.
    #!/usr/local/bin/perl -w
    use strict;
    use Crypt::CBC 2.30;
    die "Need to specify a file" if(!(my $infile = shift));
    my $key = q(nvA9s$233eOrlQG4);
    my $iv = q(0123456701234567);
    my $bufsize = 16384;
    my $cipher = Crypt::CBC->new({
              'key'          => $key,
              'iv'          => $iv,
              'header'     => 'none',
              'cipher'     => 'Rijndael',
              'keysize'     => '16',     #forced - default is 32 bytes
              'padding'     => 'standard',     #PKCS5
              'blocksize'     => '16',
              'literal_key'     => '1',          #do not MD5 hash key
    open (FORIG,"$infile")|| die "can't open file: $!";
    open (FCRYPT,">$infile.crypt")|| die "can't open file: $!";
    $cipher->start('encrypting');
    while(my $readsize = sysread(FORIG, my $buf, $bufsize)) {
         print FCRYPT $cipher->crypt($buf);
    print FCRYPT $cipher->finish();
    close FCRYPT;
    close FORIG;
    now the java:
    // i have elided the import stmts for brevity
    public class AESEncrypter {
         Cipher ecipher;
         Cipher dcipher;
         byte [] buf = new byte[1024];
         public AESEncrypter() {
              String strKey = "nvA9s$233eOrlQG4";
              byte[] keyBytes = null;
              try {
                   keyBytes = strKey.getBytes("UTF-8");
              } catch(java.io.UnsupportedEncodingException ex) {
                   ex.printStackTrace();
              byte[] iv = new byte[] { 0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7 };
              IvParameterSpec ivSpec = new IvParameterSpec(iv);
              try {
                   ecipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
                   dcipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
              } catch (NoSuchAlgorithmException e) {
                   e.printStackTrace();
              } catch (NoSuchPaddingException e) {
                   e.printStackTrace();
              try {
                   SecretKeySpec key = new SecretKeySpec(keyBytes, "AES");
                   ecipher.init(Cipher.ENCRYPT_MODE, key, ivSpec);
                   dcipher.init(Cipher.DECRYPT_MODE, key, ivSpec);
              } catch (InvalidKeyException e1) {
                   e1.printStackTrace();
              } catch (InvalidAlgorithmParameterException e1) {
                   e1.printStackTrace();
         public void encrypt(InputStream in, OutputStream out) {
              try {
                   out = new CipherOutputStream(out, ecipher);
                   int numRead = 0;
                   while((numRead = in.read(buf)) >= 0) {
                        out.write(buf, 0, numRead);
                   out.close();
              } catch(java.io.IOException e) {
                   e.printStackTrace();
         public void decrypt(InputStream in, OutputStream out) {
              try {
                   out = new CipherOutputStream(out, dcipher);
                   int numRead = 0;
                   while((numRead = in.read(buf)) >= 0) {
                        out.write(buf, 0, numRead);
                   out.close();
              } catch(java.io.IOException e) {
                   e.printStackTrace();
         public static void main(String args[]) {
              if(args.length != 1) {
                   System.out.println("Usage: java AESEncrypter filename");
                   System.exit(0);
              AESEncrypter encrypter = new AESEncrypter();
              try {
         //          encrypter.encrypt(new FileInputStream(args[0]), new FileOutputStream("Java_encrypted.txt"));
                   encrypter.decrypt(new FileInputStream(args[0]), new FileOutputStream("Java_decrypted.txt"));
              } catch (java.io.FileNotFoundException ex) {
                   ex.printStackTrace();
    so with file named whoop.txt containing the following contents:
    whoop
    whoop
    whoop
    whoop
    I do:
    $>./encrypt.pl whoop.txt
    and get the resulting file whoop.txt.crypt. then I do
    $>java AESEncrypter whoop.txt.crypt
    and get the resulting file Java_decrypted.txt. when I do a hex dump of this file:
    $>dump.pl Java_decrypted.txt
    i get the following
    /0 /1 /2 /3 /4 /5 /6 /7 /8 /9 /A /B /C /D /E /F 0123456789ABCDEF
    0000 : 47 58 5F 5F 40 3A 47 58 5F 5F 40 3A 47 58 5F 5F GX__@:GX__@:GX__
    0010 : 70 0A 77 68 6F 6F 70 0A p.whoop.
    I have tried to ensure that everything matches between the perl and java code, however I am obviously missing something. Thanks in advance for any ideas!
    Gregg

    i have hardcoded the IV in perl as:
    my $iv = q(0123456701234567);
    and in the .java file as:
    byte[] iv = new byte[] { 0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7 };
    IvParameterSpec ivSpec = new IvParameterSpec(iv)
    Are these not compatible?
    thanks - gh

  • How to bring in a swc ?

    i want to bring in FLVPlayback.swc and .AS
    to the library path, i added the swc, i added the directory containing fl and below folders for the .AS file(s).
    the import stmt and the object =new FLVPlayback();  works, but when i do an addChild() it says that i must use addElement or perform skinning. addElement dies on implicit conversion.
    so, can SWC's be dragged and dropped with the designer or only thru code, any thoughts.
    as for why, just a test to see how to bring in swc's, plus the current VideoPlayer is a bit flakey. i have a lot from flash cs4 I want to bring in, custom UI objects.

    Sorry, our video experts are out for the rest of the week so you're stuck with me.
    1) Download the latest FLVPlayback control SWC from http://www.adobe.com/go/fms_tools/ (FLVPlayback 2.5.0.15)
    2) Click the "Download the tools" link.
    3) Agree to the licensing stuff and click Agree.
    4) Click the "Adobe FLVPlayback 2.5.0.15 for Flash CS4 Professional and Flex" link to download the ZIP (you may need to sign in).
    4.5) Create a new Flex project in Flash Builder 4. Also, I'm using Nightly build 4.0.0.8448 from http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4.
    5) Extract the ZIP and copy the /FLVPlayback2.5/adobe/fms/samples/FLVPlayback_2.5.swc file into the new Builder project's /libs/ directory. (So it should be /libs/FLVPlayback_2.5.swc)
    6) Copy and paste the following code:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:mx="library://ns.adobe.com/flex/halo"
            creationComplete="onCreationComplete();">
        <fx:Script>
            <![CDATA[
                import mx.containers.Panel;
                import mx.core.UIComponent;
                import fl.video.*;
                private function onCreationComplete():void {
                    var vid:FLVPlayback = new FLVPlayback();
                    vid.source = "http://helpexamples.com/flash/video/water.flv";
                    vid.skinBackgroundColor = 0x666666;
                    vid.scaleMode = VideoScaleMode.EXACT_FIT;
                    // vid.skin = "SkinUnderPlaySeekMute.swf";
                    // vid.skinAutoHide = false;
                    var ui:UIComponent = new UIComponent();
                    ui.addChild(vid);
                    ui.width = vid.width
                    ui.height = vid.height;
                    var pan:Panel = new Panel();
                    pan.title = vid.source;
                    pan.horizontalCenter = 0;
                    pan.verticalCenter = 0;
                    pan.addElement(ui);
                    addElement(pan);
            ]]>
        </fx:Script>
    </s:Application>
    Hope that helps,
    Peter
    Message was edited by: Peter deHaan (Adobe) -- Clarified the /libs/ SWC location. You only need to copy the one SWC, not recreate any sort of folder structure.

Maybe you are looking for

  • Default Settlement Rule for Project Definition

    Hi Viewers, I am having the requirement that, when i create the project, automatically system should create the AUC asset in the project level. I tried and I am able to make at WBS element level. I need at Project level. I need help on this... Regard

  • Error trying to add a new UDF field

    Hello, I have a SAP 2005 A (6.80.320) SP:01 PL:36 system and have encountered a problem trying to amend an existing User Defined Field. If I go into Tools -> User Defined Fields -> Manage Fields -> Marketing Documents -> Rows. There is a line called

  • How to get the filename from J2SE File adapter

    In our project scenario , we are using J2EE and J2SE engine both .J2EE for mapping  and J2SE for Deliveying the message . In one senario, routing will be based on the filename . J2SE Sender File adapter --- XI Adapter --- XI pipe line So the File rea

  • G40 Video noise and blank

    Upon startup, myG40 shows the POST page, then I hear a high pitch noice briefly, and the display goes dark. The external video connector does work, but the lcd screen stays dark. I have a second machine that I can use for parts.  Can someone recommen

  • Embedded Hyperlink to a web movie?

    Hello everybody, This is a shot in the dark, but is it possible to embed a hyperlink to my clients website at the end of their corporate film? The film is being placed on the websites of some of their partners, and it would be fantastic if viewers co