Creating jar having packages and beans

hello!
i have a project.
i want to use bean like this(i.e. AdminBean in package com/tech/pack/util/admin)
com.tech.pack.util.admin.AdminBean
and have multiple packages like com/tech/pack and com/tech/pack/tools
i want to create a jar file of all these packages and beans.
but i have no clue about this.
please help me.
thanks in advance.

thanks
i did following:
created text file manifest that contain
Manifest-Version: 1.0
Specification-Title: Java Platform API Specification
Specification-Version: 1.4
Implementation-Title: Java Runtime Environment
Implementation-Version: 1.4.0-rc
Created-By: 1.4.0-rc (Sun Microsystems Inc.)
Implementation-Vendor: Sun Microsystems, Inc.
Specification-Vendor: Sun Microsystems, Inc.
Name: com/tech/forum/Auto.class
Name: com/tech/forum/AutoFactory.class
Name: com/tech/forum/UnauthorizedException.class
Name: com/tech/forum/Category.class
Name: com/tech/forum/util/admin/AdminBean.class
Java-Bean: True
com/tech/forum/.class indicates the class in com/tech/forum/ directory
then created jar by jar cvf file.jar * .class manifest it create the jar. to be sure i extracted jar that gives directories com , META-INF and manifestfile.
but i m not able to use bean.
anything gone wrong?
please help.
Edited by: shahamar on Mar 9, 2009 11:34 PM

Similar Messages

  • Which Privilege needed to create a new Package and Stored procedure usage(in HANA studio)

    Hello Friends,
                           In my company I have access to SYSTEM user(i.e. having all required permissions) ,I wish to create new " USER(s) " for trainees thus which "System privilege" or other privileges is/are needed for the following requirements -
    1>To allow the "new user" to create new Packages(and the columnar views inside it and be able to execute,edit them) 
    2>Create Procedures inside their schema and execute using  "call " command
    I have given the following privileges as suggested by an ebook (SAP certified author).
    The SELECT privilege on the _SYS_BI schema
    The SELECT privilege on the _SYS_REPO schema
    The EXECUTE privilege on the REPOSITORY_REST procedure
    According to my knowledge "create schema" should be given for new schema creation.For my other requirements which all privileges are needed.
    Thanx.

    In addition to Krishna if you don't want to expose all the package to the trainee, then create a new role keeping everything same as default MODELING role (open it and have a look) but in "PACKAGE PRIVILEGES" add only those package that you want to expose to the end users.
    Regards
    Kumar

  • Creating jar file for entity bean

    I am trying to deploy an entity bean..i compiled all the java files and created a dir by name META_INF and copied ejb-jar.xml
    and the other two .xml files which are needed to this dir. then using ,ant i tried to create the jar file ,,but it is giving the following error
    during the process ..PLs Help me
    Buildfile: build.xml
    clean:
    [delete] Deleting directory D:\ejb\entity\build
    [delete] Deleting directory D:\ejb\entity\dist
    init:
    [mkdir] Created dir: D:\ejb\entity\build
    [mkdir] Created dir: D:\ejb\entity\build\META-INF
    [mkdir] Created dir: D:\ejb\entity\dist
    compile_ejb:
    [javac] Compiling 3 source files to D:\ejb\entity\build
    jar_ejb:
    [jar] Building jar: D:\ejb\entity\dist\Cabin.jar
    ejbc:
    [java] java.io.FileNotFoundException: META-INF/ejb-jar.xml not found in jar file
    [java]      at weblogic.ejb20.dd.xml.DDUtils.getEntry(DDUtils.java:332)
    [java]      at weblogic.ejb20.dd.xml.DDUtils.getEjbJarXml(DDUtils.java:236)
    [java]      at weblogic.ejb20.dd.xml.DDUtils.loadEJBJarDescriptorFromJarFile(DDUtils.java:151)
    [java]      at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:139)
    [java]      at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:130)
    [java]      at weblogic.ejbc20.runBody(ejbc20.java:338)
    [java]      at weblogic.utils.compiler.Tool.run(Tool.java:79)
    [java]      at weblogic.ejbc.main(ejbc.java:21)
    [java] ERROR: java.io.FileNotFoundException: META-INF/ejb-jar.xml not found in jar file
    compile_webapp:
    Total time: 20 second

    The Ejb jar file structure for WebLogic server:
    META-INF/ejb-jar.xml
    META-INF/weblogic-ejb-jar.xml
    META-INF/weblogic-cmp-rdbms-jar.xml
    Ejb Bean Class
    Remote interface
    Home interface

  • Problems with JApplet, jar-Archive, packages and IE5

    Hello!
    I have a problem with a JApplet and Internet Explorer 5. I made a jar archive of my classes. The classes are
    members of a package. The jar archive also contains images.
    The structure of the archive:
    com/mycomp/myapp/DemoApplication.class
    com/mycomp/myapp/DemoApplet.class
    <more classes>
    com/mycomp/myapp/images/hp_logo.gif
    com/mycomp/myapp/images/test.gif
    <more images>
    The archive is stored locally in a directory which contains also the html file.
    I used the sdk 1.3.1 to compile the classes.
    My problem: when I start the html file on NT with IE5, I get the error message below:
    I try to create a label containing an icon with:
    topLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("images"+fs+"hp_logo.gif")));It works on Sun with Netscape 4.67 and SDK 1.3.1 installed.
    Should I move the images directory inside the jar archive to another place or is the html code not correct?
    The error message:
    java.lang.NullPointerException
         at javax.swing.ImageIcon.<init>(Unknown Source)
         at com.mycomp.myapp.DemoApplication.initComponents(DemoApplication.java:158)
         at com.mycomp.myapp.DemoApplication.<init>(DemoApplication.java:55)
         at com.mycomp.myapp.DemoApplet.<init>(DemoApplet.java:24)
         at java.lang.Class.newInstance0(Native Method)
         at java.lang.Class.newInstance(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)The html file:
    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
    <html>
      <head>
        <title>DemoApplet</title>
      </head>
      <body>
    <BODY LINK="#0000ff" VLINK="#800080" BGCOLOR="#37a1a7">
          <h1>DemoApplet</h1>
          <!--"CONVERTED_APPLET"-->
    <!-- HTML CONVERTER -->
    <SCRIPT LANGUAGE="JavaScript"><!--
        var _info = navigator.userAgent; var _ns = false; var _ns6 = false;
        var _ie = (_info.indexOf("MSIE") > 0 && _info.indexOf("Win") > 0 && _info.indexOf("Windows 3.1") < 0);
    //--></SCRIPT>
    <COMMENT><SCRIPT LANGUAGE="JavaScript1.1"><!--
        var _ns = (navigator.appName.indexOf("Netscape") >= 0 && ((_info.indexOf("Win") > 0 && _info.indexOf("Win16") < 0 && java.lang.System.getProperty("os.version").indexOf("3.5") < 0) || (_info.indexOf("Sun") > 0) || (_info.indexOf("Linux") > 0) || (_info.indexOf("AIX") > 0) || (_info.indexOf("OS/2") > 0)));
        var _ns6 = ((_ns == true) && (_info.indexOf("Mozilla/5") >= 0));
    //--></SCRIPT></COMMENT>
    <SCRIPT LANGUAGE="JavaScript"><!--
        if (_ie == true) document.writeln('<OBJECT classid="clsid:CAFEEFAC-0013-0001-0000-ABCDEFFEDCBA" WIDTH = 695 HEIGHT = 525  codebase="http://java.sun.com/products/plugin/1.3.1/jinstall-131-win32.cab#Version=1,3,1,0"><NOEMBED><XMP>');
        else if (_ns == true && _ns6 == false) document.writeln('<EMBED type="application/x-java-applet;jpi-version=1.3.1"  CODE = com.mycomp.myapp.DemoApplet CODEBASE = "." ARCHIVE = "DemoApplet.jar,classes12.zip" WIDTH = 800 HEIGHT = 600  scriptable=false pluginspage="http://java.sun.com/products/plugin/1.3.1/plugin-install.html"><NOEMBED><XMP>');
    //--></SCRIPT>
    <APPLET  CODE = com.mycomp.myapp.DemoApplet CODEBASE = "." ARCHIVE = "DemoApplet.jar,classes12.zip" WIDTH = 695 HEIGHT = 525></XMP>
    <PARAM NAME = CODE VALUE = com.mycomp.myapp.DemoApplet >
    <PARAM NAME = CODEBASE VALUE = "." >
    <PARAM NAME = ARCHIVE VALUE = "DemoApplet.jar,classes12.zip" >
    <PARAM NAME="type" VALUE="application/x-java-applet;jpi-version=1.3.1">
    <PARAM NAME="scriptable" VALUE="false">
    </APPLET>
    </NOEMBED></EMBED></OBJECT>
    <!--
    <APPLET CODE = DemoApplet CODEBASE = "." ARCHIVE = "DemoApplet.jar,classes12.zip" WIDTH = 695 HEIGHT = 525>
    </APPLET>
    -->
    <!--"END_CONVERTED_APPLET"-->
      </body>
    </html>Thank you for your help!
    Gruesse,
    Torsten

    seems like it couldn't find the image file... try to give it the absolute path to the file first to see if this is the root of the problem... and then try to find alternative ways to not give it the absolute path...

  • The good old packages and beans problem

    I have a JSP which uses a JavaBean whos class file is in the same directory as the JSP. Assuming the bean is called HelloBean, what should I do?
    lets say this is HelloBean.java
    package xxx; //what should xxx be?
    public class HelloBean implements java.io.Serializeable  {
    public String sayIt () {
    return "hello";
    }and for the jsp,
    <jsp:useBean id="hello" scope="session" class= />
    what should the class be to fit in with the above code?

    first, you should not put the bean in the same directory as the JSP.
    I use two source trees.
    /src/...
    /web/...
    The src contains java sources and is compiled to /WEB-INF/classes, the second contains anything associated with HTML and JSP (images, etc) and is COPIED to the root of the webapp directory structure. I do this using ANT. Furthermore I have a etc (for web.xml) and a lib (for jars). ANT makes sure every goes where it needs to go.
    Usually I use the rule that JSPs associated with a servlet or bean are in the same path, so:
    /src/com/sun/myapp/Thing.java
    and
    /web/com/sun/myapp/Thing1.jsp
    This works fine for me.

  • Creation of developement class,package and access key

    COULD ANYBODY EXPLAIN about
    creation of developement class,package and access key
    and who will create them?

    Working With Development Objects
    Any component of an application program that is stored as a separate unit in the R/3 Repository is called a development object or a Repository Object. In the SAP System, all development objects that logically belong together are assigned to the same development class.
    Object Lists
    In the Object Navigator, development objects are displayed in object lists, which contain all of the elements in a development class, a program, global class, or function group.
    Object lists show not only a hierarchical overview of the development objects in a category, but also tell you how the objects are related to each other. The Object Navigator displays object lists as a tree.
    The topmost node of an object list is the development class. From here, you can navigate right down to the lowest hierarchical level of objects. If you select an object from the tree structure that itself describes an object list, the system displays just the new object list.
    For example:
    Selecting an Object List in the Object Navigator
    To select development objects, you use a selection list in the Object Navigator. This contains the following categories:
    Category
    Meaning
    Application hierarchy
    A list of all of the development classes in the SAP System. This list is arranged hierarchically by application components, component codes, and the development classes belonging to them
    Development class
    A list of all of the objects in the development class
    Program
    A list of all of the components in an ABAP program
    Function group
    A list of all of the function modules and their components that are defined within a function group
    Class
    A list of all of the components of a global class. It also lists the superclasses of the class, and all of the inherited and redefined methods of the current class.
    Internet service
    A list of all of the componentse of an Internet service:
    Service description, themes, language resources, HTML templates and MIME objects.
    When you choose an Internet service from the tree display, the Web Application Builder is started.
    See also Integrating Internet Services.
    Local objects
    A list of all of the local private objects of a user.
    Objects in this list belong to development class $TMP and are not transported. You can display both your own local private objects and those of other users. Local objects are used mostly for testing. If you want to transport a local object, you must assign it to another development class. For further information, refer to Changing Development Classes
    http://help.sap.com/saphelp_46c/helpdata/en/d1/80194b454211d189710000e8322d00/content.htm
    Creating the Main Package
    Use
    The main package is primarily a container for development objects that belong together, in that they share the same system, transport layer, and customer delivery status. However, you must store development objects in sub-packages, not in the main package itself.
    Several main packages can be grouped together to form a structure package.
    Prerequisites
    You have the authorization for the activity L0 (All Functions) using the S_DEVELOP authorization object.
    Procedure
    You create each normal package in a similar procedure to the one described below. It can then be included as a sub-package in a main package.
    To create a main package:
    1.       Open the Package Builder initial screen (SE21 or SPACKAGE).
    2.       In the Package field, enter a name for the package that complies with the tool’s Naming Conventions
    Within SAP itself, the name must begin with a letter from A to S, or from U to X.
    3.       Choose Create.
    The system displays the Create Package dialog box.
    4.       Enter the following package attributes:
    Short Text
    Application Component
    From the component hierarchy of the SAP system, choose the abbreviation for the application component to which you want to assign the new package.
    Software component
    Select an entry. The software component describes a set of development objects that can only be delivered in a single unit. You should assign all the sub-packages of the main package to this software component.
    Exception: Sub-packages that will not be delivered to customers must be assigned to the HOMEsoftware component.
    Main Package
    This checkbox appears only if you have the appropriate authorization (see Prerequisites).
    To indicate that the package is a main package, check this box.
    5.       Choose  Save.
    6.       In the dialog box that appears, assign a transport request.
    Result
    The Change package screen displays the attributes of the new package. To display the object list for the package in the Object Navigator as well, choose  from the button bar.
    You have created your main package and can now define a structure within it. Generally, you will continue by adding sub-packages to the main package. They themselves will contain the package elements you have assigned.
    See also
    Adding Sub-Packages to the Main Package
    http://help.sap.com/saphelp_nw04/helpdata/en/ea/c05d8cf01011d3964000a0c94260a5/content.htm
    access key used for change standard program.
    www.sap.service.com

  • Creation of new package and request number.

    Hi frndz,
    Hope everyone are doing fine. Coming to my query, its quite simple for you guys.
    But me being new to BW, I would like to know how to create a new package and request number.
    And I have a task to create a new IS and DS also. So do i need to create these new package and request number separately or at the time of creation of IS and DS.
    Please give me clear idea.
    Thanking you.
    regards
    Dubbu

    Hi Vinay,
                   I hope you are speaking about Package to collect Objects and collecting them in Transport Requests.
    Usually you use the same packages for all the objects. According to requirement if you want to create the Package you can goto SE80--> There you can create a New Package. Give Transport layer as SAP. and Activate it. Then you collect the package in a Transport Request. You can create the request by the create button on the screen when it ask for Transport Request.
    While creating the Infosource or other objects you mention the package which you have created while saving and you can use the existing TR or new TR for collecting them.
    You can use RSA1---> Transport Connection to collect the objects easily to TR's
    Regards
    Karthik

  • Packages and Use Access in Proxy development

    Hi everybody.
    I am desperately trying to generate an ABAP Proxy on my XI System. According to my documentation I should start by creating a new package and declaring a Use Access to the package interface SAI_PROXY_PIF.
    However, everytime I try to do this, I get the error message  "Package interface SAI_PROXY_PUBLIC_PIF points to a package that is too deeply nested".
    Ok. So I create another package, include my first package in this package and try to declare a Use Access to package interface SAI_TOOLS_PIF, in order to mimic the package hierarchy in the SAI proxy runtime. But I get the same error message there...
    Unfortunately I am not familiar with the new 6.40 package concept and Use Access relationships. Could somebody please explain to me what I am doing wrong?
    Thanks in advance,
    Joerg

    hi,
    you need SAI_TOOLS in the user access tab
    for your package that's all
    this is the documentaion:
    http://help.sap.com/saphelp_nw04/helpdata/en/14/555f3c482a7331e10000000a114084/content.htm
    Regards,
    michal

  • UDF having date and timezone field in OIM 11gR2

    Hi Experts,
    How to create UDF having date and time filed in OIM11gR2?
    Thanks,
    Amit
    Edited by: 955130 on Dec 13, 2012 12:18 AM

    Basically the problem set is, my client wants to enter the term date as date and time, but by default the term date comes with calendar popup that does not support time entry also from user form.
    Yes, it is correct that we can use date as well as string, and the solution proposed is like we add 3 drop down along with the term date,
    first drp down contains hours HH, second MM and third location (For maintaining the office location)
    I want an advise on below things:
    1. Does OIM supports globalisation and localization concept. meaning the date time is maintined as location specific or do i need to save location somewhere and create a lookup field where all the locaitons and there difference of timezones are kept?
    2. Can i have a calendar replaceed by date time calender so that i can get rid of drop downs?
    3. If not, which is the best way of updating my term date with time also, will event handler work here?
    thanks all.

  • FB4: New package and new folder. What's the difference?

    Hi,
    What's the difference between creating a new package and creating a new folder?
    Both options seem the same to me.

    Here is my understanding of it. Packages are for structured code repositories (ie. com.mysite.utils) and folders are for assets. I don't think the IDE really cares what you put in them but Packages are (to me) simply 'helpers'.

  • Confused about beans, packages, and jars

    Hello,
    I've created a package that contains three public classes, Animation, Animator, and AnimatedPanel. I won't explain what they do, since it's rather irrelevant; It is important to note that AnimatedPanel extends JLabel. The package is com.buchuki.animations
    What I want to do is place the AnimatedPanel onto a JPanel, in Forte. To do this, it appears that I have to make the AnimatedPanel a bean. (or do it using extra code, but that defeats the purpose of using an IDE). I understand the basics of beans, but not much more. I've searched these forums and skimmed the Java Bean tutorial, but haven't found anything helpful. (at least, not completely helpful! ;)
    The problem is, I want to make a bean out of the class com/buchuki/animations/AnimatedPanel.class, but not out of the other two classes in that package. However, I will want to use those other two classes to interact with the AnimatedPanel class in the application I am using. (I'll import com.buchuki.animations.*;)
    From what I've read, it appears that you have to run the jar command from the parent directory of the package (ie: in animations/com/buchuki/animations, I run the jar command from animations/). But that would include all files in com, would it not? I guess I don't know what to do at all, but how do I make a bean out of AnimatedPanel and yet keep the bean as a part of the package that uses the "helper" classes? Is it a semi-advanced entry in the manifest file?
    Thanks,
    Dusty

    Ok, I've figured out a few things in my research, but it's still not working. I guess that the Java-Bean: True applies to only one package, and not to the jar archive as I first thought.
    However, I'm still a little unsure how I can include the package in the jar archive as a part of my program; is it that I should use the extension mechanism mentioned in the jar tutorial?
    And at any rate, even with a manifest file like this:
    Name: com/buchuki/animations/AnimatedPanel.class
    Java-Bean: True
    and archiving with:
    jar cfm mainfest.txt animations.jar com
    This creates the archive, but when I try to add new Java Bean in forte, it says that the archive is not a valid bean. What am I missing? Did I mess up the package thing, the compilation... what?
    Thanks again,
    Dusty

  • How to create package and import from jar file?

    Hi all,
    I am writing a software and I am not sure how to create a package for the classes.
    Say I have two classes in the same directory as follows:
    testA.java
    ==========
    package AB;
    public class testA
    public static void main(String[] args){
         testB myB = new testB();
         System.out.println("A test");
    testB.java
    ===========
    package AB;
    public class testB
    public testB(){
         System.out.println("B constructor");
    both file compile without the package heading;
    both file compile using: javac -classpath .\ *.java
    Question 1:
    I cannot run testA by: java -classpath .\ testA
    I think it is a syntax error. What is the correct one?
    If I run testA by: java testA
    The only output I get is: A test
    But I am expecting: B constructor /n A test
    What went wrong?
    Question 2:
    I need to use APIs of another software. I have downloaded a .jar file (xxx.jar) with all the classes in it. And I have put "import xxx.*;" in my source file. But the compiler complains about the importing. What is the right way to copmile it?
    I have read a couple of tutorials but they don't answer my question.
    (I am using windows2000 and don't have the classpath variable.)
    Hope some one can help.
    Thanks a lot

    Try moving testA out of the package and importing 'AB.*;'
    If you have:
    ./testA.class
    ./AB/testb.class
    Then to execute testA from ./ type: java -cp . testA

  • I just upgraded my iMac to Lion, and a few seconds ago, I upgraded the iWork package and now I'm having some problems with the new version of Pages (4.1) When I try to change something in a document, a message says "the program is not responding"

    I just upgraded my iMac to Lion, and a few seconds ago, I upgraded the iWork package and now I'm having some problems with the new version of Pages (4.1) When I try to change something in a document, a message says "the program is not responding", so I have to force it to close. By the way, the SAVE botton stays the same even I change erverything in my document. Please, a have a work to finish, **** me. What I can do abou it?

    I just upgraded my iMac to Lion, and a few seconds ago, I upgraded the iWork package and now I'm having some problems with the new version of Pages (4.1) When I try to change something in a document, a message says "the program is not responding", so I have to force it to close. By the way, the SAVE botton stays the same even I change erverything in my document. Please, a have a work to finish, **** me. What I can do abou it?

  • HELP !!!I want to give my old apple to my girlfriend, SO SHE CAN PLUG IN HER NEW IPHONE, CREATE AN APPLE ID AND USE MY OLD LAPTOP TO DOWNLOAD itunes music, but im having trouble deautherizing it, and making her the OWNER, IF you get my drift, how to i mak

    Hi
    I have a new powerbook and want to give my girlfriend my old G4 power book, she has a new iphone 5s, and wants to create a new itunes/apple id. When i try to de authorize the G4 and sign in with her new apple ID it says bad password, how can i release the G4 from my cluster of authorized apples and make her the owner so she can download music and more importantly sync her music with her phone, she only has 3 songs on her iphone, and loaded all her CD's into the g4 but cant sync, im no dummy and this shouldnt be hard, but its driving me crazy!!!!!!
    thx u so much for your time heeeellppppp.

    Perhaps, as we have the same music tastes, for now i should just authorize her phone to my power book just to sync music, not pics, contacts etc? I'd hate to overright her contacts etc lol????
    HELP !!!I want to give my old apple to my girlfriend, SO SHE CAN PLUG IN HER NEW IPHONE, CREATE AN APPLE ID AND USE MY OLD LAPTOP TO DOWNLOAD itunes music, but im having trouble deautherizing it, and making her the OWNER, IF you get my drift, how to i mak 

  • Help! How to create Jar file for a packaged class?

    Hi!
    I am new in jar complexities. I made a swing frame that just prompts a JOptionPane when executed. I accomplished the same using jar without packaging my class SwingTest.
    But when i package it, it doesn't run. Can any one tell me how to make jar file of packaged classes and include images in the jar files too!
    Really Thanx!

    Call the Jar from the commandline to see the exceptions thrown.
    java -jar <jarFileName> <className>

Maybe you are looking for