How to compile and package my EJB application

Hi,
I just ran the sample programs from the Sun J2EE tutorial. Seems to work fine. I used the ant utility to compile all the programs and the J2EE Deployment Wizard to package and deploy everything. Now how do I compile and deploy a sample EJB program that I have written ?
I am using the following platforms:
1: JBuilder 3.0 : IDE (for writing the source code)
2: JDK 1.4.0_01
3: J2SDK EE 1.3.1 (EJB/Appln server)
How do I make ant recognize my program and compile it... i guess the deployment procedure would still be the same.
Can somebody please help me out on this ??
Thanks
prasanna

Hi,
Thanks for your prompt reply. I tried that out.. I have a directory called "customer" under which I have my interfaces,bean implementation class and the J2EE application client.
ANT_HOME is set to : the directory where ant is installed
JAVA_HOME is set to : the directory where JDK is installed
J2EE_HOME is set to : the directory where J2EE server is installed
and PATH : includes the bin directories of JDK, ant and J2SDK EE
These are the paths I had to set when I ran the J2EE tutorial programs. It worked fine.
Now when I say : ant myprogram I get an error saying:
BUILD FAILED
Target "myprogram" does not exist in this project
How do I add my program also to the project so that ant can recognize it ?
Also if there is any other way you can suggest to compile and package my application it would be great...
Thanks
prasanna

Similar Messages

  • How to Compile and run Smart Card Application

    hi
    any one can help me reagrding Javacard API. i download the JavaCard Development Kit from sun and install on my machine but i didn't get all java files and class files of JavaCard API. where i obtain those files so my application get compile and run.
    pls help me i m new in this technology.
    Thanks in Advance.

    My program Test.java in F:\Tomcat5\webapps\Ambika\WEB-INF\Classes. I compiled in the format below. I got like this. What should I do for this? But yesterday I compiled like this only, It compiled and the folder com\cert\Test.class is created. Today again I compiled the pgm after deleting the already created folder 'com\cert', I got the error like this.
    I've given my pgm and the thing I've got when I compiled it.
    Test.java
    package com.cert;
    public class Test
         public void display()
              System.out.println("Hai");
    F:\Tomcat5\webapps\Ambika\WEB-INF\Classes>javac -d F:\Tomcat5\webapps\Ambika\WEB-INF\Classes\Test.java
    javac: no source files
    Usage: javac <options> <source files>
    where possible options include:
    -g Generate all debugging info
    -g:none Generate no debugging info
    -g:{lines,vars,source} Generate only some debugging info
    -nowarn Generate no warnings
    -verbose Output messages about what the compiler is doing
    -deprecation Output source locations where deprecated APIs are u
    sed
    -classpath <path> Specify where to find user class files
    -cp <path> Specify where to find user class files
    -sourcepath <path> Specify where to find input source files
    -bootclasspath <path> Override location of bootstrap class files
    -extdirs <dirs> Override location of installed extensions
    -endorseddirs <dirs> Override location of endorsed standards path
    -d <directory> Specify where to place generated class files
    -encoding <encoding> Specify character encoding used by source files
    -source <release> Provide source compatibility with specified release
    -target <release> Generate class files for specific VM version
    -version Version information
    -help Print a synopsis of standard options
    -X Print a synopsis of nonstandard options
    -J<flag> Pass <flag> directly to the runtime system
    F:\Tomcat5\webapps\Ambika\WEB-INF\Classes>
    Plz help me.
    thanks in advance
    Ambika

  • How to compile and deploy an ejb into Sun ONE app.server 7.0

    I am new to Sun ONE application server. I Have .java files and deployment descriptor files with me. How should proceed. When i tried to use asant it is saying that build.xml not found. I copied build.xml from some other directory to the current directory. Then it is saying that common.xml not found. Please help.
    Regards,
    Nagaraju.

    Hi,
    The build.xml file should be in a directory from where
    you are running the asant command.
    To resolve the common.xml file not found error,
    open your build.xml and check from which location the common.xml file is incuded.
    In the sample application it is four directories above
    the directory where build.xml is located.
    You can copy the common.xml in the current directory and then change the following in your build.xml
    <!ENTITY include SYSTEM "../../../../common.xml">
    to <!ENTITY include SYSTEM "common.xml">
    Hope this helps.
    Get back in case you have more issues

  • How to compile and run package programs in Java

    Hi,
    I want to know how to compile and run the package programs in Java using -d. instead of creating the package folder manually.
    eg:
    package Test;
    class test1
    public void disp()
    //Any code;
    I want to compile this without creating the folder ' Test ' manually. that is if we use -d with javac the Test folder will be created automatically. I need the format of -d
    could anyone please help me.
    Thanks in Advance ,
    Ambika

    My program Test.java in F:\Tomcat5\webapps\Ambika\WEB-INF\Classes. I compiled in the format below. I got like this. What should I do for this? But yesterday I compiled like this only, It compiled and the folder com\cert\Test.class is created. Today again I compiled the pgm after deleting the already created folder 'com\cert', I got the error like this.
    I've given my pgm and the thing I've got when I compiled it.
    Test.java
    package com.cert;
    public class Test
         public void display()
              System.out.println("Hai");
    F:\Tomcat5\webapps\Ambika\WEB-INF\Classes>javac -d F:\Tomcat5\webapps\Ambika\WEB-INF\Classes\Test.java
    javac: no source files
    Usage: javac <options> <source files>
    where possible options include:
    -g Generate all debugging info
    -g:none Generate no debugging info
    -g:{lines,vars,source} Generate only some debugging info
    -nowarn Generate no warnings
    -verbose Output messages about what the compiler is doing
    -deprecation Output source locations where deprecated APIs are u
    sed
    -classpath <path> Specify where to find user class files
    -cp <path> Specify where to find user class files
    -sourcepath <path> Specify where to find input source files
    -bootclasspath <path> Override location of bootstrap class files
    -extdirs <dirs> Override location of installed extensions
    -endorseddirs <dirs> Override location of endorsed standards path
    -d <directory> Specify where to place generated class files
    -encoding <encoding> Specify character encoding used by source files
    -source <release> Provide source compatibility with specified release
    -target <release> Generate class files for specific VM version
    -version Version information
    -help Print a synopsis of standard options
    -X Print a synopsis of nonstandard options
    -J<flag> Pass <flag> directly to the runtime system
    F:\Tomcat5\webapps\Ambika\WEB-INF\Classes>
    Plz help me.
    thanks in advance
    Ambika

  • How to compile and creat JAR with native function

    Hi there,
    I wrote some native function for J2ME. But it seems like using J2ME wireless Toolkits, we can not compile native function. Is it right?
    Is anyone knowing how to compile and make JAR with J2MEWTK or command line?
    Thanks,
    Merry Christmas!!

    [zack327],
    JNI like or native interfaces APIs is not supported in the CLDC/MID Profile 1.0 specification. If you have J2ME code that includes JNI code, the J2MEWTK tool will not compile successfully for you.
    To package the compiled code to a MIDlet suite .jar file, use the 'Package' command in the J2MEWTK toolkit. It is found on the top menu bar 'Project' option as item on the dropdown list.
    To package the MIDlets into a MIDlet suite .jar file from the command line, you can execute the usual jar file command:
    jar cf MyMIDletSuite.jar Midlet.class
    You will also need to create a MIDlet .jad Application Descriptor file as well.
    HTH.
    Allen Lai
    Developer Technical Support
    SUN Microsystems
    http://www.sun.com/developers/support/

  • How to call a BAPI in EJB application

    Hi ,
    I need to develop an webservice that takes data from a BAPI and insert in to ORACLE database. I think webservices can be created through EJB application.
    I am not having idea regarding how to call an BAPI in EJB application. can anyone help me out in this.
    Regards,
    Laxmi.

    Hi,
    you can use JCO Connection,
    look this
    [https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/fcadaf90-0201-0010-4091-bd0bcd7b7f6a]
    Regards,
    Matteo

  • How to compile and run a .java file from another java program

    hello,
    can any one tell me how to compile and run a *.java* file from another java program which is not in same directory?

    Well a smarter way of implementing this is by using a solution provided by Java Itself.
    If you are using J2SE 6.0+ there is an in built solution provided along with JDK itself and inorder to go ahead with solution the below are set of API which you;d be using it for compiling Java Programs (Files)
    http://java.sun.com/javase/6/docs/api/javax/tools/package-summary.html
    How do i do that ??
    Check out the below articles which would help you of how to do that
    http://www.ibm.com/developerworks/java/library/j-jcomp/index.html
    http://www.javabeat.net/javabeat/java6/articles/java_6_0_compiler_api_1.php
    http://books.google.com/books?id=WVbpv8SQpkEC&pg=PA155&lpg=PA155&dq=%22javax+tools%22+compiling+java+file&source=web&ots=XOt0siYe-f&sig=HH27ovuwvJgklIf8omTykUmy-eM
    Now once we are done with compilation.In order to run a Specific class all you ought to do is create an object and its specific methods of a specified class included in the CLASSPATH which you can manage it easily by usage little bit reflections.
    Hope that might help :)
    REGARDS,
    RaHuL

  • How to compile a package with classess

    Hi,
    Can any one tell me , how to compile a package ?
    Actually, i have three classes under the package named as linklist.
    i am unable to compile the classes under this package ? its always raising errors. saying that the package does not exist.
    Can any one tell me, why it is like this ?
    thanks in advance

    Hi,
    Can any one tell me , how to compile a package ?I'll try.
    Actually, i have three classes under the package named
    as linklist. Okay, so you have the package statement at the top of each class, right?
    And the 3 classes reside in a folder named linklist?
    Okay, if you do, while in the folder above linklist, do:
    javac linklist/*.java (using the appropriate slash)
    Did it work?

  • How to compile and register a Java CFX tag with multiple class files?

    All-
    If this is the wrong forum for CFX questions, please let me
    know.
    I need to determine how to compile and register a Java CFX
    tag that contains multiple class files. One class file implements
    the CustomTag interface and the other class files implement various
    supporting classes. All of the documentation that I have found
    talks about using a single class file. I am assuming that a JAR
    file will be involved, but I am not sure of the specifics.
    Thanks in advance for your help.
    -Josh

    Yes, it will involve a jar. Use your java IDE (eclipse,
    etcetera ..) to create a jar containing all of the classes. Check
    your ide's documentation for how to create jar files. After you
    have created the jar, place the jar in the CF class path so CF will
    recognize it. For example the {cf_root}/WEB-INF/lib directory. CF
    must be restarted before it will detect the new jar. After
    restarting CF, register the CFX tag in the ColdFusion Administrator
    using the name of the class that implements the CustomTag
    interface.
    Though it is worth noting you can also instantiate java
    classes directly from ColdFusion (ie without using a CFX
    tag).

  • How to compile and execute lex,yac,c and java programs

    its the 3rd day on my New MacBook pro..
    as i just migrated from windows to mac i love to work on this..
    The main problem  is i DON't know .......
    how to compile and execute
    1) lex and yac programs
    2) c program
    3) java program
    so please help me
    THIS is the error i got   a1.l is a program
    i got the same error when i used  gcc
    $ lex a1.l
    $ cc lex.yy.c                                 
    Undefined symbols:
      "_yywrap", referenced from:
          _yylex in cc8QDQjW.o
          _input in cc8QDQjW.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status

    Is the problem that you don't know how to compile and execute these programs on a Mac, or just that you don't know how to compile and execute them?
    Mac OS X is really just a version of BSD Unix, as far as programs like like bison, flex and gcc are concerned...and even when Apple specific versions are provided in the Developer Tools, there are symlinks in the usual places in the Unix file hierarchy.
    For problems with lex and yacc, I suggest you start with their own references, for example, here.
    Or you could just use %option noyywrap, if you only have one file to scan.
    Or you could link to libfl.a using -lfl and use the default version from that library.
    But you really should (as Keith Barkley was subtly hinting at) learn how these tools work and why they work that way.

  • How to compile and run java files on a mac using command line?

    can someone tell me or link me to some article on how to compile and run java files from command line on a mac? I have mac OS X leopard

    What do you mean by "where to put them" ? What do you want to put anywhere ?
    Have you read Peter's comment in brackets ? Perhaps you have a classpath problem ?
    Edited by: Michael_Knight on Aug 31, 2008 4:23 AM

  • How to compile and execute programing languages

    its the 3rd day on my New MacBook pro..
    as i just migrated from windows to mac i love to work on this..
    but i my main problems is i DON't know .......
    how to compile and execute
    1) lex and yac programs
    2) c program
    3) java program
    so please help me
    THIS is the error i got   a1.l is a program
    i got the same error when i used  gcc
    $ lex a1.l
    $ cc lex.yy.c                                  
    Undefined symbols:
      "_yywrap", referenced from:
          _yylex in cc8QDQjW.o
          _input in cc8QDQjW.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status

    You're trying to build something that depends on a library you don't have, or haven't referenced. This sort of question belongs in the Developer forums.
    Developer Forums: Apple Support Communities

  • How to compile all package body using sqlplus ?

    hi all,
    How to compile all package body using sqlplus ?
    Please help.
    Amy

    dbms_utility.compile_schema will compile all the invalid objects in a schema, including the invalid package bodies. If you only want to compile the invalid package bodies, you could write your own dynamic SQL stored procedure to do that using the user_source view, but that's a lot more effort for a very minimal benefit.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • How to compile and publish after modified a .java file?

    Hello,
    I am a newbie to Business Object. I am now working on a server that installed BusinessObjects Enterprise, to develop and run BO reports. I need to edit some java codes of the InfowView. I found that there are some .java, .class, .jar files under the installed folder. I know that it is a struts framework and I can find which .java file to edit, but I don't know how to compile and publish the codes. Is it necessary to install any development tool to do it?
    Regards,
    Philip

    Since you are using CSV, you can read a line at a time and then use String.split() on it. One you have it split, you upload to your DB using JDBC or if your in the MS world and cannot get a JDBC driver, then use the JDBC/ODBC bridge.

  • How to compile and run java program at command console

    hi there
    can anyone tell me how to compile and run a java program at command console? I have installed JRE 1.3.1, and also have installed JBuilder 5 if it helps.

    try this
    System.out.println("Enter your Name : ");
    BufferedReader console = new BufferedReader( new InputStreamReader( System.in ) );
    String s = console.readLine();
    System.out.println("Hello : "+ s+" !" );

Maybe you are looking for

  • How do I get music bought on an old damaged iPhone onto my new iPhone?

    Hi Guys, I'm hoping someone can help me with this... I had an iPhone 3GS but my 3.5yr old dropped it into a pool of water about 2 months ago. When it was damaged it had about 12/15 songs I had bought on iTunes on the handset but never synched to my M

  • How to print my SQL Report

    Hi all, I want to print the SQL Report returned from a simple query returning 5 columns, and n number of rows. I don't want to use Oracle BI Publisher as its needs licence to work with. Can anyone let me know which software i can use with my applicat

  • I have just got windows 8.1 laptop having probs

    hi can anyone help me i have just got windows 8.1 new laptop , i have downloaded itunes on it and it is all ok , but wen i connect my iphone 4s to it all it does is bleep and will not connect at all the laptop wont even reconize it , can anyone help

  • Mac Mini vs Mac Mini Server

    Hi I'm a Logic Pro User on a Late 2011 MBP. Wanting to switch to a Mac Mini or a MacMini Server Any reason why I should rather go for the Server option? Presumably if I did I could in theory have 3 macs connected to the MMS with all 3 users using Log

  • Exlusive-IP zone not plumbing all intfcs on system reboot

    Hi: I set up an exclusive ip zone with 2 network interfaces and 2 different ips. They are bge1 - 192.168.2.12 and bge2 - 192.168.1.116 I also have the hostname.bge1 and hostname.bge2 files set up with the respective host names from the /etc/hosts fil