Regarding with packages

sir,
I want to know all the packages regarding with the servlets.
For Example, when I type javap java.lang.servlet
intthe comand prompt It is giving error.
Will U help me with the examples?

http://java.sun.com/j2ee/1.4/docs/api/index.html

Similar Messages

  • Select query with package size

    Hi ,
          i am trying to use select qurey with package size , to limt the data fetching .
    Can any one gives sqample code or idea select query using 'package size'.
    Advance Thanks,
    Regards
    veera

    Hi,
        SELECT vbeln erdat
        FROM vbak
        INTO TABLE li_vbak PACKAGE SIZE 50.
         SELECT posnr matnr meins
          FROM vbap
          INTO TABLE li_vbap
          FOR ALL ENTRIES IN li_vbak
          WHERE vbeln = li_vbak-vbeln.
    Hi i want  to select only from vbeln ,ie single selct query only using pakage size.200,blocks in data base ..How ?
    Regards
    veera

  • Table CI_EEW_CMG_CAT_ATTR_LIS can't be created with package ZZCRM

    Hi,
       I am trying to add an attribute to category object through EEWB. However, when i complete the EEWB wizard, I get the below error.
    "Table CI_EEW_CMG_CAT_ATTR_LIS can't be created with package ZZCRM."
    I have verified the setting so of the package zzcrm. I could not find anything wrong.
    Please let me know if you have faced this issue before.
    Regards,
    Manas.

    Hi,
    Go to opportunity table and create a customizing include CI of type cI_eew_orderadm_h and this should solve your problem.
    regards,
    Murali.Chatna

  • Appletviewer not compitable with Package

    Hi All,
    I have created a package javaProg.completeReferance. and use this same package to execute all of my java application however when I try to execute an applet it complains.this is how I execute applet.
    appletviewer javaProg.SimpleApplet.html (or .class), but when I remove all the packages statement and go to the current Dir it executes perfectly . So can I concule that appletviewer is not complitable with packages.
    below is the simple code. Any help is highly appreciated.
    package javaProg.completeReferance;
    //<applet code="SimpleApplet.class" width="200" height="200"></applet>
    import java.applet.Applet;
    import java.awt.*;
    public class SimpleApplet extends Applet
         public void paint(Graphics g)
              g.drawString("Hello World",20,20);
    }

    I am using window vista and I read somewhere that
    vista and java together , in the Applet programhave
    few bugs.
    Regards!Your chance of finding a true Java bug increases as
    your java experience increases. On the other hand,
    99.999% of 'bugs' reported by newbies are actually
    bugs in the newbie's own code.sorry about that actually Java rocks.I am preparing for my SCJP , Can you please tell me is the exam very difficult to crack and also how much time is actually required for a noviceto crack this .This will be very helpful for me as I can plan according.
    Thanks in advance!!

  • Compilation with packages is different in J2SE 1.4.1 ?

    Hi there !
    I've just installed J2SE 1.4.1_01 in my Win NT 4.0 computer.
    Some of the files that belong to packages compiled just fine with JDK 1.2.2 but don't compile with J2SE 1.4.1_01.
    The same is true when I try to compile Java2D in the demo\jfc directory.
    In project NumberFormatTest I have the following classes:
    =====================================================================
    d:\MyPrograms\Java\NumberFormatTest\NumberFormatTestFrame.java
    package NumberFormatTest;
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.*;
    import java.text.*;
    import java.util.*;
    import tools.*;
    public class NumberFormatTestFrame extends Frame
    implements ActionListener, KeyListener, WindowListener
    =====================================================================
    d:\MyPrograms\Java\Tools\JCTextField.java
    package tools;
    import java.awt.*;
    public class JCTextField extends TextField
    =====================================================================
    d:\MyPrograms\Java\Tools\JCDecimalTextField.java
    package tools;
    import java.text.*;
    import java.util.*;
    public class JCDecimalTextField extends JCTextField
    d:\MyPrograms\Java>javac Tools\JCTextField.java
    compiles OK
    d:\MyPrograms\Java>javac Tools\JCDecimalTextField.java
    does not compile successfully with the error,
    Tools\JCDecimalTextField.java:67: cannot resolve symbol
    symbol : class JCTextField
    location: class tools.JCDecimalTextField
    public class JCDecimalTextField extends JCTextField
    pointing to the J in JCTextField
    d:\MyPrograms\Java>javac NumberFormatTest\NumberFormatTestFrame.java
    also doesn't compile with with "cannot resolve symbol" errors, when it tries to use JCDecimalTextField.
    It seems to me that classes defined by me to extend another class defined by me (JCDecimalTextField) and inside a package (tools) aren't being found by javac.
    However JCTextField is defined by me, extends TextField (from java.awt.*), is inside package tools and compiles OK.
    This stuff didn't happen in JDK 1.2.2.
    What the hell has changed with J2SE 1.4.1 ???
    My PATH has C:\Program Files\jdk\bin (among other directories)
    My CLASSPATH is
    D:\MyPrograms\Java;C:\Program Files\jdk\lib\tools.jar;C:\Program Files\Java\j2re1.4.1_01\lib\rt.jar;.;
    I strongly suspect that something has changed after JDK 1.2.2 in the way packages are handled by javac. I've tried searching in forums and other sun java documentation but couldn't find an answer to my problem.
    Can anyone please help me ?
    Any hint, suggestion or Internet site with appropriate documentation, would be highly appreciated as a means to end this 2 day nightmare.
    Thanks in advance,
    MGoncalv

    This issue has already been solved.
    J2SE 1.4.1 is case sensitive with regard to package directories.
    My tools package files must in subdirectory tools (but not Tools).
    This problem didn't happened with JDK 1.2.2
    For more details please take a look at
    Cannot resolve symbol
    from Feb 10, 2003 11:46
    by MGoncalv

  • Issue with Packaged Jars added to project from resource Palette

    Hello!
    I am using Jdeveloper 11.1.2.2.
    I started this post thinking there was an issue having to do with packaging jars that refer to other libraries (see post Are Libraries Required?
    Now I realize it is a different issue (although that other post is relevant).
    Issue: I create a package -- a template in this case.
    I deploy it in my file system and then load it into the resource palette as a file system connection.
    I create a new application. From the resource palette, I add the jar to the view controller project, and am able to use the template in jsf files. No problem. Runs fine.
    then I load the application into subversion or I move the whole application to another directory on my computer.
    When I open the moved application (or do a checkout from subversion), I open the jsf that contains a reference to the jar, the design view is completely blank. Going to the source, I see my original code, but there are red signals in the upper-right signifying an error.
    If I run the application without fixing it, I get an error saying the template cant be found, Also, when I deployed to a standalone weblogic server, I get the same error (see the post above for this error).
    I open the project properties. The ADF Library is in the "Libraries and Classpath" and pressing edit, I can see the correct reference to the path of the jar.
    To make the application work, I have to remove the ADF Library (or at least the reference when pressing edit) and then from the resource palette, add it again to the project.
    IS THIS NORMAL? Am I doing something wrong with the initial packaging of the jar? Should I change some setting somewhere?
    How am I supposed to deploy to weblogic?
    The other posting shows an error output if I try to run the application before fixing the jar reference. I got the same darn error when deploying to weblogic.
    Would appreciate any help!
    Stuart
    Edited by: Stuart Fleming on Nov 18, 2012 4:45 AM

    Timo,
    thank you for your reply. I actually created a youtube video on this, available here: http://youtu.be/ERyLngq9hlI
    Since the video might be a little tedious to view, Here are the details. You can jump to the exciting parts of the video, if you want:
    Here is what I did:
    1. I cleaned out my system directory and the temp directory on my computer.
    2. Opened the application containing my template. Deleted the existing jar file.
    3. Started taking video....
    4. (From 40 seconds into the video) Created the jar file again.
    5. (2:55 minuts into video) Closed template applcation and Created new fusion application.
    6. (4 minutes into the video) Created model
    7. (4:15 minutes into video) in view controller added template, created a jsf page.
    8. (5 minutes into the video) Created Security and users.
    9. (6:30 minutes into the video) Created a task flow, with jsff in it, with a form on the jsff. Assigned Security to objects.
    *10. (7 minutes into the video). Ran JSF successfully.*
    11. (7:40 minutes into the video). Closed application. Copied the entire application into two directories.
    12. (8 minutes into video) Opened the first copied video. You can see that the jsf page is not accessing the template. Reviewed the View Controller project Libraries and classpath. Removed the library, re-added the jar from the resource palette. Worked fine.
    13. (9:30 minutes into video). Opened the 2nd copy of the file I intend for subversion. Showed the jsf page and the error it displays when open (same as in first copied application).
    Load application into subversion.
    14. (10 minutes into video). Check out application
    15. (10:15 minutes into video). Open JSF file. The reference to the template jar file is reading properly.
    16. (11 minutes into video). Load the original working copy into subversion.
    17. (11:30 minutes into video). Check out from subverion, but the check out failed.
    18. (12 minutes into video). Check out, and look at the jsf.  The page shows fine.
    Timo, I think this might be reported as a bug. You ought to be able to move files around on your computer. Also, the first time I checked the application out from subversion, the jsf page did not read the template.
    ALSO, when I tried to deploy the application (that contained the reference to the template jar file to weblogic), I got the same error when I ran the jsf
    first lines of that error:
    Error 500--Internal Server Error
    java.io.FileNotFoundException: /WEB-INF/ssfTemplate/SSFTemplate.jsf Not Found in ExternalContext as a Resource
    at com.sun.faces.facelets.impl.DefaultFaceletFactory.resolveURL(DefaultFaceletFactory.java:224)
    Thank you for your time and commitment!
    Stuart
    Edited by: Stuart Fleming on Nov 18, 2012 10:13 AM

  • Im having trouble with my ipad mini in regards with the icloud back up notification; if i press "ok" it doesnt dis appear, i couldn open my ipad/turn off because of this notification; whats the best way to get rid of this? please help

    im having trouble with my ipad mini in regards with the icloud back up notification; if i press "ok" it doesnt dis appear, i couldn open my ipad/turn off because of this notification; whats the best way to get rid of this? please help

    Have you tried a soft-reset ? Press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider if it appears), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • Report for all RAP advertisements with Package size.

    Hi,
    I have received a requirement to get the information about all the advertisements published in RAP along with package details like (Package Name/version/ and Package size).
    I have two different working reports, merging these two reports would suffice my requirements.
    Please help to merge below two reports.
    1.  
    SELECT DISTINCT p.PackageID, p.Name,p.Version, p.SourceVersion, 'Source Size (MB)' = n.SourceSize/1024
     FROM v_Package p
     LEFT JOIN
     v_PackageStatusRootSummarizer n
     ON
     p.PackageID = n.PackageID
    order by Name
    2.
    SELECT v_Advertisement.AdvertisementName,
    v_Advertisement.Comment, 
    v_Package.Name AS C062,
    ProgramName,
    v_Advertisement.SourceSite,
    CASE WHEN AssignedScheduleEnabled != 0 or
                                          (AdvertFlags & 0x720) != 0
    THEN '*'
    ELSE ''
    END AS C063,
    v_Collection.Name as C064, 
    CASE IncludeSubCollection
    WHEN 1 THEN '*'
    WHEN 0 THEN ''
    END AS C065,
    AdvertisementID
    FROM v_Advertisement 
    INNER JOIN v_Package ON v_Advertisement.PackageID = v_Package.PackageID
    INNER JOIN v_Collection ON v_Advertisement.CollectionID = v_Collection.CollectionID
    ORDER BY v_Advertisement.AdvertisementName
    The Lightning Khan

    SELECT
    p
    .PackageID,
    p.Name,p.Version,
    p.SourceVersion,
    'Source Size (MB)'
    = n.SourceSize/1024,
    v_Advertisement
    .AdvertisementName,
    v_Advertisement
    .Comment,
    p
    .Name
    AS C062,
    ProgramName
    v_Advertisement
    .SourceSite,
    CASE
    WHEN AssignedScheduleEnabled
    != 0
    or
    (AdvertFlags
    & 0x720)
    != 0
    THEN
    ELSE
    END
    AS C063, 
    v_Collection
    .Name
    as C064,
    CASE
    IncludeSubCollection
    WHEN
    1 THEN
    WHEN
    0 THEN
    END
    AS C065,
    AdvertisementID
    FROM v_Advertisement
    INNER
    JOIN v_Package p
    ON v_Advertisement.PackageID
    = p.PackageID
    INNER
    JOIN v_Collection
    ON v_Advertisement.CollectionID
    = v_Collection.CollectionID
    LEFT
    JOIN  v_PackageStatusRootSummarizer n 
    ON  p.PackageID
    = n.PackageID
    ORDER
    BY v_Advertisement.AdvertisementName
    John Marcum | Microsoft MVP - Enterprise Client Management
    My blog: System Center Admin | Twitter:
    @SCCM_Marcum | Linkedin:
    John Marcum

  • Calling with package "Unlimited world 1 month" got...

    Hello there,
    I called with package "Unlimited world 1 month" into the land-line in Germany got interrupted regularly. How can I solve this problem?
    Thank you in advance.
    Spring

    Hello there,
    I called with package "Unlimited world 1 month" into the land-line in Germany got interrupted regularly. How can I solve this problem?
    Thank you in advance.
    Spring

  • Problem when working with package???Please, help me!!!

    I got 3 .java files from one Java tutorial as follow:
    Server.java (in package mygame.server)
    Utilities.java (in package mygame.shared)
    Client.java (in package mygame.client)
    All the above files are placed in "E:\Java Programmes\source"
    After compiling, i got correspponding .class files:
    Server.class (placed in "E:\Java Programmes\class\mygame\server")
    Utilities.class (placed in "E:\Java Programmes\class\mygam\shared")
    Clients.class (placed in "E:\Java Programmes\class\mygame\client")
    But when i run Server.class which contains main method, i got error as follow:
    E:\Java Programmes>java class\mygame\server\Server
    Exception in thread "main" java.lang.NoClassDefFoundError: class\mygame\server\S
    erver (wrong name: mygame/server/Server)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    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)
    That was very puzzled for me. I cannot find out what wrong with my files. Please., any boby, help me!!! I always got this problem when working with package and managing files. Thanls a lot.

    java -cp "E:\Java Programmes\class" mygame.server.Server

  • Creating new folders with Package Maker during preinstall actions?

    I have figured out MOST of what I need to have a successful install package produced with Package Maker BUT... how do you create an empty folder? My application uses a few folders for archiving and scratch, but unless I add some text file to that path I can't figure out how to create the folder I need. I am only fluent in Applescript so I hope I can use that to create these folders but I will learn enough unix if need be. If it requires any other language to accomplish this task I guess I will have to go another route.
    Any ideas?

    It isn't part of PackageMaker at all. It is defined in "URL Types" in your application. See the source code to Bwana for a simple example.

  • How to remove files with package manager?

    CanI remove file with package manager
    For example if there is a file /apps/cq/ui/widgets/source/widgets/form/RichText.js in Author Instance A, then I delete RichText.js file using crxde.  Then I create a package remove_richtextjs.zip with filter /apps/cq/ui/widgets/source/widgets/form/
    Then I open another instance Author Instance B, there is an exact same file /apps/cq/ui/widgets/source/widgets/form/RichText.js.  Is it possible that if I apply remove_richtextjs.zip, an RichText.js will be removed from Author Instance B?
    Thanks

    You don't have to pay to remove files. Just drag them to the Trash and Empty the Trash.

  • Help! With Packages...I'm new & frustrated!

    In the following directory structure, I have 2 classes, a DBHandler class that hits a database and a GetData class uses the DBHandler class to get specific data. I want to put both of these into a WebSiteClasses package. When I try to package both of them to the WebSiteClasses package, the DBHandler class compiles just fine. But when I try to compile the GetData class (that uses the DBHandler class) I get an error stating the following:
    "cannot resolve symbol
    symbol : class DBHandler".
    My code for the two java files is below this directory structure. I'm rather new at this and any help would be greatly appreciated
    &#8230;
    - tomcat
    - bin
    - classes
            - WebSiteClasses
                    DBHandler.class
                    DBHandler.java
                    GetData.class
                    GetData.java
    - common
    - conf
    - lib
    - logs
    - server
    - temp
    - work
    =====================================================
    JAVA Files ------>>>>
    DBHandler.java:
    package WebSiteClasses;
    import java.sql.*;
    public class DBHandler{
         public ResultSet getData(String sql){
                   Connection cn = null;
                   Statement st = null;
                   ResultSet rs = null;
                   try{
                             Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                             String url = "jdbc:odbc:FileToFile";
                             String user = "";
                             String pwd = "";
                             cn = DriverManager.getConnection(url,user,pwd);
                             st = cn.createStatement();
                             rs = st.executeQuery(sql);
                        }catch(ClassNotFoundException e){
                             e.printStackTrace();
                        }catch(SQLException e){
                             e.printStackTrace();
                        return rs;
    GetData.java:
    package WebSiteClasses;
    import java.sql.*;
    import java.io.*;
    import java.util.ArrayList;
    public class GetData{
         DBHandler db = new DBHandler();
         String[] monthList;
         public GetData() throws Exception{
              getTrans();
         public ArrayList getTrans() throws Exception{
              ResultSet rs = db.getData("select distinct Transaction from tblTransactReport");
              ArrayList list = new ArrayList();
              try{
                   while (rs.next()){
                        String Transaction = rs.getString("Transaction");
                        list.add(Transaction);
              }catch (SQLException e){e.printStackTrace();}
              return list;

    "...Everywhere I've read about packages, in books or on line tutorials, merely states the obvious...create a folder and then name that folder in a package statement in the JAVA program..."
    Not so obvious, apparently.
    I don't know about a comprehensive reference - explaining CLASSPATH shouldn't take a 1,000 page book.
    I think it's important to understand the connection between the package names, the directory structure, the fully-resolved class name, and the way that javac.exe and java.exe go looking for classes. Maybe you need to look past the obvious and think about this for a while longer.
    If you have a class X with package a.b.c, do you understand what the directory structure must look like? Where should the X.class file be? If you're using a command shell, what directory should you navigate to in order to compile X.java, and where should X.class end up when you're finished? When you try to run your new X.class, how do you invoke it in java.exe?
    If you can answer all those, you're in better shape.
    How To Set The CLASSPATH

  • Guess I do need a little help with packages after all...

    Tried figuring in this out for the past 3 hours, various searches, scenarios etc...b4 posting....
    Okay, well....just like many aspects of this language, think I've got it down, and a
    new situation comes up where I can't implement it....in this case my own packages.
    (which is frustrating, but good because teaches troubleshooting, ingranes
    things into my peanut)
    Have done it before through tutorials...but now am having an issue...here we go:
    These are very small files..... 3 classes/one main
    http://www.cadenhead.org/book/24java/chapter10.shtml
    (see bottom for direct links)
    What I did first was put them in c:\java\2\modems
    compiled them all, everthing works great.
    #2
    I deleted the class files, and put all of the source into: c:\java\2\
    #3
    I edited the first 3 files to have the very first line ot each say:
    package com.modempack;
    No other edits, just this simple copy/paste at the top of each of those files
    #4
    For the file TestModems.java the only edit made was to put the following line at the top of the file:
    import com.modempack;
    #5 Compiled the first 3 files with the command "javac -d . FILENAME.java"
    they compile fine(you have to compile Modem.java 1st)
    #6 Try to compile the TestModems.java file with the same style or even just "javac Testmodems.java" and get the following error:
    C:\java\2>javac TestModems.java
    TestModems.java:1: package com does not exist
    import com.modempack;
    ^
    TestModems.java:5: cannot access CableModem
    bad class file: .\CableModem.java
    file does not contain class CableModem
    Please remove or make sure it appears in the correct subdirectory of the classpa
    th.
    CableModem roadRunner = new CableModem();
    ^
    2 errors
    It says package "com" does not exist" ...but it's created automatically when compiling the 1st 3 files....am at a lost.........could only think classpath issue somehow.....
    CableModem.java
    http://www.cadenhead.org/book/24java/source/chapter10/CableModem.java
    DslModem.java
    http://www.cadenhead.org/book/24java/source/chapter10/DslModem.java
    Modem.java
    http://www.cadenhead.org/book/24java/source/chapter10/Modem.java
    TestModems.java(the main app)
    http://www.cadenhead.org/book/24java/source/chapter10/TestModems.java

    Thank you for your response once again
    (assigned u the dukies from last thread)
    Argggghhhh!!!!! / Yippie Kayay!!!!!!!!!!!!!!
    Man oh man... HUGE headache....(wanting to studying the stuff from last post you helped on...having troubles with freaking packages SUCKS:) :) :)
    (but...will am learning, so that's good)
    Sooo....
    I put the actual ".java" files in the same directories, but that did not make a difference....
    So what I did was use the fully qualified /explicit name for each class.
    IE:
    import com.modempack;Gives the original 2 errors....that the above package does NOT exist??? wtf
    import com.modempack.*;Gives a single bad class erro
    Using either of the above and the following command:
    javac -classpath TestModems.javagives "no source files found"
    Using either of the above and the following command:
    javac -classpath c:\java\2\com\modems TestModems.javaYielded 5 errors of cannot resolve symbol
    Using: *****************************
    import com.modempack.Modem;
    import com.modempack.CableModem;
    import com.modempack.DslModem;and adding public in fron of the int[/code" variable....WORKS
    It is my understanding that
    import javax.swing.*;
    does NOT import everything with the swing library, so when thinking
    along those lines, this makes 100% sense....I just thought that with packages
    you could provide one, and everything else in the package is imported, ie: if you have a package with 500 classes in it, you wouldn't want 500 import lines....something seems like something
    must be wrong with the class files or something/classpath still or else this would work somehow???
    Well...going to go mess around somemore, just an update.
    Thank you again                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Help with packages and classpath

    Heya,
    first off, i use textpad to compile my java, i don't do it via the command line.
    my problem is faily simple, i think. i've got a main class and i'd like it to import a custom class from a subdir.
    Main class is in
    C:\Documents and Settings\David\Desktop\java\test_gen.java
    I would like it to import
    C:\Documents and Settings\David\Desktop\java\obj_data\objects.java
    I understand that I have to declare objects.java to be a part of a package, so i head the code with: package obj_data; as i understand it, the directory in which the package to be imported resides in will be named the same as the package.
    When i import my package into test_gen.java, i import obj_data as follows:
    import obj_data.*;
    this should import objects.class and any other classes in the same directory. also import obj_data.objects.*; could be used.
    Anyway, thats my understanding of how you set up the class and package; i also understand that when the java file compiles the compiler looks at the directoy(s) indicated in the class path for the classes to import. that in mind i tried to add:
    C:\Documents and Settings\David\Desktop\java\obj_data\
    to my classpath. i did this via dos, javac -classpath "C:\Documents and Settings\David\Desktop\java\obj_data\"
    i got no error messages, so i assume it worked. however when i try to compile the main java (test_gen) i get-
    package packages does not exist
    import packages.*;
    ^
    1 error
    Tool completed with exit code 1
    can anyone give me some help please?

    This is a minimal explanation of packages.
    Assume that your programs are part of a package named myapp, which is specified by this first line in each source file:
    package myapp;
    Also assume that directory (C:\java\work\) is listed in the CLASSPATH list of directories.
    Also assume that all your source files reside in this directory structure: C:\java\work\myapp\
    Then a statement to compile your source file named aProgram.java is:
    C:\java\work\>javac myapp\aProgram.java
    Explanation:
    Compiling
    A class is in a package if there is a package statement at the top of the class.
    The source file needs to be in a subdirectory structure. The subdirectory structure must match the package statement. The top subdirectory must be in the classpath directory.
    So, you generate a directory structure C:\java\work\myapp\ which is the [classpath directory + the package subdirectory structure], and place aProgram.java in it.
    Then from the classpath directory (C:\java\work\) use the command: javac myapp\aProgram.java
    Running
    Compiling creates a file, aProgram.class in the myapp directory.
    (The following is where people tend to get lost.)
    The correct name now, as far as java is concerned, is the combination of package name and class name: myapp.aProgram (note I omit the .class) If you don't use this name, java will complain that it can't find the class.
    To run a class that's NOT part of a package, you use the command: java SomeFile (assuming that SomeFile.class is in a directory that's listed in the classpath)
    To run a class that IS part of a package, you use the command java myapp.aProgram (Note that this is analogous to the command for a class not in a package, you just use the fully qualified name)

Maybe you are looking for