JAVA BASIC QUESTION

The following piece of code compiles correctly:
class abc
double a;
System.out.println("hello");
BUT THE SAME FOLLOWING CODE GIVES COMPILATION ERROR:
class abc
double a;
System.out.println("Hello");
---------------------------------------------

Apart from the declaration of instance variables, all other lines of code have to be contained within a method, constructor or a static block. Your code makes use of a static block.
public class Test {
    System.out.println("This is a static block");
  public static void main(String[] args) {
    new Test();
}

Similar Messages

  • How do you check what version of the java basic libs

    Dear SDN team,
      I am currently using EP 6.0.2.5 , I have just installed patch 5 and I am wondering if I should patch my JAVA Basic libs.  2 Questions
    1.   How can I tell which version I am using now
    2.   Should I patch these libs and why?
    Thanks
    Jeremy

    Hi,
    In The SDM Tool look for an SDA that was deployed from the SAP Java Libs package and then you will see something like:
    Software Type: JAVA-LIB
    Implementation Version: 6.20.<b>14</b>20031219134547.0000
    This means that you are using SAP Java Libs 14.
    It is recommanded to use the latest Java Libs because fixed and enhancements are provided with these libraries.
    Kind regsrds,
    Aviad

  • Importing Java Class Question

    Hello,
    Sorry for such a newbie question and such a long post, I did remember how to do this before but now I can't for the life of me remember. Anyhow, I have a simple question about importing custom-made java classes, from another directory in the windows operating system. I have the classpath set, and also I realize that because the two files below are in the same directory theres no need for an import statement as Java will look for the class in the same directory.
    But I would like to know how the import statement is suppose to look to import a custom made java class from another directory, (assuming of course that I set the correct classpath)
    here's the java class location:
    c:\school\csc365\narcus.java
    //narcus.java
    import java.io.*;
    class narcus implements Comparable
    String firstName = "firstName";
    String lastName = "lastName";
         public narcus()
         firstName = firstName;
         lastName = lastName;
         public narcus(String f)
         firstName = f;
         lastName = lastName;
         public narcus(String f, String l)
         firstName = f;
         lastName = l;
    public String getFirst()
    return "first..";
         public int compareTo(Object e)
         return 1;
    Here's the location of the driver program thats suppose to use the narcus.java class
    c:\school\csc365\test.java
    //test.java
    //import statement? maybe import "c:\\school\\csc365\\*"; ?
    import java.io.*;
    class test
    public static void main(String[] args)
         narcus jim = new narcus();
         System.out.println("omg\n");
         System.out.println(jim.getFirst());
    And also, here is my classpath:
    PATH=c:\school\csc365\;c:\school\
    The classpath also points to the jdk libraries and few other directories but I didn't write that above, as it probably isn't relevant.
    I've tried the following import statements.
    import "c:\\school\csc365\\narcus.java";
    import "narcus.java";
    import "c:\\school\\csc365\\*";
    But I keep getting an error that says:
    test.java:1 <identifier> expected
    Any help is appreciated!

    Hi Folks,
    I am new to this forum, heard that interesting discussions always happens on this forum so immediately registered,don't want to miss any oppurtunity to participate in discussions.
    I have pretty much basic question regarding compiling and exceuting files in different packages.I have the following directory structure
    C:\Projects\WDPROEast\Development\CommonService\Code\Java from where java files stored in different packages as follows:
    com\wdpro\commerce\common\crm\dae\nautilus\adapter directory has java files in com.wdpro.commerce.coomon.crm.dae.nautilus.adapter package.
    com\wdpro\commerce\common\dae\exception has java files with package named com.wdpro.commerce.common.dae.exception.
    com\wdpro\commerce\common\dls\exception has java files with corresponding package name.
    com\wdpro\commerce\common\dto has java files under proper package name.
    com\wdpro\commerce\common\exception has java files with appropriate package name.
    com\wdpro\commerce\common\util has java files with package name. I am starting at Java Directory,want to compile and run file named a.java in com.wdpro.commerce.coomon.crm.dae.nautilus.adapter package with having all other java files on classpath as follows
    so I issued command for compilation as follows C:\Projects\WDPROEast\Development\CommonService\Code\Java>javac com/wdpro/commerce/common/crm/dae/nautilus/ada
    pter/a.java com/wdpro/commerce/common/crm/dae/nautilus/adapter/NautilusServiceUtility.java com/wdp
    ro/commerce/common/crm/dae/nautilus/adapter/URLReader.java com/wdpro/commerce/common/crm/dae/nautilus/adapter/
    b.java com/wdpro/commerce/common/dae/exception/*.java com/wdpro/commerce/common/dto/*.java
    com/wdpro/commerce/common/exception/*.java com/wdpro/commerce/common/util/*.java com/wdpro/commerce/common/dl
    s/exception/*.java It compiled greatly but when I issue command to run a.class file as
    C:\Projects\WDPROEast\Development\CommonService\Code\Java>java com/wdpro/commerce/common/crm/dae/nautilus/adap
    ter/UtilityAccesssit's giving following exception
    Exception in thread "main" java.lang.NoClassDefFoundError: com/wdpro/commerce/common/crm/dae/nautilus/adapter/
    UtilityAccesssbut when I run a.java with the following command
    C:\Projects\WDPROEast\Development\CommonService\Code\Java>java com/wdpro/commerce/common/crm/dae/nautilus/adap
    ter/UtilityAccess com/wdpro/commerce/common/crm/dae/nautilus/adapter/NautilusServiceUtility.java com/wdpro/com
    merce/common/crm/dae/nautilus/adapter/URLReader.java com/wdpro/commerce/common/crm/dae/nautilus/adapter/Nautil
    usAccessUtility.java com/wdpro/commerce/common/dae/exception/*.java com/wdpro/commerce/common/dto/*.java com/w
    dpro/commerce/common/exception/*.java com/wdpro/commerce/common/util/*.java com/wdpro/commerce/common/dls/exce
    ption/*.javaSo my question do I need to add all required java files to path when required class files are under different packages?is it manadatory.
    I hope you understand my question,pass me any comments you may have.
    Thanks alot,
    Anu

  • Basic questions about JAAS capabilities

    I've never used JAAS for authentication or authorization in a Java app before. Can somebody that has (or at least has some experience and knowledge about JAAS) please answer the following couple of basic questions about it? (I know I could probably answer these myself with a few hours of reading.)
    1. Can I use JAAS to restrict the users that can execute specific methods of my code?
    2. If the answer to #1 is yes, is there a way to programmatically determine if a JAAS login user has the permissions to run a method before actually calling that method. In other words, can I ask something like canUserExecute(method) or do I have to just put the call to the method in a try/catch and catch a security exception of some type?
    3. Is it fairly simple to have JAAS authenticate against a Windows Domain or a LDAP server?
    4. Are there programmatic ways to add or edit user information in JAAS?
    Answer to any of these questions are greatly appreciated. I'll even toss a couple of Dukes to the people that answer each question. Thanks in advance.

    You might look at the AfterthoughtSoft-Secure product at http://www.advancedmodelingconcepts.com. It is designed to do just that and will easily allow you to connect to users/group repositories that are in anything from a simple text file all the way up to Kerberos V.
    You can contact the author of the product (me) at bart dot jenkins at gd-ais dot com.
    bart

  • BASIC Questions about JavaMail

    Hi Everyone
    I have some very basic questions about java mail.
    I have a weblogic web server. I think it's version 5 or something like that.
    when a user clicks a form on my application sends some information to my database (via my jsp/java program) , I need to send email to a person?
    Does anyone know how to do that ?
    Could someone please describe the process
    Stephen

    I would recommend that you first read the JavaMail design specifications http://java.sun.com/products/javamail/JavaMail-1.2.pdf
    Then, download JavaMail. It comes with a reference implementation of the API and also very good samples.
    Those samples should get you started very quickly on how to send email from Java program.

  • VERY Basic Questions about Oracle eBusiness - what "languages" are used?

    Please forgive the very basic nature of this post- (I have been in systems (IT) for over 20 years, so I do have lots of systems experience, but no exposure to this particular software.)
    So here are the basic questions - I assume that much of the data base logic is written in PL/SQL, but what other tools / languages are the applications written in?
    (Oracle Forms, Oracle Reports, Java, C, something else?)
    With over 20 years and experience with a number of other packages, I can learn a great deal about an application by 1. Looking at the DB structures (charts), 2. looking into DB code (Packages, triggers, procedure, functions) and 3. Seeing the screen shots.
    None of my customers have had Oracle eBusiness - that have had home grown applications or other COTS/packages.
    can anyone suggest a place where an independent person can inexpensively get some exposure?
    My sincere thanks for any answers/suggestions. 

    Hi,
    Please refer to the following links for details about the different database releases and Oracle tools.
    Oracle Timeline
    http://www.oracle.com/timeline/index.html
    http://www.oracle.com/oramag/profit/07-may/p27anniv_timeline.pdf
    Oracle Corporation - Oracle FAQ
    http://www.orafaq.com/wiki/Oracle_Corporation
    Oracle E-Business Suite consists of Application/Database/Client tiers, you can find more details in [Oracle Applications Concepts|http://www.oracle.com/technology/documentation/applications.html] manual.
    Oracle Forms
    http://en.wikipedia.org/wiki/Oracle_Forms
    Regards,
    Hussein

  • OC4J 9.0.4 stand alone - basic questions

    Hi,
    I'm upgrading my web applications from OC4J (1.0.2.2) to OC4J 9.0.4.
    I have a few basic questions. Since I asked these as part of another thread and didn't get a response, I thought starting a new thread might help...
    1. Does the JSP compiler in OC4J 9.0.4 (JSP container) work with the JDK version set in the path ? (I'm not using OJSP).
    2. I read that OC4J 9.0.4 is J2EE 1.3 compliant. With OC4J 1.0.2.2 , I used the j2ee.jar file (that was bundled with J2SDKEE 1.3) to compile my Servlets/Struts code. I copied it into the OC4J_HOME directory and set the Classpath to it, to build my classes.
    With 9.0.4, can I still use this j2ee.jar file or do I need to use the jar files (Servlet.jar) in the OC4J_HOME/lib directory?
    3. Could somebody throw some light on why some jar files are placed in OC4J_HOME while others are in the OC4J_HOME/lib directory ? What is the difference?
    Any help/suggestions will be greatly appreciated.
    Thanks,
    Shyam

    Hi, shyam:
    It is nice to raise different questions in different threads.
    1. Does the JSP compiler in OC4J 9.0.4 (JSP container) work with the JDK version set
    in the path ? (I'm not using OJSP).I believe you are referring to the runtime JSP engine, which compiles your JSP when you first access it. The answer is yes.
    To see the compilation setting when oracle jsp engine is compiling jsp files, start oc4j with the debug flag:
      java -Dbuild.debug=true -jar oc4j.jar
    2. I read that OC4J 9.0.4 is J2EE 1.3 compliant. With OC4J 1.0.2.2 , I used the
    j2ee.jar file (that was bundled with J2SDKEE 1.3) to compile my Servlets/Struts code.
    I copied it into the OC4J_HOME directory and set the Classpath to it, to build my
    classes. With 9.0.4, can I still use this j2ee.jar file or do I need to use the jar files
    (Servlet.jar) in the OC4J_HOME/lib directory?Not sure what to say about j2ee.jar of j2SDKEE1.3 since I have never used it. For Servlet code, they are pure java code as long as you use the right libraries. Use the one in OC4J_HOME/lib if possible, although it probably does not matter much. For JSP file, there is no problem of compilation if you do not want to precompile them. All you need is packaging them and deploying them.
    3. Could somebody throw some light on why some jar files are placed in OC4J_HOME
    while others are in the OC4J_HOME/lib directory ? What is the difference?The executable jars are in OC4J_HOME directory. Besides that, I do not see see much difference.

  • Mind answering some basic questions for a few bright HS students?

    I am a HS computer science teacher who seeks a professional mentor regarding JDBC. While I have successfully
    - installed a MySQL database,
    created, queried, updated the database,
    - read the Java Tutorial and:
    used Connect/J and written a main method to manipulate a
    database
    created very simple applets to query or update a database with
    their run methods.
    I have basic questions about how pieces fit together in web application development and how one can best take advantage of OOP when dealing with a database. My motivation are a few very bright post-AP students who have an excellent grasp of OOP and data structures; they are curious to see how Java is used in web applications.
    The sample code I have found on the Web has all been small main method examples. I would like to see and discuss a truly OOD application with JDBC, and to discuss how the pieces fit together.
    So, aware of our ignorance and of how dangerous a little knowledge can be, and not expecting to go live with an application anytime soon, we seek a very high level understanding of current professional practice (like: "Where does tomcat fit in here?") as well as some direction while we get our hands dirty. (I hope that makes sense.)
    If you have time to correspond with us via e-mail, answer some very basic questions, and perhaps take a look at some code as we work through it, we would love to hear from you off-line ([email protected]). We would also appreciate knowing where to look for a good OOD sample application. Thanks.

    Complete this tutorial and you will have a much better understanding.
    http://java.sun.com/javaee/5/docs/firstcup/doc/toc.html
    Also here is the tutorial for j2ee ( a little detailed but useful):
    http://java.sun.com/javaee/5/docs/tutorial/doc/

  • Basic question on Adobe document services

    Hi
       We have a ECC50 instance - the basis component of which has been given to us from our headquarters that has stripped off the J2EE server ( i.e given a WAS640 with just the ABAP runtime installed ).
    Now, we are planning to use Adobe Interactive forms - for simple applications - like our field sales able to create a sales order by entering data -offline and submitting it to our ECC50 box. 
    Now, question is - the ADS - that provides runtime services - does it need a J2EE server - or can I assume that this version of our ECC50 has ADS installed on the ABAP stack - and we still go ahead and plan using Adobe Interactive Services assuming that ADS ( PDF document object )would be available to our ABAP environment to process a PDF form that comes in from field sales ?
    Thanks in advance for answering this very basic question.

    Hello Karthik,
    the ADS only runs on the Java stack, so yes you will need to have SAP Web AS Java installed to deploy and run Interactive Forms.
    The functionality of ADS can then be accessed both from Java and ABAP applications.
    Cheers,
    Matthias

  • Java basic tools

    To start, sorry for posting this here, but this question did not fit on the java tools category.
    I need some guidance on (preferably free/open source tools) for java in order to :
    1. Test java basic code
    2. Test GUI code (can this be done?)
    3. Software quality tools like profilers, etc
    Any help/ideas will be apreciated guys!
    Thank you in advance

    Alexandros wrote:
    To start, sorry for posting this here, but this question did not fit on the java tools category.
    I need some guidance on (preferably free/open source tools) for java in order to :
    1. Test java basic code
    JUnit & TestNG?
    2. Test GUI code (can this be done?)[Test Driven Development: A Practical Guide|http://www.amazon.co.uk/Test-Driven-Development-Practical-Guide/dp/0131016490/ref=sr_1_3?ie=UTF8&s=books&qid=1211543555&sr=8-3] goes over a list of options for this. Alas I can only remember brute force (using java.awt.Robot) and JFCUnit. Neither of them are the one used by the example. The other option is not to and test the Listeners & Swing Models (with the test frameworks above). After all you are really only testing the framework will fire an even when asked, and thats what the frameworks test suite is for.
    3. Software quality tools
    FindBugs
    [Cr�p4J|http://www.cr%61p4j.org/]
    I personally find this one a little to spammy, but if I forced myself to tone them down a little and follow the rules they could help:
    PDM
    CheckStyle
    like profilers, etcNetBeans has a profile built in. It is very pretty. Lots of fancy graphs and lines.
    Edit: De-* Cr�p4, add statement on testing GUIs that will get me flamed.
    Edited by: mlk on 23-May-2008 12:05

  • Solaris10 basic questions PHP and MYSQL

    Hi,
    I am trying to learn something of Solaris because it this OS is used at my job, well, we have one system T2000 sunfire, it has Solaris10, we are trying to setup as local server to share some html files, and also we are trying to install some mysql databases, well we already setup Apache2 and it is working fine:
    svcs -a | grep -i http
    online Mar_10 svc:/network/http:apache2
    Something that I don't know is if the server has already installed PHP and if it is running, I just found these files containing PHP:
    ./usr/local/php
    ./usr/local/php/doc/php
    ./usr/local/php/bin/php
    ./usr/local/php/include/php
    ./usr/local/php/lib/php
    ./usr/local/php/bin/php
    # cd bin
    # ls -l
    total 42041
    -rwxr-xr-x 1 root bin 686 Jun 30 2005 pear
    -rwxr-xr-x 1 root bin 21407604 Jun 30 2005 php
    -rwxr-xr-x 1 root bin 877 Jun 30 2005 php-config
    -rwxr-xr-x 1 root bin 593 Jun 30 2005 phpextdist
    -rwxr-xr-x 1 root bin 3068 Jun 30 2005 phpize
    I was wondering if some of you can tell me if php is installed and running, I think it is not running because I created an php file and it doesn't work.
    I also need to know if mysql is working or not, I think it is working, these are the process that I found of mysql:
    /usr/bin/ps -ef |grep mysql
    mysql 843 798 0 Feb 22 ? 40:59 /usr/local/mysql/libexec/mysqld basedir=/usr/local/mysql datadir=/export/ho
    root 798 1 0 Feb 22 ? 0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe datadir=/export/home/database pid-
    Thanks.

    Thanks Alan bye the answer.
    Here is my list of folder in /usr/local:
    lrwxrwxrwx 1 root root 14 May 20 2009 Tcl8.4.2 -> /usr/local/tcl
    drwxr-xr-x 10 root other 10 May 20 2009 apache
    drwxr-xr-x 16 root bin 16 Jun 7 2009 apache2
    drwxr-xr-x 2 root bin 5 Mar 9 18:16 bin
    drwxr-xr-x 5 root bin 5 Mar 9 18:16 doc
    drwxr-xr-x 2 root bin 7 Mar 9 18:16 include
    drwxr-xr-x 3 root bin 39 Mar 9 18:16 lib
    drwxr-xr-x 2 root bin 5 Mar 9 18:16 libexec
    drwxr-xr-x 4 root bin 4 Jun 7 2009 man
    drwxr-xr-x 14 root root 14 Jun 7 2009 mysql
    drwxr-xr-x 5 root other 5 May 20 2009 perl5
    drwxr-xr-x 8 root bin 8 Jun 7 2009 php
    drwxr-xr-x 2 root bin 4 Mar 9 18:16 sbin
    drwxr-xr-x 5 root bin 5 Mar 9 18:16 share
    drwxr-xr-x 10 root other 10 May 20 2009 squid
    drwxr-xr-x 10 root root 11 Jun 7 2009 ssl
    drwxr-xr-x 7 root other 8 May 20 2009 tcl
    drwxr-xr-x 10 root other 10 May 20 2009 tools
    I know perl is running by:
    # perl -v
    This is perl, v5.8.4 built for sun4-solaris-64int
    (with 31 registered patches, see perl -V for more detail)
    Copyright 1987-2004, Larry Wall
    Perl may be copied only under the terms of either the Artistic License or the
    GNU General Public License, which may be found in the Perl 5 source kit.
    Complete documentation for Perl, including FAQ lists, should be found on
    this system using `man perl' or `perldoc perl'. If you have access to the
    Internet, point your browser at http://www.perl.com/, the Perl Home Page.
    And I was thinking, before install another thing I want to be sure that php is not installed or running, I would like to ask some questions:
    How can I know if php is installed?
    How can I know if it is running? the way I have tried is placing a PHP file in the /var/apache2/htdocs and tried it from the browser, but it didn't work.
    If PHP is installed how can I enable it or start it? and how to make it permanent or start automatically when server boot up?
    What happen if i try to install the AMP, may I have to backup the files that we already have in /var/apache2/htdocs?
    Will the amp cause troubles or conflict to the apache, perl and mysql that are already installed and running?
    Another basic question and hope not to cause angry, is there inside Solaris any equivalent folder to "program files" like in win? it would be to have an idea of all the applications already installed in the system. or which is or are the folders in Solaris where I can see all the installed applications?
    the last question the term "the box" is the term for machine, station, server?
    Thanks.
    by the way here is a list of the process that are currently running
    cmd     uid
    sched     root
    /sbin/init     root
    pageout     root
    fsflush     root
    /usr/lib/inet/inetd start     root
    /lib/svc/bin/svc.startd     root
    /lib/svc/bin/svc.configd     root
    /usr/lib/nfs/mountd     root
    /usr/lib/sysevent/syseventd     root
    /usr/apache2/bin/httpd -k start     webservd
    /usr/sadm/lib/smc/bin/smcboot     root
    /usr/lib/saf/ttymon -g -d /dev/console -l console -T ansi -m ldterm,ttcompat -h     root
    /usr/lib/nfs/nfs4cbd     daemon
    devfsadmd     root
    /usr/sadm/lib/smc/bin/smcboot     root
    /usr/lib/ldoms/drd     root
    /usr/lib/nfs/statd     daemon
    /usr/sbin/rpc.bootparamd     root
    /usr/lib/crypto/kcfd     daemon
    /usr/lib/picl/picld     root
    /usr/sbin/rpcbind     daemon
    /usr/lib/efcode/sparcv9/efdaemon     root
    /usr/sbin/nscd     root
    /usr/sbin/cron     root
    /usr/lib/ssh/sshd     root
    /usr/lib/nfs/nfsmapid     daemon
    /usr/lib/nfs/nfsd     daemon
    /usr/lib/sendmail -Ac -q15m     smmsp
    /usr/sadm/lib/smc/bin/smcboot     root
    /usr/lib/nfs/lockd     daemon
    /usr/lib/saf/ttymon     root
    /usr/local/mysql/libexec/mysqld basedir=/usr/local/mysql datadir=/export/ho     mysql
    /usr/lib/saf/sac -t 300     root
    /usr/lib/utmpd     root
    /usr/lib/sendmail -bd -q15m     root
    /usr/sbin/in.routed     root
    /usr/sbin/in.telnetd     root
    /usr/lib/autofs/automountd     root
    /usr/sbin/in.rarpd -a     root
    /usr/lib/ssh/sshd     myuser
    /usr/lib/autofs/automountd     root
    /usr/sbin/syslogd     root
    /opt/SWIE/jetty/jre/bin/java -Djava.awt.headless=true -Djava.endorsed.dirs=/opt     root
    ps -ef     root
    /usr/lib/netsvc/rstat/rpc.rstatd     root
    bash     root
    /usr/sbin/in.telnetd     root
    /usr/lib/snmp/snmpdx -y -c /etc/snmp/conf     root
    /usr/lib/fm/fmd/fmd     root
    /usr/sbin/vold -f /etc/vold.conf     root
    /usr/lib/dmi/dmispd     root
    /usr/sfw/sbin/snmpd     root
    /usr/jdk/latest/bin/java -Dhostname=XXXHOSTnameXXX -Djava.security.policy==/opt/SU     root
    /opt/realport/sparc64/ncxd -d /dev/digi_realport0 -i XXX.XXX.XXX.X -p 771 -e ne     root
    (dnsserver)     squid
    (dnsserver)     squid
    /usr/lib/dmi/snmpXdmid -s XXXHOSTnameXXX     root
    /usr/dt/bin/dtlogin -daemon     root
    /bin/sh /opt/SWIE/jetty/etc/init.d/jetty start     root
    (dnsserver)     squid
    (dnsserver)     squid
    /usr/local/squid/sbin/squid -DsY     root
    (dnsserver)     squid
    /usr/java/bin/java -server -Xmx128m -XX:+UseParallelGC -XX:ParallelGCThreads=4      noaccess
    (squid) -DsY     squid
    -sh     root
    (unlinkd)     squid
    /bin/sh /usr/local/mysql/bin/mysqld_safe datadir=/export/home/database pid-     root
    -bash     myuser
    bash     root
    -bash     myuser
    -sh     root
    /usr/lib/ssh/sshd     myuser
    sh     root
    bash     root
    /usr/sbin/in.telnetd     root
    -sh     root
    /usr/apache2/bin/httpd -k start     webservd
    bash     root
    /usr/apache2/bin/httpd -k start     webservd
    -sh     root
    sh     root
    /usr/lib/ssh/sshd     root
    -bash     myuser
    /usr/sbin/in.telnetd     root
    -sh     root
    bash     root
    /usr/sbin/in.telnetd     root
    bash     root
    /usr/apache2/bin/httpd -k start     root
    -sh     root
    /usr/apache2/bin/httpd -k start     webservd
    /usr/lib/ssh/sshd     root
    /usr/apache2/bin/httpd -k start     webservd
    /usr/sbin/in.telnetd     root

  • Basic question - querying xmltype column

    Hi,
    Sorry for the basic question but please could someone paste in a working 'select where' statement which will pick out only those rows containing an element with specified content.
    For example, how would I return n complete XML documents as query results for a situation where 'element_1' has text content 'apples'?
    This does not seem to work:
    SELECT x.xml_body.extract('/root_element/element_1/text()').getStringVal()
    FROM xmltable x
    WHERE x.xml_body.extract('/root_element/element_1/text()').getStringVal()='apples'

    Hi Paul,
    The query you have given works. I tried that query in the following format and it works.
    Query 1:
    SELECT x.xmlcol.extract(/Employee/Name/text()').getStringVal()
    FROM table_name x
    WHERE x.xmlcol.extract('/Employee/Name/text()').getStringVal()='Anu'
    Query 2:
    SELECT extractvalue(x.xmlcol,'//Name/text()')
    FROM table_name x
    WHERE extractvalue(x.xmlcol,'//Name/text()')='Srini'
    Both the queries work. The xml is of the following format
    <Employee company="Oracle">
    <Name>Anu</Name>
    <Department>OTN</Department>
    <Location>India</Location>
    </Employee>
    Can you please tell the database version on which you are working?
    For more information on XMLType you can refer the XMLDB Samples located at
    http://otn.oracle.com/sample_code/tech/xml/xmldb/content.html
    You can also refer to the XMLType Sample present at this location
    http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/9i_jdbc/content.html#xmltype
    to know how to work with XMLType columns.
    You can get back to us if you have any more doubts.
    Regards,
    Anupama Majety

  • Is JMF a failed concept ? basic question

    I have been researching to embed a JMF app on an applet for nearly 2 months. i have also read most questions on this forums thats related to this topic.
    Almost every one says to use java web start than using an applet. and most of the people in the forum has not got a solution to there problem, that is to add audio/video chat to an applet.
    I too have a issue in adding a audio/video chat to an applet. but still almost every one encouraged me to use java webstart.
    Further more there are no successful example in the net where you can add a audio/video chat into an applet. Most of the sample code given don't even work.
    My problem is that, Why doesn't jmf work on applets ?? have some one tried using this method, and has it worked ?? and why does people in this forum encourage others to use java web start instead of applets ? and finally does sun want to turn down the concept of using applets ???
    note: I might had asked a stupid question, if so my apologies._

    The cross-platform version of JMF works just fine in embedded applets(1), it is the Performance Pack that can be a hassle to get working. The JMF PP would need to be installed on the users computer, to get the natives in a place they can be used.
    Having said that, the "This computer needs to reboot" message at the end of the JMF installer puts a bit of a damper on that. Who wants to use an applet that requires them to reboot the PC before use?
    Also, I've heard that even after that, many users visit the JMF test applet to have it report that the JMF classes are not found. Since I have little interest in deploying the PP to end users, I have never looked into it that closely.
    localpott wrote:
    ..Almost every one says to use java web start than using an applet. Humour me. Why do your users want a browser window wrapped around the applet?
    It seems logical to me, that the end user should just be able to click the maximize icon in a free floating app., rather than have the screen acreage of the GUI limited by a conventional applet.
    My problem is that, Why doesn't jmf work on applets ??Please fix that sticky '?' key.
    Reasons mentioned above. To contrast that with a webstart launch, it is trivially easy to add natives to the run-time class-path of a webstart app.
    .. have some one tried using this method, and has it worked ??.. I've not tried it for the reasons mentioned above.
    ..and why does people in this forum encourage others to use java web start instead of applets ? (My) reasons mentioned above.
    ..and finally does sun want to turn down the concept of using applets ???Given the effort Sun is pouring into the jnlp2 architecture, which allows webstart services to be used even in embedded applets, I think not.
    It should be noted though, that Sun has abandoned JMF a long time ago (though they have never issued an announcement to that effect). :(
    As such:
    a) It is lacking in the more advanced compression codecs, which it seems would be a killer for network/internet based media transfer.
    b) Nobody is updating the (32 bit) natives, so I guess they will work on less and less PCs as time goes on.
    Those two things aside, I feel that JMF is a relatively well engineered & comprehensive media solution. The reason so many people have trouble getting up to speed in JMF is largely because 'media handling' is a lot more complex than most people realise. I probably should have asked those people who complained about JMF, if they had ever dealt with the intricacies of media handling in another API for anything beyond 'throw a media file into the system player and play it'. Playing a media file would probably be trivially easy in VB.
    And finally:
    Sub: Is JMF a failed concept ? *<basic question>*
    What is the meaning of life? Is a simple or basic question, it is the answer that is more complicated!

  • Please reply to this basic question....

    i am using java version 1.4.1
    In java home directory it contains bin and jre forlders.
    In both of the folders java.exe file is there.
    What is the use of having the same file in both directiory......
    Please reply to this basic question....

    One probaly came with the JDK, and one came with the complete JRE that's included in the JDK...

  • EJB Facade basic question

    Hi All,
    I have a basic question on EJB Session Facade design pattern.
    What is the extra code we write in normal Session Bean, to make it as Session Facade.
    I never involve in EJB coding, but i know the coding and bit curious to know about it. I see Normal Session Bean coding and also seen Session Facade coding, i dont find any difference in implementation, then y do we call it as a Session Facade design pattern. Are all session beans are by default called Session Facade or do we need to write any extra code in a normal Session bean to make it as SF.
    Requesting to clarify.
    Thanks & Regards,
    Ravi Kumar

    There's a nice explanation on http://java.sun.com/blueprints/patterns/SessionFacade.html.
    The way I read it, my session beans are really session facades already, so why not yours too? However, that page also gives an example of a session bean that wouldn't count as session facade.

Maybe you are looking for

  • Need Help, I Pod Can't be read from or written to, but can download music??

    I have a 30G IPod. I can add music to my IPod from ITunes (when it recognizes my Ipod, usually have to unplug it once or twice first). But, when I try to change the settings to "manually manage songs and playlist" and/or try to import pictures onto m

  • WD application is not opening in UWL for custom workflow

    Hi, I have created entries in SWFVISU, and webflow connecter also has entries for my custom task . I can see work item in UWL but as soon as I click on workitem I am not able to see application or workitem . Kindly check screenshot. Regards, Vijay

  • VAT  Returns in SAP

    Hi Gurus, Can anybody explain how to do VAT returns in SAP ECC 5.0.  Is there any report in SAP, to check the VAT paid and Payable amount. Please help me in this regard Thanks in Advance, Ganesh

  • Automatic User Device Affinity doesn't work

    Hi, the automatic User Device Affinity doesn't work in my environment and I don't know why! The audit policies are enabled by GPO and User Device Affinity is correctly configured in SCCM. Below are some screenshots including de log of User Device Aff

  • Employee percentage not getting defaulted in additional actions

    Hi all, My employement percentage & position is not getting defaulted in 0001 - while running additional actions. I need to manually key in the percentage and in case of any promotion i need to manually key in the changed position number.  Can somebo