Newbie trying to write toplink hello world program

I am trying to write my first toplink app using POJOs, and I'm having a hard time finding a sample toplink application. In this case, I'd like to run outside of a J2EE container with a stand-alone java application to do some basic CRUD operations. I've already run the mapping workbench on my Java classes and generated the deployment file and sessions.xml file. Where (Oracle docs) can I find source code for a simple stand-alone java main() app that uses the toplink API?
Thanks in advance.

TopLink ships with many examples - complete with runtime and workbench componants - in 9.0.4.X Find them here: <TopLink_install_dir>\examples\
For non app server simple CRUD examples, I suggest you look here first:
<TopLink_install_dir>\examples\foundation\threetier

Similar Messages

  • How to compile a simple "Hello World" program in Java by using Netbeans

    Hi all, I am very new to java programming arena. i am trying to learn the most demanding language for the time being. To program, i always use IDE's as it makes programming experience much easier by underline the syntax errors or sometimes showing codehint. However, I am facing some problem when i use Netbeabs to compile a simple "Hello world" program. my problem is whenever i write the code and press compile button, netbeans says "main class not found". Consequently,i am becoming frustated. So, i am here in this forum to get some kind help on How i can compile java programs in Netbeans. Please help me out, otherwise i may lose my enthusiasm in Java. please help me, i m stuck

    Go to http://www.netbeans.org/
    You should find tutorials there.

  • While running hello world program for 12.1.3, getting error

    We followed the instruction given in dev tutorial and set the 12.1.3 jdev.
    When try to run the “Hello World” program, got error
    “You have insufficient privilege”
    Solution:
    I changed the setting as below and it worked.
    Jdeveloper -> Tools -> Embedded OC4J server setting -> start up
    Choose option: Default IP address
    And issue got resolved.
    I want to share this with everyone.

    We followed the instruction given in dev tutorial and set the 12.1.3 jdev.
    When try to run the “Hello World” program, got error
    “You have insufficient privilege”
    Solution:
    I changed the setting as below and it worked.
    Jdeveloper -> Tools -> Embedded OC4J server setting -> start up
    Choose option: Default IP address
    And issue got resolved.
    I want to share this with everyone.

  • Exception while running hello world program

    Hi OAF guys
    i am getting the following exception when i am trying to run the Hello world example. Any body knows this problem, respond asap
    Exception Details.
    oracle.apps.fnd.framework.OAException: Application: FND, Message Name: FND_GENERIC_MESSAGE. Tokens: MESSAGE = oracle.adf.mds.exception.MDSRuntimeException; (Could not lookup message because there is no database connection)
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1145)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1960)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    oracle.adf.mds.exception.MDSRuntimeException
         at oracle.apps.fnd.framework.mds.cache.ATGCacheMgrDelegateImpl.<init>(ATGCacheMgrDelegateImpl.java:325)
         at oracle.apps.fnd.framework.mds.cache.ATGCacheFactoryImpl.<init>(ATGCacheFactoryImpl.java:44)
         at oracle.apps.fnd.framework.mds.OAMDSContextUtils.createMDSContext(OAMDSContextUtils.java:202)
         at oracle.apps.fnd.framework.mds.OAMDSContextUtils.createMDSContext(OAMDSContextUtils.java:149)
         at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getRootApplicationModuleClass(OAWebBeanFactoryImpl.java:3444)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:988)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    oracle.adf.mds.exception.MDSRuntimeException
         at oracle.apps.fnd.framework.mds.cache.ATGCacheMgrDelegateImpl.<init>(ATGCacheMgrDelegateImpl.java:325)
         at oracle.apps.fnd.framework.mds.cache.ATGCacheFactoryImpl.<init>(ATGCacheFactoryImpl.java:44)
         at oracle.apps.fnd.framework.mds.OAMDSContextUtils.createMDSContext(OAMDSContextUtils.java:202)
         at oracle.apps.fnd.framework.mds.OAMDSContextUtils.createMDSContext(OAMDSContextUtils.java:149)
         at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getRootApplicationModuleClass(OAWebBeanFactoryImpl.java:3444)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:988)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    thanks in advance
    Thanks & Regards
    U.Palakondaiah

    For a quick resolution please add the below -D parameter to Java Options under "Project Settings->Configurations->Development->Runner"
    -DCACHEMODE=DISTRIBUTED
    Next thing I want you to do is, check what version of "oracle.apps.jtf.cache.HTCacheProvider" class
    your jdeveloper has? It should be >= 115.33. If not then try after deleting all your class files (myclasses/myglobalclasses and other external classes - may be one of them might have older version of this class file).
    Thanks,
    Eshwar

  • Steps To execute Simple Hello world programs of struts

    Hi,
    Can u tell me how to execute the simple hello world programs in struts by using eclipse ID..
    and send me the screen shots and what all the jar files we have to copy in lib folder.

    >
    Can u tell me how to execute the simple hello world programs in struts by using eclipse ID..
    and send me the screen shots and what all the jar files we have to copy in lib folder.
    >
    No. Post the question in an Eclipse forum.

  • Exception in Hello World Program in Hibernate

    Hi All
    I am trying to run my first "Hello World" hibernate program in the book "Java Persitance with Hibernate". I have written the model class and the main class.
    I have also create the mapping file Message.hbm.xml and hibernate configuration file hibernate.cfg.xml through hibernate tools. Now when I am running the main class i am getting the following exception.
    SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
    SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
    Exception in thread "main" java.lang.ExceptionInInitializerError
         at com.hibernate.test.HibernateUtil.<clinit>(HibernateUtil.java:17)
         at com.hibernate.test.HelloWorld.main(HelloWorld.java:15)
    Caused by: java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
         at org.slf4j.LoggerFactory.getSingleton(LoggerFactory.java:223)
         at org.slf4j.LoggerFactory.bind(LoggerFactory.java:120)
         at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:111)
         at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:269)
         at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:242)
         at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:255)
         at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:165)
         at com.hibernate.test.HibernateUtil.<clinit>(HibernateUtil.java:15)
         ... 1 more
    Caused by: java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder
         at java.net.URLClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
         ... 9 moreI have added the following jars from the folder hibernate-distribution-3.5.2-Final\lib\required
    commons-collections-3.1.jar
    dom4j-1.6.1.jar
    javassist-3.9.0.GA.jar
    jta-1.1.jar
    slf4j-api-1.5.8.jar
    and hibernate3.jar to the classpath.
    It would be great if someone could help me in resolving this problem
    Thanks in advance
    Fierof2

    user13519911 wrote:
    I have posted this question here because this is a hibernate program with is related to database connectivity. What i would like to know is what is the jar file i am missing and why is it not present in the required folders of hibernate distribution.Yeah. With that kind of unproductive attitude I suddenly lose all interest in helping. So weird.
    Guess I'll do what I like: be blunt. You are allowed to think. I suggest you do so.

  • While running hello world program for 12.1.1 getting "Error Page"

    Hi all,
    I am beginner for JDeveloper, I have followed up the instructions given in tutorial documents to install these applications "Tutorials, LabSolutions and Hello World!" but all are giving me this error.
    Error Page
    You have encountered an unexpected error. Please contact the System Administrator for assistance.
    I had tried most of the given solutions in this forum , but still I can not find solution for my problem.
    Any help please!
    Regards
    Hesham

    Hi,
    right now I am playing with parameters , reading
    and now i got this error please check if it make sense for you .
    500 Internal Server Error
    oracle.apps.fnd.common.AppsException: oracle.apps.fnd.common.PoolException: Exception creating new Poolable object.     at oracle.apps.fnd.profiles.Profiles.getProfileOption(Profiles.java:1509)     at oracle.apps.fnd.profiles.Profiles.getProfile(Profiles.java:362)     at oracle.apps.fnd.profiles.ExtendedProfileStore.getSpecificProfileFromDB(ExtendedProfileStore.java:211)     at oracle.apps.fnd.profiles.ExtendedProfileStore.getSpecificProfile(ExtendedProfileStore.java:171)     at oracle.apps.fnd.profiles.ExtendedProfileStore.getProfile(ExtendedProfileStore.java:148)     at oracle.apps.fnd.common.logging.DebugEventManager.configureUsingDatabaseValues(DebugEventManager.java:1294)     at oracle.apps.fnd.common.logging.DebugEventManager.configureLogging(DebugEventManager.java:1149)     at oracle.apps.fnd.common.logging.DebugEventManager.internalReinit(DebugEventManager.java:1118)     at oracle.apps.fnd.common.logging.DebugEventManager.reInitialize(DebugEventManager.java:1085)     at oracle.apps.fnd.common.logging.DebugEventManager.reInitialize(DebugEventManager.java:1072)     at oracle.apps.fnd.common.AppsLog.reInitialize(AppsLog.java:595)     at oracle.apps.fnd.common.AppsContext.initLog(AppsContext.java:593)     at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java:570)     at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java:524)     at oracle.apps.fnd.common.WebAppsContext.<init>(WebAppsContext.java:1108)     at oracle.apps.fnd.common.WebRequestUtil.validateContext(WebRequestUtil.java:225)     at OAErrorPage.jspService(_OAErrorPage.java:62)     [OAErrorPage.jsp]     at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.3.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:259)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:51)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:193)     at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.EvermindPageContext.handlePageThrowable(EvermindPageContext.java:847)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.EvermindPageContext.handlePageException(EvermindPageContext.java:813)     at test_fwktutorial._jspService(_test__fwktutorial.java:104)     [test_fwktutorial.jsp]     at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.3.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)     at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)     at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)     at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)     at java.lang.Thread.run(Thread.java:595)Caused by: oracle.apps.fnd.common.PoolException: Exception creating new Poolable object.     at oracle.apps.fnd.common.Pool.createObject(Pool.java:1286)     at oracle.apps.fnd.common.Pool.borrowObject(Pool.java:1027)     at oracle.apps.fnd.security.DBConnObjPool.borrowObject(DBConnObjPool.java:583)     at oracle.apps.fnd.security.AppsConnectionManager.borrowConnection(AppsConnectionManager.java:300)     at oracle.apps.fnd.common.Context.borrowConnection(Context.java:1719)     at oracle.apps.fnd.common.AppsContext.getPrivateConnectionFinal(AppsContext.java:2266)     at oracle.apps.fnd.common.AppsContext.getPrivateConnection(AppsContext.java:2203)     at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:2061)     at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:1871)     at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:1715)     at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:1728)     at oracle.apps.fnd.common.Context.getJDBCConnection(Context.java:1453)     at oracle.apps.fnd.cache.GenericCacheLoader.load(GenericCacheLoader.java:170)     at oracle.apps.fnd.profiles.Profiles.getProfileOption(Profiles.java:1500)     ... 49 moreCaused by: oracle.apps.fnd.common.AppsException: java.sql.SQLException: Io exception: Got minus one from a read call     at oracle.apps.fnd.security.ConnectionManager.dbConnect(ConnectionManager.java:1423)     at oracle.apps.fnd.security.AppsConnectionManager.localAppsConnect(AppsConnectionManager.java:1218)     at oracle.apps.fnd.security.AppsConnectionManager.localAppsConnect(AppsConnectionManager.java:1113)     at oracle.apps.fnd.security.AppsConnectionManager.localAppsConnect(AppsConnectionManager.java:1102)     at oracle.apps.fnd.security.AppsConnectionManager.makeGuestConnection(AppsConnectionManager.java:787)     at oracle.apps.fnd.security.DBConnObj.<init>(DBConnObj.java:228)     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)     at java.lang.reflect.Constructor.newInstance(Constructor.java:494)     at oracle.apps.fnd.common.Pool.createObject(Pool.java:1273)     ... 62 moreCaused by: java.sql.SQLException: Io exception: Got minus one from a read call     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:287)     at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:328)     at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:430)     at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)     at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)     at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:608)     at java.sql.DriverManager.getConnection(DriverManager.java:525)     at java.sql.DriverManager.getConnection(DriverManager.java:140)     at oracle.apps.fnd.security.ConnectionManager.dbConnect(ConnectionManager.java:1410)     ... 72 more
    --------------

  • Simple "hello world" program

    I have the following code:
    public class hello
    public static void main(String[] args)
    System.out.println("Hello World");
    I get the following message when I try to run this program:
    Exception in thread "main" java.lang.NoClassDefFoundError: hello
    Does anyone know what could be the cause of this error?
    Thanks in Advance!!

    Please check your class path. Make sure that current working directory is included in it.
    If not add it as shown below
    set classpath=%classpath%;.;

  • How to write java hello world to run in oracle sql prompt

    Hi,
    I'm newbie of this chapter. I know JDBC. I wanted to introduce the JDBC process & start executing the same in orcle sql prompt.
    Do enlighten with an example.
    Thnx in Advance

    create or replace and compile java source named helloworld as
    public class HELLOWORLD{public static String HELLOWORLD() {return "Hello World";}}
    create or replace function printhelloworld return varchar2 as
    language java name 'HELLOWORLD.HELLOWORLD() return String';
    SQL> select printhelloworld from dual;
    Hello WorldRegards
    Laurent

  • Hello World Program

    hello, i'm making a program, that is suppose to take as an arugument the name of a paerson, and greet that person. For example;
    class Hello
    { static void main( String[] args)
    System.out.println("Hello, World!");
    Using this program to modify, one would be able to type this in the command line and get the output underneath:
    %java Hello tara
    Hello tara!
    %java Hello there
    Hello there!
    please any help as to what to do would be helpful

    Hi,
    is this a homework? if it is i suggest you read a java book first and learn java.
    Anyways, for your sake... here is the explanation... args is an array of String that accepts parameters from command line. Since you want to get the first argument from the command line (the name) then you should get the first String object in the args array. Index 0 is the first String.
    Note: "args" is just a variable name... you can change it to whatever name you like as long as it doesnt cause conflict to the Java's Keyword
    I hope next time... you read java tutorials first. =)
    Good luck
    class Hello
    { static void main( String[] args)
    System.out.println("Hello, "+args[0]);

  • Problem with "Hello World"  program

    i am new to java.
    i have recently installed java and the version is :
    E:\>java -showversion
    java version "1.6.0_06"
    Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
    Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode, sharing)
    First.java_
    class First
    public static void main (String[] args)
    System.out.println("Hello World!");
    My "First.java" compiles fine.
    but,when i execute it, i got the following Error:
    E:\>javac First.java
    E:\>java First
    Exception in thread "main" java.lang.NoClassDefFoundError: First
    Caused by: java.lang.ClassNotFoundException: First
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    i need assistance..

    As stated in the [thread earlier today|http://forum.java.sun.com/thread.jspa?threadID=5304111&tstart=0], you need to specify the classpath like this:
    java -cp . First(Note that there is a period between the -cp and First with spaces separating the period from the -cp and the First).

  • Help getting started w Xcode 3.0 and C++ hello world program

    Friends:
    I open xCode 3.0 on Leopard and I make a new project using the command line utility standard tool and enter the following application:
    #include <iostream>
    using namespace std;
    int main()
    cout << "Hello world";
    return 0;
    ...and it doesn't build.
    How can I fix this?
    Thanks amigos! -Migs

    The errors:
    After the include: error: iostream: No such file or directory
    After using namesapce: error: syntax error before namespace and warning: data definition has no type or storage calss
    After cout: error: 'cout' undeclared
    Thanks for helping!!!
    Migs

  • Can't get even a hello world program to work

    Hello,
    I am new to java and have written the following and saved it
    to hello.java:
    public class hello
    public static void main(String[] args)
    System.out.println("Hello, world");
    Then I run javac as follows:
    javac hello.java
    No errors, so I type:
    java hello
    and I get
    Exception in thread "main" java.lang.NoClassDefFoundError: hello
    I have been careful for upper and lower case.
    What am I missing?
    I just installed java on this machine.
    Thanks,
    Mike

    Do this instead:java -cp . hello... note the dot following the '-cp' flag. The Java virtual machine needs to
    know where your classes are stored, i.e. it doesn't assume a concept
    of a 'current working directory'. The '-cp' flag is followed by a list of dirs
    (here it's just the current directory '.') that store .class files.
    kind regards,
    Jos

  • BEPL Hello world program error

    Hi
    I am new to BEPL , when i try to compile the Helloworld example , Eclipse BPEL Designer displays the following error
    1.     Error - Element type "bpelc" must be declared.     build.xml     SyncHelloWorld     line 28     May 27, 2006 12:08:36 PM
    2     Error - The content of element type "target" must match "(propertyfile|vsscheckin|sql|cvspass|p4reopen|csc|dirname|wlrun|p4label|p4revert|replaceregexp|get|jjtree|sleep|jarlib-display|dependset|zip|patch|jspc|style|test|tstamp|unwar|vsshistory|icontract|cvschangelog|p4submit|ccmcheckin|p4change|bzip2|p4delete|vssadd|javadoc|translate|signjar|vajload|jarlib-available|WsdlToDotnet|buildnumber|jpcovmerge|ejbjar|war|rename|sequential|serverdeploy|property|move|copydir|cccheckin|wljspc|fixcrlf|sosget|pathconvert|record|p4sync|exec|p4edit|manifest|maudit|antlr|netrexxc|jpcovreport|execon|ccmcheckout|ant|xmlvalidate|xslt|iplanet-ejbc|ccmcheckintask|gzip|native2ascii|starteam|ear|input|rmic|checksum|mail|loadfile|vsscheckout|stylebook|soscheckin|mimemail|stlabel|gunzip|concat|cab|touch|parallel|splash|antcall|cccheckout|typedef|p4have|filter|xmlproperty|copy|antstructure|ccmcreatetask|rpm|delete|replace|mmetrics|waitfor|untar|loadproperties|available|echoproperties|vajexport|stcheckout|bunzip2|copyfile|vsscreate|ejbc|unjar|wsdltodotnet|mkdir|condition|cvs|tempfile|junitreport|taskdef|echo|ccupdate|java|renameext|vsslabel|basename|javadoc2|vsscp|tar|vajimport|setproxy|wlstop|p4counter|ilasm|soscheckout|apply|ccuncheckout|jarlib-resolve|cvstagdiff|jlink|javacc|jarlib-manifest|pvcs|chmod|jar|sound|mparse|blgenclient|uptodate|genkey|javah|ccmreconfigure|fail|unzip|javac|p4add|soslabel|jpcoverage|depend|vssget|deltree|ddcreator|preprocess|patternset|filterset|libfileset|filterreader|extension|fileset|dirset|filelist|filterchain|path|classfileset|description|xmlcatalog|selector|mapper|substitution|extensionSet|regexp)*".     build.xml     SyncHelloWorld     line 29     May 27, 2006 1:32:07 PM
    syncHelloWorld.wsdl code
    <?xml version="1.0"?>
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Run cxant on this file to build, package and deploy the
    SyncHelloWorld BPEL process
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <project name="SyncHelloWorld" default="main" basedir=".">
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Name of the domain the generated BPEL suitcase will be deployed to
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <property name="deploy" value="default"/>
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    What version number should be used to tag the generated BPEL archive?
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <property name="rev" value="1.0"/>
    <target name="main">
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    the bpelc task compiles and package BPEL processes into versioned BPEL
    archives (bpel_...jar). See the "Programming BPEL" guide for more
    information on the options of this task.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <bpelc input="${basedir}/bpel.xml"
    rev="${rev}"
    deploy="${deploy}"
    />
    </target>
    </project>
    Help me to find out the error
    thanks in advance
    partha

    This sounds strange, as the build.xml looks good to me,
    can you pls try to compile your project in the filesystem by using obant - located in $BPEL_HOME/integration/orabpel/bin
    hth clemens

  • Newbie: Trying to write PL/SQL that is dynamic based on data

    Hi everyone,
    I was wondering how I would go about writing a report that outer joins based on data from the main table? Here is what I wanna do in pseudo-sql:
    SELECT
         b.po_number,
    a.ht_code,
         b.figure_no,
         b.order_number,
         a.supplier_no,
    b.cert_date,
    b.plant
    FROM header b, part_spec a
    where ...
    begin:
    project = '' /* initialize project */
    /* The table to get the project value for the report is named ORDER01 or ORDER02 or ... */
    /* It is the word ORDER concatenated with the plant value above. */
    select project from 'ORDER' || :PLANT;
    END;
    How would I do this with APEX 2.0?
    I've successfully used APEX to generate SQL Query reports (REGION) but never PL/SQL.
    Your help is appreciated,
    FerrisWheel
    Edited by: FerrisWheel on Dec 15, 2009 10:13 AM
    Edited by: FerrisWheel on Dec 15, 2009 10:14 AM
    Edited by: FerrisWheel on Dec 15, 2009 10:14 AM

    OK, Thanks for the quick feedback. Here is a quick generic SQL I wrote up to show my goal using your suggestion. Notice the ERP_ORDERHDR and plant values in each of the SQLs below.
    SELECT b.cust_po_no,
    a.ht_code,
         b.item_no,
         b.ERP_ORDER_NO,
         a.supplier_code,
    b.cert_date,
    c.prj
    FROM CERT_HDR b, PART_DETL a, ERP_ORDERHDR011 c
    WHERE plant = 1
    AND a.cert_no = b.cert_no
    AND a.cert_no like '%%%' || UPPER(:p1_cert_no) || '%%%'
    AND b.cust_po_no like '%%%' || UPPER(:p1_cust_po_no) || '%%%'
    AND a.ht_code like '%%%' || UPPER(:p1_ht_code) || '%%%'
    AND b.item_no like '%%%' || UPPER(:p1_item_no) || '%%%'
    AND b.ERP_ORDER_NO like '%%%' || UPPER(:p1_sales_order) || '%%%'
    AND (b.cert_date BETWEEN :P1_DATE_FROM AND :P1_DATE_TO)
    AND c.orno (+) = b.ERP_ORDER_NO
    AND c.prj like '%%%' || UPPER(:p1_project) || '%%%'
    UNION ALL
    SELECT      b.cust_po_no,
    a.ht_code,
         b.item_no,
         b.ERP_ORDER_NO,
         a.supplier_code,
    b.cert_date,
    c.prj
    FROM CERT_HDR b, PART_DETL a, ERP_ORDERHDR012 c
    WHERE plant = 2
    AND a.cert_no = b.cert_no
    AND a.cert_no like '%%%' || UPPER(:p1_cert_no) || '%%%'
    AND b.cust_po_no like '%%%' || UPPER(:p1_cust_po_no) || '%%%'
    AND a.ht_code like '%%%' || UPPER(:p1_ht_code) || '%%%'
    AND b.item_no like '%%%' || UPPER(:p1_item_no) || '%%%'
    AND b.ERP_ORDER_NO like '%%%' || UPPER(:p1_sales_order) || '%%%'
    AND (b.cert_date BETWEEN :P1_DATE_FROM AND :P1_DATE_TO)
    AND c.orno (+) = b.ERP_ORDER_NO
    AND c.prj like '%%%' || UPPER(:p1_project) || '%%%'
    UNION ALL
    SELECT      b.cust_po_no,
    a.ht_code,
         b.item_no,
         b.ERP_ORDER_NO,
         a.supplier_code,
    b.cert_date,
    c.prj
    FROM CERT_HDR b, PART_DETL a, ERP_ORDERHDR014 c
    WHERE (plant = 4 or plant = 5 or plant = 8)
    AND a.cert_no = b.cert_no
    AND a.cert_no like '%%%' || UPPER(:p1_cert_no) || '%%%'
    AND b.cust_po_no like '%%%' || UPPER(:p1_cust_po_no) || '%%%'
    AND a.ht_code like '%%%' || UPPER(:p1_ht_code) || '%%%'
    AND b.item_no like '%%%' || UPPER(:p1_item_no) || '%%%'
    AND b.ERP_ORDER_NO like '%%%' || UPPER(:p1_sales_order) || '%%%'
    AND (b.cert_date BETWEEN :P1_DATE_FROM AND :P1_DATE_TO)
    AND c.orno (+) = b.ERP_ORDER_NO
    AND c.prj like '%%%' || UPPER(:p1_project) || '%%%'
    and this would go on for up to 4 more unions. Is there a way to use PL/SQL to make it more clean? Another issue I have with the above is that the c.orno field that I try to outer join is not numeric whereas the b.ERP_ORDER_NO is numeric. I can to_char(c.orno) but how do I do that and still have an outer join? If I can use PL/SQL, I hope to be able to better control the output and eliminate the unions.
    I hope this is enough information.
    Thanks,
    FerrisWheel

Maybe you are looking for