How to create a package and add a file?

Hi all,
I am new to Java and very much much confussed with how to create a package and then include some files any help will be very thankfull.
Thanks for your help
kka.

Steps for creating a package in java are as follows:
Choose a base directory for your classes. For example, you might choose c:\java\packages. Type the following command:
set CLASSPATH=%CLASSPATH%;c:\java\packages
Create subdirectories for each chapter or section, if you don't already have them.
For each of the classes in the subdirectories, add the following line to the very top of each file:
package directory-name;
where directory-name is the name of the subdirectory the class file is located in.
In other directories you may have class files that need to access one of the classes in another directory (package). To do this, write one of the following at the top of the class that needs the other class:
import subdir.*;
or
import subdir.classname;
Use the class by name in the new class file.
Note that you can create sub-packages by creating subdirectories of the original subdirectories, and inserting package statements at the top of the java files in those directories.
Hope this helps!

Similar Messages

  • How to create a control and add it to a page layput

    I am reading the following link :-
    http://www.itidea.nl/index.php/what-about-you-must-fill-out-all-required-properties-before-completing-this-action-when-publishing-a-page/
    which says that i need to create a control and add it to a page layout. but can anyone help me in understanding how i can create a user control and add them to page layout ?
    Thanks

    > First problem  i could not find a User Control (Farm Solution only) under the Office/SharePoint section
    if you mean New item in Visual Studio, then check it under general Web category. User controls are basic ASP.Net functionalities, not Sharepoint-specific. If it is not there, you may use the following trick:
    1. Create new project in other VS instance using "ASP.Net Empty Web Application" template
    2. Add new user control there (in this project type it should exist for sure under Web category. Called "Web User Control")
    3. Copy all user control's files to the folder of your Sharepoint project (ascx, ascx.cs, ascx.designer.cs)
    4. In VS instance with Sharepoint project add existing items: all copied user control files. They should be grouped under ascx file automatically after that
    > The type or namespace name 'TaxonomyFieldControl' could not be found (are you missing a using directive or an assembly reference?)"
    you need to add reference to Microsoft.SharePoint.Taxonomy.dll assembly, which is located in the GAC (assume that you have installed Sharepoint on your dev env)
    Blog - http://sadomovalex.blogspot.com
    Dynamic CAML queries via C# - http://camlex.codeplex.com
    thanks a lot for your help. so can i do the following steps:-
    I follow these steps to deploy a user control.
    using Visual Studio 2012 , i added a new Farm solution.
    then inside the farm solution i added a new User Control(Farm Solution Only).
      3.   inside the user control i entered the following code:-
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.Taxonomy;
    using Microsoft.SharePoint.WebControls;
    using System;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    namespace WikiPopUp.ControlTemplates.WikiPopUp
    [ToolboxData("<{0}:CustomValidationRequiredFieldsOnPage runat=server></{0}:CustomValidationRequiredFieldsOnPage>")]
    public class CustomValidationRequiredFieldsOnPage : WebControl
    protected override void CreateChildControls()
    base.CreateChildControls();
    if (SPContext.Current.FormContext.FormMode == SPControlMode.Edit)
    bool arethere = AreThereAnyMissingRequiredFieldsOnPage();
    if (arethere)
    //SPPageStateControl:
    //Provides an ASP.NET control that handles the Ribbon buttons controlling the state of a Microsoft SharePoint Server wiki or publishing page,
    //such as the CheckInCheckOutButton or the PublishingButton.
    SPPageStateControl baseParentStateControl = Page.Items[typeof(SPPageStateControl)] as SPPageStateControl;
    //Publish button: SPListItem MissingRequiredFields checks this.FieldHasValue(link.Name, field);
    //the field is empty (which is right) when the page is first created (MMD field is never filled in)
    //when the field was once filled, saved and emptied the field in sp code still has the previous value and the check MissingRequiredFields succeeds
    //after succeeding this check the page is validated (this.Page.Validate()) and this one fails which results SP validating the page as the Save button does
    if (baseParentStateControl.HasError)
    //this overwrites the previous PageErrorState
    //and validates the page
    //no popup anymore and status updates in yellow area
    baseParentStateControl.EnsureItemSavedIfEditMode(false);
    else
    //there are missing fields at this listitem, but they're not on the page
    //do nothing here, because the SerializedErrorState contains the navigate url to the Edit Properties page
    //and a message pops up
    /// <summary>
    /// Check if required fields are missing which are present at the page
    /// </summary>
    /// <returns></returns>
    private static bool AreThereAnyMissingRequiredFieldsOnPage()
    foreach (Control control in SPContext.Current.FormContext.FieldControlCollection)
    //get the control type
    string type = control.GetType().Name;
    FieldTypes controlType = (FieldTypes)Enum.Parse(typeof(FieldTypes), type);
    switch (controlType)
    case FieldTypes.TaxonomyFieldControl:
    TaxonomyFieldControl tfc = control as TaxonomyFieldControl;
    if (!tfc.IsValid)
    return true;
    break;
    default:
    break;
    return false;
    enum FieldTypes
    DateTimeField, FieldValue, TextField, RichImageField, NoteField, RichHtmlField, PublishingScheduleFieldControl, TaxonomyFieldControl, BooleanField, ComputedField
      4. i add a reference for the Sharepoint.taxnomy
      5. then i deploy the solution to my site collection. and now i can see the new solution inside the farm solution under central administration.
    but not sure if these are all the required steps to register the user control or still i need to do extra steps ?

  • How to create a group and add class instances to that group using VSAE

    how can i create a group in VSAE and add the objects to the group that too instances of a class.
    should i use the ID of the object or some other rule to add members to that group
    Thanks & Regards, Suresh Gaddam

    Hi,
    The below links should be helpful for you to create group in VSAE:
    Computer and Instance Group Fragments in VSAE
    http://blog.scomskills.com/create-a-computer-or-instance-group/
    Create a Group of Health Service Watcher Objects Using VSAE
    http://blog.scomskills.com/create-a-group-of-health-service-watcher-objects-using-vsae/
    SCOM VSAE – Custom Dynamic Computer Groups Based On Server Registry Keys
    Regards,
    Yan Li
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • Easy Question How to create Basic Groups and add respective Users

    Please help. I need to know how to create a basic group and later add users to the group. The group name would be callled Hardware and I will add johnsmith and janedoe to the group. Should I concern myself with the group id for whatever reason? I think the command is somthing like groupadd. Do I do somthing like:
    # groupadd Hardware
    # useradd -G Hardware johnsmith
    # useradd -G Hardware janedoe
    I'm using Solaris 10 if that helps.
    A million thanks I very New2Solaris,
    Johnny Mac

    Ok here is what I found on the net:
    change a user's group information change a user's primary group membership:
    usermod -g Hardware johnsmith
    usermod -g Hardware janedoe
    I forgot to mention that these are existing accounts (sorry)
    In order to change user's supplemental group membership:
    usermod -G Hardware johnsmith
    usermod -G Hardware janedoe
    is the supplemental group simply adding them to another group and not changing there primary group, which by default I think is staff. I would like to keep them in staff and add them to another group, in this case Hardware.
    Anyones thougths?

  • How to create a site and add security groups through code: scripts, csom, ... ?

    Hi,
    I'm new to CSOM and are looking for a way to create sites in SharePoint Office365 and especially add user to it with a specific role eg. 'visitor' or 'owner'.
    I use this code to add sites from a csv file, so far so good.
    But now I want to add security groups based on the csv file and assign a role. The security groups allready exists.
    and also how to add a user with a 'owner' role for some sites.
    That would make my life easier :-)
    so thank you in advance!
    # load assemblies
    #[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client")
    #[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime")
    Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll"
    Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
    # site collection
    $siteUrl = “https://mysharepoint.com”
    # admin
    $username = "[email protected]"
    $password = Read-Host -Prompt "Enter password" -AsSecureString
    # get clientcontext as object
    $ctx = New-Object Microsoft.SharePoint.Client.ClientContext($siteUrl)
    # assign credentials to clientcontext object
    $credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $password)
    $ctx.Credentials = $credentials
    # create site from template 'teamsite' => STS#0
    $data = Import-Csv "c:\tools\CSOM\vakwerking_test.csv"
    foreach ($row in $data) {
    $webCreationInformation = New-Object Microsoft.SharePoint.Client.WebCreationInformation
    $webCreationInformation.Url = $row.vakwerkingurl
    $webCreationInformation.Title = $row.vakwerkingnaam
    $webCreationInformation.WebTemplate = "STS#0"
    $webCreationInformation.UseSamePermissionsAsParentSite = $false
    $newWeb = $ctx.Web.Webs.Add($webCreationInformation)
    Write-Host "Title" $newWeb.Title
    #send to sharepoint
    $ctx.Load($newWeb)
    $ctx.ExecuteQuery()

    Hi,
    The command above about creating a group only works for the root site of the site collection, because the scope of the user group is site collection level, these groups
    can be used in all the sites in this site collection.
    With the existing groups in the root site, we can add users into them and grant specific permissions of a specific sub site to these groups.
    Here is a demo about how to assign permission to a group using Client Object Model(though in C#) for your reference:
    http://www.c-sharpcorner.com/UploadFile/54db21/set-permission-to-group-in-sharepoint-2010-programmatically/
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • How to create a table and add columns to it with a stored procedure

    Hi,
    I hope that someone can help me.
    I want to create an empty table with the same columns as another
    table but with 4 columns more.
    So it's actualy a copy of a table but with 4 added columns.
    I have to do it in a stored procedure but I don't know which
    statements I have to use. I need to give 3 parameters : schema,
    table and prefix(e.g. the pers from column pers_number)
    Can someone help me?
    Thanks in advance, Ann

    you can !!
    here is some examples
    DECLARE
    sql_stmt VARCHAR2(200);
    plsql_block VARCHAR2(500);
    emp_id NUMBER(4) := 7566;
    salary NUMBER(7,2);
    dept_id NUMBER(2) := 50;
    dept_name VARCHAR2(14) := 'PERSONNEL';
    location VARCHAR2(13) := 'DALLAS';
    emp_rec emp%ROWTYPE;
    BEGIN
    EXECUTE IMMEDIATE 'CREATE TABLE bonus (id NUMBER, amt
    NUMBER)';
    sql_stmt := 'INSERT INTO dept VALUES (:1, :2, :3)';
    EXECUTE IMMEDIATE sql_stmt USING dept_id, dept_name, location;
    sql_stmt := 'SELECT * FROM emp WHERE empno = :id';
    EXECUTE IMMEDIATE sql_stmt INTO emp_rec USING emp_id;
    plsql_block := 'BEGIN emp_pkg.raise_salary(:id, :amt); END;';
    EXECUTE IMMEDIATE plsql_block USING 7788, 500;
    sql_stmt := 'UPDATE emp SET sal = 2000 WHERE empno = :1
    RETURNING sal INTO :2';
    EXECUTE IMMEDIATE sql_stmt USING emp_id RETURNING INTO salary;
    EXECUTE IMMEDIATE 'DELETE FROM dept WHERE deptno = :num'
    USING dept_id;
    EXECUTE IMMEDIATE 'ALTER SESSION SET SQL_TRACE TRUE';
    END;

  • I want to know what I need and then how to take a pdf form I created in word and add the blue boxes so that anyone can type into my form

    I want to know what I need and then how to take a pdf form I created in word and add the blue boxes so that anyone can type into my form

    Hey john@adobe,
    Could you please specify how exactly have you created your form.
    You might need to have Acrobat installed on your computer to convert a word document to PDF.
    Do you have Acrobat installed? If yes, what version? If no, then please try using the trial version of Acrobat DC (latest version) and access its features:
    Download Adobe Acrobat free trial | Acrobat Pro DC
    Also, let me know what kind of blue boxes are you talking about.
    If you want others to edit your PDF form, then you need to make it a fillable form by choosing 'Form Editing' option from Tools pane.
    Let me know more on this so that I can help you out.
    Regards,
    Anubha

  • How use jndi to create a organization and add a  user  to it.(ÈçºÎ´´½¨Ò»¸ö×éÖ¯µ¥Î»)

    how use jndi to create a organization and add a user to it¡£THANKS£¡
    ÈçºÎ´´½¨Ò»¸ö×éÖ¯µ¥Î»,²¢½«Ò»¸öÓû§Ìí¼Ó½øËü¡£Ð»Ð»£¡

    Hi,
    The command above about creating a group only works for the root site of the site collection, because the scope of the user group is site collection level, these groups
    can be used in all the sites in this site collection.
    With the existing groups in the root site, we can add users into them and grant specific permissions of a specific sub site to these groups.
    Here is a demo about how to assign permission to a group using Client Object Model(though in C#) for your reference:
    http://www.c-sharpcorner.com/UploadFile/54db21/set-permission-to-group-in-sharepoint-2010-programmatically/
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • How to create a package in ECC 6.0.

    Hi,
    Can you tell me how to create a package in ECC 6.0 system?
    Thanks in advance,
    Regards,
    Arnab.

    Hi,
    Thank you for your replies.
    Can you tell me the difference and uses of the two types of package I can create from SE21.
    i.e. : Package and package interface. any sap link would also be helpful. I need to know where i can use what and what would be helpful for my case.
    Regards,
    Arnab.

  • I have files in my iTunes media folder that somehow are not in my library. How do I get iTunes to scan my media folder and add missing files to my library without making a copy of each file in the same location?

    I have files in my iTunes media folder that somehow are not in my library. How do I get iTunes to scan my media folder and add missing files to my library without making a copy of each file in the same location? If I use add file / folder to library, it scans the folder and then makes a copy of any file that is not in my library in the exact same location; I recal in older versions of iTunes being able to just drag my media folder into my library and it would update missing links.

    Only the songs that are connected to iTunes will be copied when you consolidate to a new folder.
    Splitting the media folder away from the usual location makes it harder to move iTunes in the future.
    Are you go move everything back once you've tidied up or are you going to leave it that way? Either way I'd recommend you create an iTunes folder at the new location, an iTunes Media folder inside that, and consolidate to this new iTunes Media folder. You should also use the option File > LIbrary > Organize Library > Rearrange files in the folder "<Media Folder"> if you have not already done so.
    tt2

  • How to create the package.

    Hi ,
    How to create the package.
    Thanks

    Hi Mahaboob,
    Goto SE80 Transaction
    Select Package and below give the package name and click on enter.
    then u get a pop up asking to create package. Click yes. then u get a pop up  Package Builder: Create package
    Give the description and the Application component and click on create.
    Best regards,
    raam

  • How to create process chains,and how to use process like and or xor

    Hi,
    How to create process chains,and how to use process like and or xor.
    can any one please give me a example in each.
    Thanks,
    cheta.

    Hi Cheta,
    Here is step by step procedure to create process chains
    Process chain is nothing but executing a process ..(or) loading the data any process we can do in background.. that means.. automatically we can execute our process based on Time or any event..
    Creating Process Chains
    Prerequisites
    If you want to include a load process in the process chain, you need to have already created an InfoPackage.
    You cannot load flat file data from a client workstation in the background. For this reason, you have stored your data on an application server.
    Creating Process Chains
    You have the option of creating a process chain in the process chain maintenance screen directly or by using a maintenance dialog for a process:
    Creating a Process Chain Directly in the Process Chain Maintenance Screen
    You are in the BW Administrator Workbench.
    1. Click on the Process Chain Maintenance icon in the AWB toolbar.
    The Process Chain Selection dialog window appears.
    2. Choose Create.
    3. Enter the technical name and a description of the chain, and confirm your entry.
    The Add Start Process dialog window appears.
    4. Create a variant for a start process.
    1. a. On the Maintain Start Process screen, choose whether you want to schedule the chain directly or whether you want to start it using a metachain.
    2. b. If you choose to schedule the chain directly, enter the start date value for the chain under Change Selections and save your entries.
    The Maintain Start Process screen appears again.
    3. c. Save your entries, return to the previous screen and confirm your entries in the Add Start Process dialog window.
    You are taken to the Plan View of the process chain maintenance screen.
    In the left-hand area of the screen, a navigation area is displayed. In the right-hand area of the screen, the process chain is displayed.
    5. Use the drag-and-drop function to add the relevant processes into your process chain.
    You use the Process Types function to select the processes. This sorts the process types according to different categories. You can also call up InfoPackages and processes for the data target from the separate InfoSources and Data Targets navigation trees.
    Hope this helps
    Regards
    Karthik

  • How to create a drag and drop video playlist Help please

    I would like to learn how to create a drag and drop video playlist.
    I think the most common example is youtube.
    I already have partial of the work but I am stuck with my preliminary knowledge of Flash.
    What I am saying is:
    I have a *.fla project that have the galleries for video and pictures.
    But this process is done from the back end.
    I would like to make it more dynamic for the visitors.
    For example:
    1. Create a visitor video (pictures) playlist
    2. Drag and drop into the playlist
    3. To be able to create different playlists (Playlist 1, "My favorite playlist", "Watch later", etc)
    If someone knows or want to guide me where or how to find this request, I'd appreciate it so much.
    If the forum think that this need to be address to a expertise ($). I am also welling to hear that and where to go.
    If someone is interesting in this project please send me a note to show the prelimary project.
    Thanks

    Yeah that is the general idea but that is more of a "lift and drop", i want to add the same thing as when you:
    Right click this window in the taskbar (assuming your using windows) when the window is not maximized and click "move" then it changes the cursor icon and allows u to move the window around and while you move it around it shows the window moving, not a click and release feature.
    So i want that ability without having to click on the title bar, if you know what i mean.

  • How to create a partner and header record using CRM_ORDER_MAINTAIN?

    Hi any one knows how to create a partner and header record using the function module CRM_ORDER_MAINTAIN??
    I tried to  create a record, but i only managed to create a header record and the partner record is not reflected in the transaction.  Why is that so? is there any indicator that i need to include?
    Thanks..
    Jen

    Hi Jen!
    I use this FM and it works perfectly.
    Use this to create a partner:
      gs_partner-ref_handle    = '0000000001'.
      gs_partner-ref_kind      = 'A'.
      gs_partner-ref_partner_handle = '0001'.
      gs_partner-partner_fct   = '00000001'.
      gs_partner-partner_no    = NO_PARTNER. "number of the partner, bu_partner
      gs_partner-display_type  = 'BP'.
      gs_partner-no_type       = 'BP'.
      gs_partner-kind_of_entry = 'C'.
    *  ls_partner_l-ref_handle    = '1'.
      gs_partner-ref_guid      = '00000000000000000000000000000000'.
      APPEND gs_partner  TO gT_partner .
      ls_input_field-ref_kind  = 'A'.
      ls_input_field-logical_key   = '0001'.
      ls_input_field-objectname  = 'PARTNER'.
      ls_input_field-ref_handle  = '0000000001'.
      ls_input_field_names-fieldname = 'DISPLAY_TYPE'.
      INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
      ls_input_field_names-fieldname = 'KIND_OF_ENTRY'.
      INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
      ls_input_field_names-fieldname = 'NO_TYPE'.
      INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
      ls_input_field_names-fieldname = 'PARTNER_FCT'.
      INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
      ls_input_field_names-fieldname = 'PARTNER_NO'.
      INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
      INSERT ls_input_field  INTO TABLE  gt_input_fields.
      clear ls_input_field-field_names[].
      CALL FUNCTION 'CRM_ORDER_MAINTAIN'
      EXPORTING
    *    it_schedlin_i   = gt_schedlin_i_com
        it_partner      = gt_partner
    *    it_sales        = gt_sales
    *      it_orgman       = gt_orgman
    *      it_appointment  = gt_appointment
    *      it_ordprp_i     = gt_ordprp_i
    *   it_product_i    = gt_product_i
    *      it_activity_i   = gt_activity_i
    *      it_pridoc       = gt_pridoc_com
      CHANGING
        ct_orderadm_h   = gt_orderadm_h
    *   ct_orderadm_i   = gt_orderadm_i
        ct_input_fields = gt_input_fields.
    *      ct_doc_flow     = gt_doc_flow
    *      cv_log_handle   = gv_log_handle.
    Hope it helps u,
    Regards,
    Mon.

  • How To Create A Technical And Business Systems For Web AS ABAP ???

    Hi Experts,
    How To Create A Technical And Business Systems For Web AS ABAP ???
    Please Let me Know All the Step-By-Step Process to Create ????
    Points Will be Given
    Regards
    Khanna

    Hi Sumit,
    When U Told the thing that first time to execute the RZ70 and All i Did this in XI System
    So I got An Entry for the Technical System for XI System.
    Now i Deleted that and Executed RZ70 in R/3.
    When I Executed RZ70, I got this Error.
    <b> "RFC Call failed: Error Opening an RFC Connection "</b>.
    Now I am Unable to see Any Technical System  Under Web As ABAP. It's Showing Empty Now.
    Please Let me know
    Regards
    Khanna

Maybe you are looking for

  • Mac mini w/ princeton vl1716 lcd (or lcd17d)

    has anyone tried using the mini with the princeton vl1716 (or lcd17d)? if so, how did it work w/ dvi? i am interested in buying this monitor but i would like to know if it works decently w/ the mini.

  • RADIUS and Vendor-Specific attributes

    Hi, I'm trying to add a vendor specific attribute (Cisco AV Pair) to BMAS (NMAS 3.1.2 on NetWare 6.5 SP6). I can add any generic attribute I want, but any of the vendor-specific attributes are not sent back in the radius access-accept packet. Is ther

  • Regarding Solman7.1 message type

    Hi, Expert We've build Solman7.1, but we will needed to change the existing message type in solman to old message type SLFN. If that is possible, could you kindly provide the step by step guide ? Thank you !

  • Layout which is not user specific

    Hello All, Can I save a layout as a default layout for all my users. Actually its not my code its the output of std report RCS15001. I want to save my layout as not user-specific but the checkbox is greyed.Kindly help me out. Thanks in advance, Regar

  • Any idea as to when the Apple Store will start selling refurbished iPad 4?

    Any idea as to when the Apple Store will start selling refurbished iPad 4?