J2sdk 1.4.2_04 NoClass DefFoundError

Hi,
This is a common error for many people but I still could not find a solution.
I installed a J2SDK1.4.2_04 on XP. Then it created 2 directories:
c:/j2sdk1.4.2_04 (all java tools in bin are inside)
c:/Program Files/Java/j2re1.4.2_04 (librarys includes rt.jar are inside)
Then I had a Java program called Hello.java created as in e:/java/homework/Hello.java
Then I set path, classpath and java home under Control Panel -> System -> Advanced -> Environment Viriables -> System variables
PATH:
%PATH%;c:\j2sdk1.4.2_04\bin;e:\java\homework
CLASSPATH:
.;%CLASSPATH%;e:\java\homework;c:\Program Files\Java\j2re1.4.2_04\lib\rt.jar
JAVA_HOME:
c:\j2sdk1.4.2_04
When I compile the file anywhere, for example, e:\javac e:\java\homework\Hello.java
it succeeded and generated a class file in e:\java\homework\Hello.class
it means the path was set correctly.
When I run the file in the same folder as e:\java\homework\java Hello
it showed "Hello World" correctly.
Here is the problem:
When I run the file in the other folder such as e:\java e:\java\homework\Hello
it showed:
Exception in thread "main" java.lang.NoClassDefFoundError: e:\java\homework\Hello
When I run again using an option to show steps: e:\java -verbose e:\java\homework\Hello
it showed a long list of steps. The "Exception..." error message was shown after the step:
[Loaded java.net.MalformedURLException from c:\Program Files\Java\j2re1.4.2_04\lib\rt.jar]
Anyone please help to solve this problem. I also tried the same thing on RedHat 9 with the same version of j2sdk1.4.2_04, and I also got the same problem.
Please please help...

Then I set path, classpath and java home under Control
Panel -> System -> Advanced -> Environment Viriables
-> System variables
PATH:
%PATH%;c:\j2sdk1.4.2_04\bin;e:\java\homeworkIf that is the actual value of your PATH environment variables when viewed under Control Panel > System > Advanced > Environment Viriables > System variables, then you may have screwed a few things up. Restore it to its original value (if you know what that was), and put "c:\j2sdk1.4.2_04\bin;" on the front of it. You do not need e:\java\homework on your path. If it doesn't really have %PATH% in it, but instead has some other stuff, then just remove e:\java\homework from the end.
CLASSPATH:
.;%CLASSPATH%;e:\java\homework;c:\Program
Files\Java\j2re1.4.2_04\lib\rt.jarIf I were you, I'd just set my classpath to ".;"
You do not need c:\Program Files\Java\j2re1.4.2_04\lib\rt.jar on it, and can specify e:\java\homework when running your java apps. If the value you've posted is the actual value shown under Control Panel > System > Advanced > Environment Viriables > System variables, then you should remove the "%CLASSPATH%"
JAVA_HOME:
c:\j2sdk1.4.2_04
When I run the file in the other folder such as
e:\java e:\java\homework\Hello
it showed:
Exception in thread "main"
java.lang.NoClassDefFoundError: e:\java\homework\HelloGood. Because you do not have a class on your classpath called e:\java\homework\Hello - you have one called Hello, so the same command you used earlier should work.
But, if like I suggested your classpath is now just .;, then you should specify the classpath on the command line when executing the app, by using java -cp e:\java\homework Hello

Similar Messages

  • Java Printing in j2sdk 1.4.2_04

    Configuration:
    ===========
    S.O.: Windows 98 SE
    RAM: 256
    Procesador: AMD DURON 800
    Printer jobs: 50
    Error:
    ====
    no free system resources
    Problem:
    =======
    The following code run ok in jdk 1.3, and is not run correctly in jdk 1.4.2_04
    import java.awt.*;
    import java.awt.print.*;
    import java.awt.geom.*;
    import java.lang.Object.*;
    public class ImprimirDriverW {
    public static void imprimir (String[] albaran,boolean ez4plus,boolean citizen){
    // Creamos un objeto de impresi�n.
    PrinterJob job = PrinterJob.getPrinterJob();
    PageFormat formato = new PageFormat();
    Paper papel = new Paper();
    papel.setSize(250,290);
    papel.setImageableArea(26,0,240,290);
    formato.setPaper(papel);
    Printable miObjeto = new ObjetoAImprimir(albaran);
    job.setPrintable(miObjeto,formato);
    try {
    job.print();
    }catch (PrinterException e) { System.out.println("Error de impresi�n: " + e); }
    class ObjetoAImprimir implements Printable{ 
    //CONSTRUCTOR
    public ObjetoAImprimir(String[] albaran){
    this.albaran=albaran;
    public String[] albaran;
    public int x=100;//f.getImageableX();
    public int y=100;//f.getImageableY();
    public int x1=100;//getImageableWidth();
    public int y1=100;//getImageableHeight();
    public void setPlantilla(Graphics2D g){
    g.drawLine(x,y+40,x+50,y+40);
    g.drawLine(x1-60,y+40,x1,y+40);
    g.drawLine(x,y+85,x1,y+85);
    public int print (Graphics g1, PageFormat f, int pageIndex){
    //Creamos un objeto 2D para dibujar en el
    Graphics2D g = (Graphics2D) g1;// en g1 pintamos la etiqueta
    String pE = String.valueOf(f.getImageableX());
    x=Integer.parseInt(pE.substring(0,pE.lastIndexOf('.')));
    pE = String.valueOf(f.getImageableY());
    y=Integer.parseInt(pE.substring(0,pE.lastIndexOf('.')));
    pE = String.valueOf(f.getImageableWidth());
    x1=Integer.parseInt(pE.substring(0,pE.lastIndexOf('.')));
    pE = String.valueOf(f.getImageableHeight());
    y1=Integer.parseInt(pE.substring(0,pE.lastIndexOf('.')));
    switch (pageIndex){
    case 0 :
    g.setColor(Color.black);
    x1=x1+x;
    y1=y1+y;
    g.setStroke(new BasicStroke(0.2f));
    g.setFont(new java.awt.Font("Arial",0,8));
    setPlantilla(g);
    setValores(g);
    g.setStroke(new BasicStroke(1f));
    return PAGE_EXISTS; //La p�gina 1 existe y se imprimir�
    default:
    return NO_SUCH_PAGE; //No se imprimir�n m�s p�ginas
    Thanks in advance.

    >
    I am printing 50 jobs in windows 98 SE.and when the 50 jobs are done and printed and the printer queue is empty and the Java program has exited - that's when you look at the system resources? Or is your Java app still alive?
    The Java GC helps you with memory management, but other system resources like file handles, threads, etc. are YOUR responsibility. Maybe it's your code that it's cleaning up after itself properly.
    After i see in My Computer -> Propertiers
    In last tab "performance":
    RAM: 128
    Free resources system: 30%This doesn't tell me exactly what "system resources" are, but that's not your fault.
    Sorry, I'm spanish and my windows 98 is in Spanish. Do you understand me?I think I understand the question, but I don't have an answer.

  • Uncaught exception: java.lang.NoClass DefFoundError

    I continue to receive this. I updated myBB and lost app world icon. I have tried to reinstall and get 'already exists' and tried to replace and I get above answer. I tried to delete app world from advanced options but it is not there. Also my headphone does not work. My screen also freezes on a regular basis, have to pull the battery each time. I'm just frustrated and hope these problems go away very soon. Thank

    You need to backup. Big time.
    Since you can't get to AppWorld, you can't install BlackBerry Protect from there.
    So you need to backup, using the USB to the PC, etc., so you don't lose all your info on the device.
    And, the next step is to wipe your device and reload the Operating System... and you'll need the USB cable for that too.
    Meanwhile, did you look in the Applications list like I asked?
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • J2sdk-1_4_2_04-windows-i586-p.exe didn't install JRE correctly.

    I realize that j2sdk-1_4_2_04-windows-i586-p.exe didnt install JRE probably.
    Server folder which is used for Java HotSpot Server VM was not found in C:\Program Files\Java\j2re1.4.2_04\bin.
    Hence, i need to manually copy the folder D:\j2sdk1.4.2_04\jre\bin\server to JRE location.
    I was wondering is this the correct way to do so? anyone of u have encounter this problem before?
    thank you.
    regards
    yancheng

    If a previous version of the JRE is installed, remove the previous JRE and install the j2sdk 1.4.2_04 JRE.

  • Uncaught exception: java.lang.​NoClass DefFoundEr​ror ror

    Hello I am running on the bb bold 9700. I have os 5. Ever since the latest update on the blackberry app world, it has not worked properly. First off it did not even show. I looked under the applications and I deleted it from there, then reinstalled it. Once I restarted my bb, the error came up with Uncaught exception: java.lang.NoClass DefFoundError. Then I still did not see app world again. Any ideas what there is to do?

    I have exactly the same problem in exactly the same circumstances.   Can anyone please help??

  • J2sdk vrs j2ee

    dear readers,
    i'm running j2sdk 1.4.2_04 on red hat enterprise linux AS v. 3 for x86.
    when i try to compile a servlet using ant 1.6.2, the process bails because it cannot find the default package 'javax.servlet'. should this package be included with my j2sdk installation?
    i guess i'm a bit confused about the differences between j2sdk and j2ee. j2sdk is a subset of the j2ee 1.4 sdk (along with some samples, docs, and the app server). i've snooped around the forums a bit and saw some references to needing 'j2ee.jar' and 'javax.jar', but these are not on my system.
    any thoughts?
    thanks,
    aaron

    The package javax comes with j2ee sdk and not with j2sdk.
    The j2ee.jar , javax.jar files are present in the lib directory under J2EE_HOME directory.
    If you have installed the sdk correclty, you should find them. Try adding the path to these jar files in the classpath enviornment variable and then try running ant.
    Are you working on JSP and servlets only? If yes then you could opt for Tomcat server also. It can handle them easliy and also require less reources as compared to the j2ee app server.
    regards,
    Manish

  • SocketChannel.write() on J2SDK1.4.2_04/Windows 2000

    Hello,
    I have a question regarding SocketChannel.write() (as I mentioned before, I am using J2SDK 1.4.2_04 on Win 2000 pro).
    I prepared a ByteBuffer with some binary data. When I invoke SocketChannel.write(), the other application receives the data only until the first null (byte = 0) character is found??? What am I doing wrong??
    Thanks.

    On the other side, I get the message
    Read: ZYKT
    (only the first 4 bytes of the message)
    I experimented adding more non-null characters and the
    result was
    Read: ZYKT08@AYes, but (again) what does the CODE look like? Maybe it's written incorrectly to stop when it gets a null byte. Or maybe it stuffs it into a C-style char array (which is null-terminated by convention) and just happens to print up to the null (as C-style char array functions are designed to do). Or, who knows? You're not showing what that client process looks like.

  • JDev 10.1.3 compile error in servlet 2.4 web.xml

    I built a Servlet 2.4/JSP 2.0 application in JDev 10.1.3. When I try to make/compile/deploy it the compiler gives me errors like the following for every JSP file that has a JSTL 1.1 taglib:
    Error(2,9): Element "web-app' used but not declared
    Error(2,63): Attribute 'xmlns:xsi' used but not declared
    Error(3,103): Attribute 'xsi:schemaLocation' used but not declared
    Error(4,16): Attribute 'version' used but not declared
    Error(4,56): Attribute 'xmlns' used but not declared
    Error(4,57): Can not build schema 'http://java.sun.com/xml/ns/j2ee' located at 'http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd'
    Error(5,15): Element 'description used but not declared
    It is obviously havng problems with the web.xml file (which is in the servlet 2.4 format) and is probably not finding the web.xml DTD document. How do I fix it?
    Installation is on Solaris 9 using J2SDK 1.4.2_04-b05
    By the way, this system is on a disconnected network. How do I get JDeveloper updates for a system not connected to the Internet?

    Allen,
    A JSP with web.xml web-app element
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee">
    runs in JDeveloper 10.1.3
    thanks,
    Deepak

  • Error while running HelloWorld.class

    i am new in java. please guide me.
    i have made Helloworld.Java file
    public class HelloWorld
    public static void main(String[] args)
    System.out.println("Hello Java World!");
    and compile it using following command
    e:\javawork>javac HelloWorld.Java
    no message and prompt appeared.
    but when i want to show by using following command
    e:\javawork>java HelloWorld
    Exception in thread "main" java.lang.NoClass DefFoundError: HelloWorld ..... ??

    Hi faisal_Sharif,
    Exception in thread "main" java.lang.NoClass DefFoundError: HelloWorld/javaoccurs because java didn't find HelloWorld.class which is not genertated when you given javac HelloWorld.java command.
    As Aakash has given a link... hope it will help you.
    But I have a small doubt:
    If the path is not set than instead of following exception:
    Exception in thread "main" java.lang.NoClass DefFoundError: HelloWorld/javafollowing exception should come:
    'java' is not recognized as an internal or external command, operable program or batch file.on Windows OS.

  • Classpath and path of jdkjdk-1_5_0_09

    hi
    i have installed c:\progrmaefiles\java\ jdk-1_5_0_09 on my pc but i m not able set systemenvironment variable like PATH and CLASSPATH .i tried lot of option but it does not work so plz anyone help me out.i m using windows Xp operating system. when i m running any java programe i m getting error " Exception in thread "main" java.lang.NoClass.DefFoundError.plz hep me out.
    thx manu

    That's CLASSPATH, not PATH.
    Without seeing your exact directory structure and the exact command you're runing, nobody can give you specific advice. Here are some explanations of how it works, though.
    Javapedia: Classpath
    How Classes are Found
    Setting the class path (Windows)
    Setting the class path (Solaris/Linux)
    Understanding the Java ClassLoader
    java -cp .;<any other directories or jars> YourClassNameYou get a NoClassDefFoundError message because the JVM (Java Virtual Machine) can't find your class. The way to remedy this is to ensure that your class is included in the classpath. The example assumes that you are in the same directory as the class you're trying to run.
    javac -classpath .;<any additional jar files or directories> YourClassName.javaYou get a "cannot resolve symbol" message because the compiler can't find your class. The way to remedy this is to ensure that your class is included in the classpath. The example assumes that you are in the same directory as the class you're trying to run.

  • Where to get 1.4.2._04 JVM?

    Sun had a maintainence release 1.4.2._04 on March 10, 2004. However, the official download site for 1.4 J2SE (http://java.sun.com/j2se/1.4.2/download.html) still points to the previous version 1.4.2_03.
    What's more confusing is that, when I did a google search on 1.4.2_04 SDK download, google has a "cached" page which DOES point to 1.4.2_04 (the google cache timestamp is March 22). It seems that Sun has published 1.4.2_04 download at one time, but later reverted back to 1.4.2_03.
    Does anybody know where to get official 1.4.2_04 J2SE SDK, or when it will be available for public download? Is it stable?
    Also, I downloaded 1.4.2_04 SDK following Google's cached page:
    http://66.102.7.104/search?q=cache:anGj0_-PWb4J:java.sun.com/j2se/1.4.2/download.html+j2sdk+1.4.2_04+download&hl=en&ie=UTF-8. Is this the official version?
    Anyone with 1.4.2_04 VM experiences please share your opinions.
    Thanks.
    Yan

    Yeah, it was there last week, but it seems to have vanished :-(
    There is a discussion about it's disappearance here:
    http://forum.java.sun.com/thread.jsp?forum=17&thread=506253&tstart=0&trange=15
    And it has been spotted by javalobby too:
    http://javalobby.org/
    http://javalobby.org/thread.jspa?forumID=61&threadID=11985
    I hope Sun clear this up... And I also hope that this is a website problem, not a problem with _04 :-(

  • Null Pointer Exception using JDBC-ODBC bridge on Linux

    Wonder if anyone can help me with this one?
    I am attempting to use the JDBC-ODBC bridge on Fedora with J2SDK 1.4.2_04, however I am getting a NullPointerException whenever I get the connection. I can get the JDBC connection to work but it is a requirement that ODBC be used.
    The code is as simple as it can get.
    import java.sql.*;
    public class TestClass
       public static void doConnection()
          try
               Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
               Connection cn = DriverManager.getConnection("jdbc:odbc:DB");
          catch (Exception e)
               e.printStackTrace();
       public static void main(String[] args)
          doConnection();
    }Running this program using java -verbose TestClass I get the following output.
    [Loaded sun.jdbc.odbc.JdbcOdbc from /usr/java/j2sdk1.4.2_04/jre/lib/rt.jar]
    [Loaded java.lang.UnsatisfiedLinkError from /usr/java/j2sdk1.4.2_04/jre/lib/rt.jar]
    [Loaded java.sql.SQLException from /usr/java/j2sdk1.4.2_04/jre/lib/rt.jar]
    [Loaded java.sql.SQLWarning from /usr/java/j2sdk1.4.2_04/jre/lib/rt.jar]
    java.lang.NullPointerException
    [Loaded java.lang.StackTraceElement from /usr/java/j2sdk1.4.2_04/jre/lib/rt.jar]
    at sun.jdbc.odbc.JdbcOdbcDriver.initialize(JdbcOdbcDriver.java:436)
    at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:153)
    at java.sql.DriverManager.getConnection(DriverManager.java:512)
    at java.sql.DriverManager.getConnection(DriverManager.java:193)
    at TestClass.doConnection(TestClass.java:13)
    at TestClass.main(TestClass.java:96)
    [Loaded java.lang.Shutdown from /usr/java/j2sdk1.4.2_04/jre/lib/rt.jar]
    [Loaded java.lang.Shutdown$Lock from /usr/java/j2sdk1.4.2_04/jre/lib/rt.jar]
    The UnsatisfiedLinkError suggests to me that a library cannot be found, but I don't know what library.
    As far as I know I have configured ODBC correctly. I can achieve connectivity to my database using other tools and I still get this same error irrespective of whether the DSN is valid or not.
    I have installed the unixODBC rpm.
    Any help/insite would be greatly appreciated.

    This is the output of ldd. Everything appears to be resolved.
    linux-gate.so.1 => (0x00cf5000)
    libodbcinst.so => /usr/sybase/lib/libodbcinst.so (0x001d5000)
    libjava.so => libjava.so (0x008af000)
    libjvm.so => /usr/java/j2sdk1.4.2_04/jre/lib/i386/client/libjvm.so (0x002a7000)
    libc.so.6 => /lib/i686/libc.so.6 (0x00d77000)
    libdbtasks7.so => /usr/sybase/lib/libdbtasks7.so (0x00eb2000)
    libdl.so.2 => /lib/libdl.so.2 (0x00111000)
    libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++-libc6.2-2.so.3 (0x00115000)
    libm.so.6 => /lib/i686/libm.so.6 (0x008fb000)
    libverify.so => libverify.so (0x0016e000)
    libnsl.so.1 => /lib/libnsl.so.1 (0x00180000)
    libpthread.so.0 => /lib/i686/libpthread.so.0 (0x006d0000)
    /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00157000)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00b75000)
    The ODBC is a Sybase driver and is loaded from elsewhere. I will check for any known compatibility issues.

  • Custom Taglets and static class fields/methods...

    Hey all,
    I have a curiosity question (running winxp + j2sdk 1.4.2_04).
    I have written a few stand-alone and inline taglets to help me document my code. I had some problems initially getting the HTML to output correctly (and I don't know how to run javadoc in the debugger) so I wrote a simple class with only static methods/members that tracks the nesting level of the current tag and allows me to pad (prefix) the output based on the nesting level (rudimentary I know). I wasn't sure if the javadoc process was multi-threaded or not, so all methods are synchronized.
    My problem is that the static initializer is being called 6 different times during the execution of javadoc.exe, resulting in what I would term as 6 "static" instances. Now, the only reason I can think of for this is that it is spinning off new process for each type of taglet it encounters. However, processing seems sequential and I don't see any other processes in Windows Task Manager. Here is the static initializer code:
         static {
              ic = new IndentControl();
              System.out.println("static: " + Thread.currentThread() + " ic instance: " + ic);
    and here is the output of javadoc.exe:
         static: Thread[main,5,main] ic instance: ndstest.util.javadoc.IndentControl@33c78b
         Registered Taglet ndstest.util.javadoc.MandatoryTaglet ...
         static: Thread[main,5,main] ic instance: ndstest.util.javadoc.IndentControl@6c137c
         Registered Taglet ndstest.util.javadoc.OptionalTaglet ...
         static: Thread[main,5,main] ic instance: ndstest.util.javadoc.IndentControl@1104da7
         Registered Taglet ndstest.util.javadoc.MemberInlineTaglet ...
         static: Thread[main,5,main] ic instance: ndstest.util.javadoc.IndentControl@6745b9
         Registered Taglet ndstest.util.javadoc.DescriptionInlineTaglet ...
         static: Thread[main,5,main] ic instance: ndstest.util.javadoc.IndentControl@10a14ad
         Registered Taglet ndstest.util.javadoc.ExampleTaglet ...
         static: Thread[main,5,main] ic instance: ndstest.util.javadoc.IndentControl@1afe460
         Registered Taglet ndstest.util.javadoc.ToDoTaglet ...
    Why does the static initializer get called 6 different times? It's mildly annoying and I want to understand why and if it is something I am doing to cause this.
    Thanks!

    Well, have you ever taken a look at the implementation of the Standard doclet? (Its source code is part of the SCSL distribution.)
    The current implemenatation uses a TagletManager to handle/store/load custom taglets.
    For each -taglet option, method addCustomTag of this TagletManager is called.
    This method creates a new instance of UrlClassLoader and uses loadClass( className ) to load the taglet each time it is called.
    So, each of your six taglets is loaded through/in a different ClassLoader context, therefore the static init block is executed six times.

  • Applet server vm

    Is there any way to use the Server VM in an applet?
    I am currently trying to run a java applet in both IE6 and firefox on windows 2000 with the jre from j2sdk-1.4.2_04. on the command line,
    "java -version" outputs
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
    Java HotSpot(TM) Server VM (build 1.4.2_04-b05, mixed mode)
    and I disabled the client version altogether, so running
    "java -client" outputs
    Error: client VM not supported
    However, when running the applet, the java console indicates that the VM being used is the client VM:
    Java(TM) Plug-in: Version 1.4.2_04
    Using JRE version 1.4.2_04 Java HotSpot(TM) Client VM
    the same thing happens regardless of the command line options passed to the jre through the java plugin
    Is there something preventing the applet/java plugin from using the server vm?
    --sam                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    note: the only way it seems possible at all is to copy the server jvm.dll into the client directory intead of the client one. however, this is obviously not a solution.
    it seems that the plugin refuses to even load the server dll.
    --sam                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • J2EE DeployTool

    Hello Guys
    I just started learning J2EE this week 23rd Spet 2004. I have gone throught the tutorial on installing J2EE 1.4 running J2sdk 1.4.2_04. I have managed to run and execute the Hello program apened parameter name typed in. I have also learn to start and stop cloudspace. Now I am trying to run the dukes bank application. I have used asant to build the files and have created a build folder. I want to deploy the EJB, JAR, WAR into an EAR using deploytool provided with the J2EE 1.4 I am not very quit clear with the tutorial provided with the installation guide. Could anyone please help me to showing me how to package these files and create EAR.
    Is it necessary to learn how to write build.xml? If so could someone point me out to a resource that talks about the tags and their jobs in the application.

    The only help in deploytool will help you to understand the tabs within the gui.
    I would suggest that you utilize the provided-ears within the J2EE tutorial which have been fully configured and review their settings in deploytool. Just open one of the modules with deploytool and review the settings.
    the tutorial utilizes ant for ease of use, but you could certainly just use deploytool to create your component

Maybe you are looking for