How to import a package in UML Class diagram

Hi all,
I am new to use Sun Java Studio Enterprise 8 and trying to do a project.
In the class diagram, I have to import java.util.Observable (for my Model)and java.util.Observer classes(for my View). How can I do this?
When I searched the forums, I saw a post and what I understood is, one should create a java package and then util package inside the java package. Now, create Observable class and drag it into util package in the Projects window.
If I do this, the source code generator is generating a new java.util.Observable class in a new java.util.package. But, I want to use the core java.util package.
I appreciate any help.
regards,
varma.

You know man, The first time that I tried to do this, it didnt update my diagram then I read some posts and I try to update the diagram, [[rigth-click on the project's folder then you go to Tool and select Update Model from Source]], but it caused an exception then I create another project and it worked fine, so when I update my source my diagram update at the same time, I dont know why it didnt work on the other project, but I know if the project it is not synchronized with the source it will not work rigth.
Just try to update the diagram going in to Tool select Update Model from Source, if it generets an exception, try create another project and do the same thing from the begging.
Remember to select Tool on the menu, that is showed when you rigth-click on the folder of the project on the File Palet.
Great Hug man.

Similar Messages

  • How to extent attribute types in UML Class Diagram

    Hi all,
    Can anybody tell me, how to set the type of a attribute like date. On the picklist are only a few types available.
    I've tried to extend the model path and also the classpath with no effect.
    Thanks in advance
    Gunther

    There is nothing preventing you from writing whatever you feel like in the type drop down box. So just write date.

  • How to import Support Package 13(SAPKW70013) for SAP NetWeaver 2004s BI

    Hi,
    How to import Support Package 13 for SAP NetWeaver 2004s BI (BI Patch 13 or SAPKW70013)
    Note no for that is : 1019055.
    Thanks in Adavance,
    Dushyant.

    Hi,
    RTC for BI 7.0 SAP_BW SP 13 is scheduled in CW 21, that is coming week, after that you should be able to download it from service market place.
    @others: Dont get confused about SPS release with SP release. BI has intermediate release which is SP release, SPS is SP-Stack release (which is NetWeaver release).
    SP 12 correspond to SPS 12 which is sceduled CW 21.
    Hope this helps.
    Best Regards,
    Rajani

  • Java Source Code to UML Class Diagram

    Can anyone tell me exactly which kinds of relationships may be identified for a UML CLass diagram, directly from 'static' source code..
    Note that I am developing my own case tool which will convert from java to uml..
    At the moment, I have only managed to get Inheritance and Association relationships..
    Where Association is identified by looking at the types of all variables belonging to a class (excluding method variables etc) and if the type of the variable is non-primitive, than I have deduced it is an association relationship with that class.
    Would this be the right approach?
    Secondly I have noticed in JBuilder, it models dependency relationships by getting all the Imports at the top of the java source file, is this right?? also I have read that a dependency can be modelled by the variable types in operation arguments (paremeterS ?)..
    I would also appreciate if someone could clarify the difference betweeen Composition and Aggregation for me and explain if it is possible to identify the two relationships directly from java source code..
    Last but not least, what about multiplicity ? am I right in thinking that an instance variable is 0-1, an array declaration is seen as 0-n (fixed number) and a Vector/ data collection.. is seen as 0 - * (any number)..
    Thanks for any help,
    Regards
    Tony.

    although this post is way old it could do with a decent answer.
    some guidance can be taken from JSR26: UML Mapping for EJB
    find it a www.jcp.org
    also this research paper on consistency of reverse engineering between uml tools
    http://citeseer.nj.nec.com/545406.html
    Where Association is identified by looking at the types of all variables belonging >to a class (excluding method variables etc) and if the type of the variable is >non-primitive, than I have deduced it is an association relationship with that >class.
    Would this be the right approach?Yes. You could also say that if it is a java.* type then it would also be an attribute.
    Secondly I have noticed in JBuilder, it models dependency relationships by getting >all the Imports at the top of the java source file, is this right?? also I have >read that a dependency can be modelled by the variable types in operation >arguments (paremeterS ?)..JBuilder would be consistent with JSR26, and that's how i intend to implement in ArgoUml.
    I would also appreciate if someone could clarify the difference betweeen >Composition and Aggregation for me and explain if it is possible to identify the >two relationships directly from java source code..Composition is a stronger form of ownership. the composed class is owned only by 1 class. Its lifetime is strongly linked to its owner - ie. it is not created before its owner and it is destroyed before its owner is.
    eg. leg of a table.
    Agregation is weak ownership. the owned class may be owned by several classes.
    eg. a company is owned by many shareholders.
    Last but not least, what about multiplicity ? am I right in thinking that an >instance variable is 0-1, an array declaration is seen as 0-n (fixed number) and a >Vector/ data collection.. is seen as 0 - * (any number)..sound right.
    Alex

  • I can not drag java class onto uml class diagram - why??

    Hi
    1. I created a new java web project
    2. I created a new uml project.
    3. I created new classes in the java web project.
    4. I created a new "class diagram" in the uml project.
    PROBLEM:
    1. When I drag one of the classes onto the class diagram screen, nothing happens. That is, when I perform the "drop"...nothing happens.
    (NOTE: when I drag a "package" to the class diagram, a box representing the java package appears... I just cant get this to work for a class(s) )
    QUESTION:
    Should I be able to drag a class (or classes) from my web project src folder onto the UML project's class diagram and have UML representations of the classes appear?

    Hi Shay
    Unfortunately, I cannot view the suggested youtube stuff at work. (I'll try to view it when I get home)
    But, in the meantime, I did kind of get things working...
    After creating the java project and uml project (and initial class diagram), I had to
    1. drag the java packages (containing the classes I wanted diagrammed) onto the root node of the UML project (i.e., located on the left side "navigation" bar). Afterward, the package appeared under the UML project....Then,
    2. One by one I had to drag the individual java classes from the java project onto the root node of the UML project (i.e,. the classes then appeared under their respective packages under the UML project) . Then,
    3. Then, finally, I could drag the java classes (listed under their respective packages under the UML project) onto the class diagram panel, where the rendered properly.
    I dont know if this is supposed to be the way to "reverse engineer" java classes to be part of a UML class diagram... But, it was the only way I found that worked... thus far, anyway.
    Thanks again for reading my post and answering so promptly.... That was much appreciated!
    s

  • Jato 1.2 UML Class Diagrams

    Hi All,
    I have put together some UML class diagrams for JATO 1.2. You may find them
    useful. Please let me know if you spot any errors.
    Regards,
    Dennis Parrott.
    Dennis Parrott
    Senior Consultant
    iPlanet Professional Services
    Sun Microsystems Limited
    Guillemont Park
    Camberley Mobile: +44 (0)7765 221938
    GU17 9QG Email : dparrott@i...
    iPlanet
    e-commerce solutions
    www.iplanet.com
    [Non-text portions of this message have been removed]

    Hi Dennis--
    Only we can post files for the group. We'll be happy to do so, or if you
    would rather host a public site for them, we can post a link in the group.
    (Looking forward to seeing the diagrams.)
    Todd
    ----- Original Message -----
    From: "Dennis Parrott" <dparrott@i...>
    Sent: Monday, December 17, 2001 7:41 AM
    Subject: RE: [iPlanet-JATO] Jato 1.2 UML Class Diagrams
    Note the deliberate mistake - the document was not included - actually it
    was removed - How can I publish this to the group?
    Dennis Parrott[PARA]Senior Consultant[PARA]iPlanet Professional
    Services[PARA]Sun Microsystems Limited[NL]Guillemont Park[NL]Camberley
    Mobile: +44 (0)7765 221938[NL]GU17 9QG Email :
    dparrott@i... iPlanet [PARA]e-commerce solutions
    [PARA]www.iplanet.com
    -----Original Message-----
    From: Dennis Parrott [mailto:<a href="/group/SunONE-JATO/post?protectID=114154113180127190050057203026021130134026057192209171188199">dparrott@i...</a>]
    Sent: 17 December 2001 15:35
    Subject: [iPlanet-JATO] Jato 1.2 UML Class Diagrams
    Hi All,
    I have put together some UML class diagrams for JATO 1.2. You may findthem
    useful. Please let me know if you spot any errors.
    Regards,
    Dennis Parrott.
    Dennis Parrott
    Senior Consultant
    iPlanet Professional Services
    Sun Microsystems Limited
    Guillemont Park
    Camberley Mobile: +44 (0)7765 221938
    GU17 9QG Email : dparrott@i...
    iPlanet
    e-commerce solutions
    www.iplanet.com
    [Non-text portions of this message have been removed]
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    Choose from 1000s of job listings!
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp

  • .java - UML Class Diagram

    Hello for my university exam, i developed an application, now i need to print the UML class diagram, so I was searching around for a tool to create the class diagram for my source code.
    I had tryed the software "borland together trial edition" for eclipse IDE, but i've two problems..
    1) it creates UML class diagram just for a package without expanding subpackages..
    2) it doesn't give an easy way to export the created UML class diagram, the only "good" format for printing it can export is a "buggy" SVG...
    Do you know better (and maybe free) software to create the UML class diagram from my sources? (or maybe you know a way to solve the two problem i said?
    thank yoU!!!

    There's a package on sourceforge call JReFactory which might do the job.

  • Understanding Sun Idemtity Manager using UML Class Diagrams

    If you are a Sun IdM beginner and want to quickly and logically understand the relationships between various components in Sun IDM, then you should take a look at this:
    http://objectsource.com/blogs/2010/02/understanding-sun-idm-using-uml/
    You can also download all the UML diagrams from there.
    For those of you who understand UML, you definitely know a UML class diagram is a picture worth 1000 words.
    I never remembered all of these, so I used to carry a copy of these with me to custmer requirement and design discussions.
    Whenever customer asked details that I could not recall or was not sure, I'd pull these out as a cheatsheet to confirm and further elaborate on the design approach for the Sun IdM feature implementation.
    NOTE: I am the author of that blog as well. A little background on this post -
    I wrote the blog post a few months ago and totally forgot about it.
    A few days back, I installed wordpress site stats on my blog and I was amazed to see how many people look for Google terms "Understanding Sun IdM" and end up at my blog post.
    I thought - "Hey If it was so useful to these people, then I believe it will be useful for many more" (especially developers from Java background that have turned to Sun IdM professionals)
    Hence the post here.
    A few years back, I started using Sun IdM and was absolutely unsure where to start and what relationships exist between various components. I painfully started to understand them by going through the admin console and started drawing out these diagrams. They were sitting in my vault, but I set them free a few months back.
    Had I known what I know now, I would have released it much earlier.
    Regards,
    Srikanth Shenoy
    ObjectSource - Identity Management Professionals

    playAgain() : bool
    askBet() : int
    Payout(amt: void) : void
    takeBet(amt:void) : boolThese are methods of the "Game" class, and what is inside parentheses are called parameters.
    "void" and "bool" are return types.
    public boolean playAgain()
        }In this code you have specified boolean as a return type, so you need to return a value of type bool.
    As for the void part, you don't need to return anything.
    Code should look like:
    public boolean playAgain()
             return true; //Or return false
    public void Payout ()
             int amt;
        }You need to get :int amt" in the parameters, and since its voide nothing needs to be returned.
    public void Payout (int amt)
        }

  • 10g - UML Class Diagram Config Questions

    I'm very impressed with the UML Class diagramming capabilities of JDeveloper. I have a couple of configuration questions about it, however. Is there a way to tell JDev. not to alphabetize my attributes? I want them to display just as I have them ordered them from the actual attributes tab. Also, is there a way to have JDev. set the attributes visibility to "private" rather than "package". I find "package" an odd choice as a default. Thanks.

    Thank you for your comments. Regarding your questions:
    &gt; Is there a way to tell JDev. not to alphabetize my attributes? I want them to display just as I have them ordered them from the actual attributes tab.
    This is a bug in the tool. We have an ER to allow the user to choose between
    - ordering by name
    - ordering by visibility
    - manual ordering (determined by the dialog)
    &gt; Also, is there a way to have JDev. set the attributes visibility to "private" rather than "package".
    Not at the moment. Going forward to the next release we want to offer the user the option to customize the code generation. I have logged an ER for setting the default visibility.
    Thanks, Guus
    JDeveloper Product Manager

  • JBuilder and UML Class Diagrams?

    What version of JBuilder allows you to generate UML Class Diagrams from the Java code? I was thinking of downloading the free personal edition of JBuilder, but I'm not sure whether this functionality is included.

    What version of JBuilder allows you to generate UML
    Class Diagrams from the Java code? I was thinking of
    downloading the free personal edition of JBuilder, but
    I'm not sure whether this functionality is included.You need the enterprise version of JBuilder to get the UML diagram function.

  • Trouble with UML class diagram...

    i understand tha in a UML class diagram: + thing : int would translate to java like this: public int thing;but what would + thing(int,int) translate into?

    + thing : intmeans that 'thing' is a public instance variable with type int.
    + thing(int, int) : intmeans that 'thing()' is a public instance method that takes 2 int arguments and returns an int.

  • Javadoc/classes to uml class diagram

    Is there some method (or more likely program) that will convert either a collection of javadoc pages or java classes to a standard uml class diagram?
    Thanks.

    A number of UML tools allow you to reverse engineer Java classes. For example, Rational Rose.

  • Hungarian Naming Contentions for UML Class Diagram

    UML class diagram should be generic for all the available object oriented language and should not be language dependent. If we follow pure java naming conventions in UML class diagram, which make the UML class diagram Java language dependent not generic.
    I am trying to combine Hungarian Naming Contentions with Java Naming Convention so variable name will follow x_y schema where x_ is according to Hungarian notation attached with class attribute, which is named according to java naming standard. This naming standard satisfies UML naming convention and will also help in java programming.
    For an example,
    i_userNumber Here 'i_' is a Hungarian notation representing type of variable attached with class attribute . This indicates that the attribute is an interger , which is named according to java naming standard.
    Feedback Please

    You're going to get a gozillion answers to this question, and all of them will be both right and wrong to some degree, so I will give you my thoroughly opinionated answer to go along with all the rest.
    I am not a fan of Hungarian notation for one fairly fundamental reason. Java is a strongly typed language, thus it doesn't need indicators of type. By putting a type indicator on a variable you create potential problems when you change a data type. Won't happen? I am currently sweeping through a major portion of the application I'm working on changing data types for masses of variables because the database guys took a whim to change the data type in the database. If I were using Hungarian notation, not only would I have to change the type, the parameter type and return type for the accessor mutator methods, I'd also have to change the name, the name of the accessor and mutator methods, and anywhere that the variable is modified directly.
    The name of a thing should speak for its self. It shouldn't need an indicator flag on the front to tell me what it is.
    But you're talking about UML not Java code. The same thoughts apply. The name should speak for the thing it represents without the need for additional clarification.
    Hungarian notation in my not so humble opinion adds complexity by requiring the development team to spend effort learning, understanding, thinking about, processing, manipulating, touching, dealing with what is essentially a thoroughly artificial naming scheme.
    Just my thoughts on the subject. Your milage may of course vary wildly.

  • JDeveloper - UML Class Diagram

    Hi guys: I am looking for tutorials on UML Class Diagram. Specifically, it is possible to create a Java Class on the UML Diagram with all the fields and methods and then generate the Java Class file. Thanks

    Refer the following documentation for UML CLass diagram.
    http://www.oracle.com/webapps/online-help/jdeveloper/10.1.3/state?navSetId=_&navId=4&vtTopicFile=umlmodeling/umlmodeling/mod_gettingstartedumlclass.html&vtTopicId=
    To generate a Java class from a UML Class diagram right-click on the UML Class diagram and select Generate Java class.

  • How to import a package in jsp

    i've searching here and i've not found answer to this, so i write it here.
    i've created a class to send mail, it imports the javax.mail.* and javax.activation.*, in a package named jspbeans.
    now, when i try to use this package in my jsp page (using tomcat), gives me the error:
    Package jspbeans not found in import
    import jspbeans.*;
    the code for my jsp page is:
    <%@ page language="java" %>
    <html>
    <head>
    <title>Sending mail from JSP</title>
    </head>
    <body>
    <%@ page import="jspbeans.*"%>
    <jsp:usebean id="sendmail" class="jspbeans.SendMail" scope="page"/>
    <jsp:setProperty name="sendmail" property="host" value="mail.wavelinksystems.com"/>
    <jsp:setProperty name="sendmail" property="to" value="[email protected]"/>
    <jsp:setProperty name="sendmail" property="from" value="[email protected]"/>
    <jsp:setProperty name="sendmail" property="msg" value="testing 1 2 3..."/>
    <jsp:setProperty name="sendmail" property="subject" value="test"/>
    <%//sendmail.send();%>
    <p>
    Mail has been sent to <jsp:getProperty name="sendmail" property="to"/>
    </body>
    </html>and the path of this jsp page is:
    C:\WINDOWS\Desktop\tomcat\jakarta-tomcat-3.3.1\webapps\ROOT\pruebas\jspMailTest.jsp
    the path for the package is:
    C:\WINDOWS\Desktop\tomcat\jakarta-tomcat-3.3.1\webapps\ROOT\pruebas\jspbeans
    what am i doing wrong?
    what am i missing?
    how do i have to import the package?
    thanks

    it generates a
    java.lang.NoClassDefFoundError: javax/mail/MessagingException
    i changed the package to that directory and the import generates no errors, if i do nothing but the import, and soem printing, the page is generated, but when i try to assign the variables, generates that error, why is it?

Maybe you are looking for

  • Discontinuation part management

    Dear all, I need to manage the following case. A material M1 is replaced with a follow-up material M2 only in one Bill of Material and we neet to transfer dependent requirements for a material component M1 that is no longer in stock (in sufficient qu

  • How to get rid of full screens that won't go away.

    I was using my MacBook Pro with my tv through HDMI. I made a window full screen on my tv ( I was using Blender 3D software and the window on the tv was the same application I had on my screen). When I unplugged the HDMI the full screen window on my t

  • Laptop only connects to wireless internet in one room

    I have a Toshiba Satellite L675-S7104. I have wireless internet, and the laptop will only connect in one room. However, my work laptop and other devices are able to connect all over the house. Also, at times, the internet service cycles on and off ab

  • Simple question about media activation

    Hi, Suppose i give someone a signed media (book) on a SD card. can he plug it into his device, connect to the internet and activate it ? the question is, does the activation process need to be done in the same session of the media download, by the sa

  • WVC210 E-mail not holding password

    I have a WVC210 camera. So far I am very happy with the camera.  There  is an issue in the e-mail notification configuration where the WVC210 will  not hold my password. When I send a TEST from the application the SMTP  fails.  I then enter the passw