<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-444986195517809571</id><updated>2011-07-30T13:05:40.767-07:00</updated><title type='text'>Java</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://javadvipa.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://javadvipa.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Aisyah Runi</name><uri>http://www.blogger.com/profile/09754809777891988684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_iNFxbPL4FYE/R_dMDxJPHQI/AAAAAAAAAAM/L8A99OeHoPU/S220/runi001.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>27</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-444986195517809571.post-1570647316359814833</id><published>2009-10-03T18:44:00.000-07:00</published><updated>2009-10-03T18:44:00.580-07:00</updated><title type='text'>Signing Classes</title><content type='html'>&lt;p class="docText"&gt;Web browsers that run Java applets start by defining a few  rules and some coarse levels of security that restrict where applets may come  from and what system resources they may access. These rules are sufficient to  keep a malicious applet from attacking you, but they aren't sufficient for  applications you'd like to trust with sensitive information. To fully exploit  the power of Java, we need to have some nontechnical basis on which to make  reasonable decisions about what a program can be allowed to do. This  nontechnical basis is trust; basically, you trust certain entities not to do  anything that's harmful to you. For a home user, this may mean that you trust  the "Bank of Boofa" to distribute applets that let you transfer funds between  your accounts, or you may trust L.L. Bean to distribute an applet that debits  your Visa account. For a company, this may mean you trust applets originating  behind your firewall and perhaps applets from a few high-priority customers to  modify internal databases. In all these cases, you don't need to know in detail  what the program is going to do and give it permission for each operation. You  only need to know that you trust the source.&lt;/p&gt; &lt;p class="docText"&gt;This doesn't mean that there isn't a technical aspect to the  problem of trust. Trusting your local bank when you walk up to the ATM means one  thing; trusting some web page that claims to come from your local bank means  something else entirely. It would be very difficult to impersonate the ATM two  blocks down the street (though it has been known to happen), but, depending on  your position on the Net, it's not all that difficult to impersonate a web site  or to intercept data coming from a legitimate web site and substitute your  own.&lt;/p&gt; &lt;p class="docText"&gt;That's where cryptography comes in. &lt;span class="docEmphasis"&gt;Digital signatures&lt;/span&gt;, together with certificates&lt;a name="IDX-CHP-1-0211"&gt;&lt;/a&gt;, are techniques for verifying that data truly comes  from the source it claims to have come from and hasn't been modified en route.  If the Bank of Boofa signs its checkbook applet, your browser can verify that  the applet actually came from the bank, not an imposter, and hasn't been  modified. Therefore, you can tell your browser to trust applets that have the  Bank of Boofa's signature. Java supports digital signatures&lt;a name="IDX-CHP-1-0212"&gt;&lt;/a&gt;;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/444986195517809571-1570647316359814833?l=javadvipa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadvipa.blogspot.com/feeds/1570647316359814833/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://javadvipa.blogspot.com/2009/10/signing-classes.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/1570647316359814833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/1570647316359814833'/><link rel='alternate' type='text/html' href='http://javadvipa.blogspot.com/2009/10/signing-classes.html' title='Signing Classes'/><author><name>Aisyah Runi</name><uri>http://www.blogger.com/profile/09754809777891988684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_iNFxbPL4FYE/R_dMDxJPHQI/AAAAAAAAAAM/L8A99OeHoPU/S220/runi001.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-444986195517809571.post-643198088294346547</id><published>2009-10-02T18:43:00.001-07:00</published><updated>2009-10-02T18:43:45.485-07:00</updated><title type='text'>Application and User-Level Security</title><content type='html'>&lt;p class="docText"&gt;There's a fine line between having enough power to do something  useful and having all the power to do anything you want. Java provides the  foundation for a secure environment in which untrusted code can be quarantined,  managed, and safely executed. However, unless you are content with keeping that  code in a little black box and running it just for its own benefit, you will  have to grant it access to at least some system resources so that it can be  useful. Every kind of access carries with it certain risks and benefits. For  example, in the web browser environment, the advantages of granting an untrusted  (unknown) applet access to your windowing system are that it can display  information and let you interact in a useful way. The associated risks are that  the applet may instead display something worthless, annoying, or offensive.  Since most people can accept that level of risk, graphical applets and the Web  in general are possible.&lt;/p&gt; &lt;p class="docText"&gt;At one extreme, the simple act of running an application gives  it a resourcecomputation timethat it may put to good use or burn frivolously.  It's difficult to prevent an untrusted application from wasting your time or  even attempting a "denial of service" attack. At the other extreme, a powerful,  trusted application may justifiably deserve access to all sorts of system  resources (e.g., the filesystem, process creation, network interfaces); a  malicious application could wreak havoc with these resources. The message here  is that important and sometimes complex security issues have to be  addressed.&lt;/p&gt; &lt;p class="docText"&gt;In some situations, it may be acceptable to simply ask the user  to "okay" requests. With Sun's Java plug-in, web browsers can pop up a dialog  box and ask the user's permission for an applet to access an otherwise  restricted file. However, we can put only so much burden on our users. An  experienced person will quickly grow tired of answering questions; an  inexperienced user may not be able to answer the questions correctly. Is it okay  for me to grant an applet access to something if I don't understand what that  is?&lt;/p&gt; &lt;p class="docText"&gt;Making decisions about what is dangerous and what is not can be  difficult. Even ostensibly harmless access, such as displaying a window, can  become a threat when paired with the ability of an untrusted application to  communicate from your host. The Java Security Manager provides an option to flag  windows created by an untrusted application with a special, recognizable border  to prevent it from impersonating another application and perhaps tricking you  into revealing your password or your secret recipe collection. There is also a  grey area, in which an application can do devious things that aren't quite  destructive. An applet that can mail a bug report can also mail-bomb your boss.  The Java language provides the tools to implement whatever security policies you  want. However, what these policies will be ultimately depends on who you are,  what you are doing, and where you are doing it.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/444986195517809571-643198088294346547?l=javadvipa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadvipa.blogspot.com/feeds/643198088294346547/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://javadvipa.blogspot.com/2009/10/application-and-user-level-security.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/643198088294346547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/643198088294346547'/><link rel='alternate' type='text/html' href='http://javadvipa.blogspot.com/2009/10/application-and-user-level-security.html' title='Application and User-Level Security'/><author><name>Aisyah Runi</name><uri>http://www.blogger.com/profile/09754809777891988684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_iNFxbPL4FYE/R_dMDxJPHQI/AAAAAAAAAAM/L8A99OeHoPU/S220/runi001.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-444986195517809571.post-4128322405034372021</id><published>2009-06-18T19:13:00.000-07:00</published><updated>2009-06-18T19:18:20.677-07:00</updated><title type='text'>Java Compared with Other Languages</title><content type='html'>&lt;h3 class="docSection1Title"&gt;&lt;br /&gt;&lt;/h3&gt;&lt;a name="IDX-CHP-1-0100"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0101"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0102"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0103"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0104"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0105"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0106"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0107"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0108"&gt;&lt;/a&gt; &lt;p class="docText"&gt;Java is a relatively new language, but it draws on many years  of programming experience with other languages in its choice of features. It is  worth taking a moment to compare Java at a high level with some other popular  languages today, both for the benefit of those of you with other programming  experience and for the newcomers who need to put things in context. We do not  expect you to have a knowledge of any particular programming language in this  book and when we refer to other languages by way of comparison we hope that the  comments are self-explanatory.&lt;/p&gt; &lt;p class="docText"&gt;At least three pillars are necessary to support a universal  programming language today: portability, speed, and security. &lt;a class="docLink" href="http://www.blogger.com/post-create.g?blogID=444986195517809571#learnjava3-CHP-1-FIG-2"&gt;Figure 1-2&lt;/a&gt; shows how Java compares to a  couple of other languages.&lt;/p&gt;&lt;a name="learnjava3-CHP-1-FIG-2"&gt;&lt;/a&gt; &lt;p&gt; &lt;/p&gt;&lt;center&gt; &lt;h5 class="docFigureTitle"&gt;Figure 1-2. Programming languages compared&lt;/h5&gt;&lt;br /&gt;&lt;/center&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_iNFxbPL4FYE/Sjr05GPvdpI/AAAAAAAAATQ/EYuIvFy_N1s/s1600-h/javavsotherlang.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 154px;" src="http://4.bp.blogspot.com/_iNFxbPL4FYE/Sjr05GPvdpI/AAAAAAAAATQ/EYuIvFy_N1s/s400/javavsotherlang.JPG" alt="" id="BLOGGER_PHOTO_ID_5348856769222243986" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p class="docText"&gt;You may have heard that Java is a lot like C or C++, but that's  really not true, except at a superficial level. When you first look at Java  code, you'll see that the basic syntax looks like C or C++. But that's where the  similarities end. Java is by no means a direct descendant of C or a  next-generation C++. If you compare language features, you'll see that Java  actually has more in common with highly dynamic languages such as Smalltalk and  Lisp. In fact, Java's implementation is about as far from native C as you can  imagine.&lt;/p&gt; &lt;p class="docText"&gt;The surface-level similarities to these languages are worth  noting, however. Java borrows heavily from C and C++ syntax, so you'll see terse  language constructs, including an abundance of curly braces and semicolons. Java  subscribes to the C philosophy that a good language should be compact; in other  words, it should be sufficiently small and regular so a programmer can hold all  the language's capabilities in his or her head at once. Just as C is extensible  with libraries, packages of Java classes can be added to the core language  components to extend its vocabulary.&lt;/p&gt; &lt;p class="docText"&gt;C has been successful because it provides a reasonably  feature-packed programming environment, with high performance and an acceptable  degree of portability. Java also tries to balance functionality, speed, and  portability, but it does so in a very different way. C trades functionality for  portability; Java initially traded speed for portability. Java also addresses  security issues while C doesn't.&lt;/p&gt; &lt;p class="docText"&gt;In the early days before JIT and adaptive compilation, Java was  slower than statically compiled languages and there was a constant refrain from  detractors that it would never catch up. But as we described in the previous  section, Java's performance is now comparable to C or C++ for equivalent tasks  and those criticisms have generally fallen quiet. In fact, in 2004, ID  Software's open source Quake2 video game engine was ported to Java. If Java is  fast enough for first-person-shooter video games, it's certainly fast enough for  business applications.&lt;/p&gt; &lt;p class="docText"&gt;Scripting languages, such as Perl, Python, and Ruby, are very  popular, and for good reason. There's no reason a scripting language can't be  suitable for safe, networked applications. But most scripting languages are not  designed for serious, large-scale programming. The attraction to scripting  languages is that they are dynamic; they are powerful tools for rapid  development. Some scripting languages such as Perl also provide powerful tools  for text-processing tasks that more general-purpose languages find unwieldy.  Scripting languages are also highly portable, albeit at the source-code  level.&lt;/p&gt; &lt;p class="docText"&gt;Not to be confused with Java, JavaScript is an object-based  scripting language originally developed by Netscape for the web browser. It  serves as a glue and an "in the document" language for dynamic, interactive  HTML-based applications. JavaScript takes its name from its intended integration  with Java applets and some similarity in syntax, but the comparison really ends  there. While there have been applications of JavaScript outside of the browser,  it has never really caught on as a general scripting language. For more  information on JavaScript, check out &lt;span class="docEmphasis"&gt;JavaScript: The  Definitive Guide&lt;/span&gt; by David Flanagan (O'Reilly).&lt;/p&gt; &lt;p class="docText"&gt;The problem with scripting languages is that they are rather  casual about program structure and data typing. Most scripting languages (with a  hesitant exception for Python and later versions of Perl) are not  object-oriented. They also have vastly simplified type systems and generally  don't provide for sophisticated scoping of variables and functions. These  characteristics make them unsuitable for building large, modular applications.  Speed is another problem with scripting languages; the high-level, fully  interpreted nature of these languages often makes them quite slow.&lt;/p&gt; &lt;p class="docText"&gt;Advocates of individual scripting languages would take issue  with some of these generalizations and no doubt they'd be right in some  casesscripting languages are growing up. But the fundamental tradeoff is  undeniable: scripting languages were born as loose, less structured alternatives  to systems programming languages and are generally not as suitable for large or  complex projects for a variety of reasons, at least not today.&lt;/p&gt; &lt;p class="docText"&gt;Java offers some of the essential advantages of a scripting  language (it is highly dynamic), along with the added benefits of a lower-level  language. Java 1.4 added a powerful Regular Expression API that competes with  Perl for working with text and Java 5.0 has introduced new language features  that streamline coding, such as "foreach"-style iteration over collections,  variable argument lists, autoboxing and unboxing of primitives, and static  imports of methods.&lt;/p&gt; &lt;p class="docText"&gt;Incremental development with object-oriented components,  combined with Java's simplicity, make it possible to develop applications  rapidly and change them easily. Studies have found that development in Java is  faster than in C or C++, strictly based on language features.&lt;sup class="docFootnote"&gt;&lt;a class="docLink" href="http://www.blogger.com/post-create.g?blogID=444986195517809571#learnjava3-CHP-1-FNOTE-1"&gt;[*]&lt;/a&gt;&lt;/sup&gt; Java also comes with a large base  of standard core classes for common tasks such as building GUIs and handling  network communications. But along with these features, Java has the scalability  and software-engineering advantages of more static languages. It provides a safe  structure on which to build higher-level frameworks (and even other  languages).&lt;/p&gt; &lt;blockquote&gt; &lt;p class="docFootnote"&gt;&lt;sup&gt;&lt;a name="learnjava3-CHP-1-FNOTE-1"&gt;[*]&lt;/a&gt;&lt;/sup&gt; See,  for example, G. Phipps, "Comparing Observed Bug and Productivity Rates for Java  and C++," &lt;span class="docEmphasis"&gt;SoftwarePractice &amp;amp; Experience&lt;/span&gt;,  Volume 29, 1999 (&lt;a class="docLink" href="http://www.spirus.com.au/papersAndTalks/javaVsC++.pdf" target="_blank"&gt;http://www.spirus.com.au/papersAndTalks/javaVsC++.pdf&lt;/a&gt;).&lt;/p&gt;&lt;/blockquote&gt; &lt;p class="docText"&gt;As we've already said, Java is similar in design to languages  such as Smalltalk and Lisp. However, these languages are currently used mostly  as research vehicles rather than for development of large-scale systems. One  reason is that these languages never developed a standard portable binding to  operating-system services, such as the C standard library or the Java core  classes. Smalltalk is compiled to an interpreted bytecode format, and it can be  dynamically compiled to native code on the fly, just like Java. But Java  improves on the design by using a bytecode verifier to ensure the correctness of  compiled Java code. This verifier gives Java a performance advantage over  Smalltalk because Java code requires fewer runtime checks. Java's bytecode  verifier also helps with security issues, something that Smalltalk doesn't  address. Smalltalk is a mature language, though, and Java's designers took  lessons from many of its features.&lt;/p&gt; &lt;p class="docText"&gt;Throughout the rest of this chapter, we'll present a bird's-eye  view of the Java language. We'll explain what's new and what's not-so-new about  Java and why.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/444986195517809571-4128322405034372021?l=javadvipa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadvipa.blogspot.com/feeds/4128322405034372021/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://javadvipa.blogspot.com/2009/06/java-compared-with-other-languages.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/4128322405034372021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/4128322405034372021'/><link rel='alternate' type='text/html' href='http://javadvipa.blogspot.com/2009/06/java-compared-with-other-languages.html' title='Java Compared with Other Languages'/><author><name>Aisyah Runi</name><uri>http://www.blogger.com/profile/09754809777891988684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_iNFxbPL4FYE/R_dMDxJPHQI/AAAAAAAAAAM/L8A99OeHoPU/S220/runi001.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_iNFxbPL4FYE/Sjr05GPvdpI/AAAAAAAAATQ/EYuIvFy_N1s/s72-c/javavsotherlang.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-444986195517809571.post-2720498718403501774</id><published>2009-06-05T20:28:00.000-07:00</published><updated>2009-06-05T20:28:00.955-07:00</updated><title type='text'>Objects</title><content type='html'>&lt;h4 class="docSection2Title"&gt;Class Instantiation&lt;/h4&gt; &lt;p class="docText"&gt;The process of creating objects from a class is called &lt;span class="docEmphasis"&gt;instantiation&lt;/span&gt;. An &lt;span class="docEmphasis"&gt;object&lt;/span&gt;  is an instance of a class. The object is constructed using the class as a  blueprint and is a concrete instance of the abstraction that the class  represents. An object must be created before it can be used in a program. In  Java, objects are manipulated through &lt;span class="docEmphasis"&gt;object  references&lt;/span&gt; (also called &lt;span class="docEmphasis"&gt;reference values&lt;/span&gt;  or simply &lt;span class="docEmphasis"&gt;references&lt;/span&gt;). The process of creating  objects usually involves the following steps:&lt;a name="idd1e6383"&gt;&lt;/a&gt;&lt;a name="idd1e6386"&gt;&lt;/a&gt;&lt;a name="idd1e6389"&gt;&lt;/a&gt;&lt;a name="idd1e6396"&gt;&lt;/a&gt;&lt;a name="idd1e6401"&gt;&lt;/a&gt;&lt;a name="idd1e6404"&gt;&lt;/a&gt;&lt;a name="idd1e5140"&gt;&lt;/a&gt;&lt;/p&gt;&lt;a name="ch01pr01"&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt; &lt;ol class="docList"&gt;&lt;li&gt;&lt;span style="font-weight: normal;" value="1"&gt; &lt;p class="docList"&gt;Declaration of a variable to store the object reference.&lt;a name="idd1e6416"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="docText"&gt;This involves declaring a &lt;span class="docEmphasis"&gt;reference  variable&lt;/span&gt; of the appropriate class to store the reference to the object.&lt;a name="idd1e6429"&gt;&lt;/a&gt;&lt;/p&gt;&lt;pre&gt;// Declaration of two reference variables that will denote&lt;br /&gt;// two distinct objects, namely two stacks of characters, respectively.&lt;br /&gt;CharStack stack1, stack2;&lt;br /&gt;&lt;/pre&gt;&lt;/span&gt; &lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: normal;" value="2"&gt; &lt;p class="docList"&gt;Creating an object.&lt;/p&gt; &lt;p class="docList"&gt;This involves using the &lt;tt&gt;new&lt;/tt&gt; operator in conjunction  with a call to a constructor, to create an instance of the class.&lt;a name="idd1e6447"&gt;&lt;/a&gt;&lt;/p&gt;&lt;pre&gt;// Create two distinct stacks of chars.&lt;br /&gt;stack1 = new CharStack(10); // Stack length: 10 chars&lt;br /&gt;stack2 = new CharStack(5);  // Stack length: 5 chars&lt;br /&gt;&lt;/pre&gt; &lt;p class="docList"&gt;The &lt;tt&gt;new&lt;/tt&gt; operator returns a reference to a new instance  of the &lt;tt&gt;CharStack&lt;/tt&gt; class. This reference can be assigned to a reference  variable of the appropriate class.&lt;/p&gt; &lt;p class="docList"&gt;Each object has a unique identity and has its own copy of the  fields declared in the class definition. The two stacks, denoted by  &lt;tt&gt;stack1&lt;/tt&gt; and &lt;tt&gt;stack2&lt;/tt&gt;, will have their own &lt;tt&gt;stackArray&lt;/tt&gt; and  &lt;tt&gt;topOfStack&lt;/tt&gt; fields.&lt;a name="idd1e6479"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="docText"&gt;The purpose of the constructor call on the right side of the  &lt;tt&gt;new&lt;/tt&gt; operator is to initialize the newly created object. In this  particular case, for each new &lt;tt&gt;CharStack&lt;/tt&gt; instance created using the  &lt;tt&gt;new&lt;/tt&gt; operator, the constructor creates an array of characters. The  length of this array is given by the value of the argument to the constructor.  The constructor also initializes the &lt;tt&gt;topOfStack&lt;/tt&gt; field.&lt;a name="idd1e6501"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/span&gt; &lt;p class="docText"&gt;The declaration and the instantiation can also be combined:&lt;/p&gt;&lt;pre&gt;CharStack stack1 = new CharStack(10),&lt;br /&gt;         stack2 = new CharStack(5);&lt;br /&gt;&lt;/pre&gt; &lt;p class="docText"&gt;&lt;a class="docLink" href="#ch01fig02"&gt;Figure 1.2&lt;/a&gt; shows the UML  notation for objects. The graphical representation of an object is very similar  to that of a class. &lt;a class="docLink" href="#ch01fig02"&gt;Figure 1.2&lt;/a&gt; shows the  canonical notation, where the name of the reference variable denoting the object  is prefixed to the class name with a colon &lt;tt&gt;':'&lt;/tt&gt;. If the name of the  reference variable is omitted, as in &lt;a class="docLink" href="0201728281_ch01lev1sec2.html#ch01fig01"&gt;Figure 1.2b&lt;/a&gt;, this denotes an  anonymous object. Since objects in Java do not have names, but are denoted by  references, a more elaborate notation is shown in &lt;a class="docLink" href="0201728281_ch01lev1sec2.html#ch01fig01"&gt;Figure 1.2c&lt;/a&gt;, where objects  representing references of &lt;tt&gt;CharStack&lt;/tt&gt; class explicitly refer to  &lt;tt&gt;CharStack&lt;/tt&gt; objects. In most cases, the more compact notation will  suffice.&lt;/p&gt; &lt;center&gt; &lt;h5 class="docFigureTitle"&gt;&lt;a name="ch01fig02"&gt;&lt;/a&gt;Figure 1.2. UML Notation for  Objects&lt;/h5&gt;&lt;/center&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_iNFxbPL4FYE/Sic_8DdkNzI/AAAAAAAAASY/DP8cWRciNEM/s1600-h/umlnotationobjects.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 279px;" src="http://2.bp.blogspot.com/_iNFxbPL4FYE/Sic_8DdkNzI/AAAAAAAAASY/DP8cWRciNEM/s400/umlnotationobjects.JPG" alt="" id="BLOGGER_PHOTO_ID_5343309783852398386" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 class="docSection2Title"&gt;&lt;br /&gt;&lt;/h4&gt;&lt;h4 class="docSection2Title"&gt;Object References&lt;/h4&gt; &lt;p class="docText"&gt;A reference provides a handle to an object that is created and  stored in memory. In Java, objects can only be manipulated via references, which  can be stored in variables. An object can have several references, often called  its &lt;span class="docEmphasis"&gt;aliases&lt;/span&gt;. The object can be manipulated via  any one of its aliases.&lt;a name="idd1e6564"&gt;&lt;/a&gt;&lt;a name="idd1e6567"&gt;&lt;/a&gt;&lt;a name="idd1e6572"&gt;&lt;/a&gt;&lt;/p&gt;&lt;pre&gt;// Create two distinct stacks of chars.&lt;br /&gt;CharStack stackA = new CharStack(12); // Stack length: 12 chars&lt;br /&gt;CharStack stackB = new CharStack(6);  // Stack length: 6 chars&lt;br /&gt;&lt;br /&gt;stackB = stackA;                      // (1) aliases after assignment&lt;br /&gt;// Stack previously referenced by stackB can now be garbage collected.&lt;br /&gt;&lt;/pre&gt; &lt;p class="docText"&gt;Two stacks are created in the code above. Before the assignment  at (1), the situation is as depicted in &lt;a class="docLink" href="http://www.blogger.com/post-create.g?blogID=444986195517809571#ch01fig03"&gt;Figure 1.3a&lt;/a&gt;. After the assignment at (1), reference  variables &lt;tt&gt;stackA&lt;/tt&gt; and &lt;tt&gt;stackB&lt;/tt&gt; will denote the same stack, as  depicted in &lt;a class="docLink" href="http://www.blogger.com/0201728281_ch01lev1sec2.html#ch01fig01"&gt;Figure 1.3b&lt;/a&gt;. Reference  variables &lt;tt&gt;stackA&lt;/tt&gt; and &lt;tt&gt;stackB&lt;/tt&gt; are aliases after the assignment,  as they refer to the same object. What happens to the stack object that was  denoted by the reference variable &lt;tt&gt;stackB&lt;/tt&gt; before the assignment? When  objects are no longer in use, their memory is, if necessary, reclaimed and  reallocated for other objects. This is called &lt;span class="docEmphasis"&gt;automatic  garbage collection&lt;/span&gt;. Garbage collection in Java is taken care of by the  runtime system.&lt;a name="idd1e6611"&gt;&lt;/a&gt;&lt;/p&gt; &lt;center&gt; &lt;h5 class="docFigureTitle"&gt;&lt;a name="ch01fig03"&gt;&lt;/a&gt;Figure 1.3. Aliases&lt;/h5&gt;&lt;/center&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_iNFxbPL4FYE/Sic_kKn6YGI/AAAAAAAAASQ/LuzhZ707Q0U/s1600-h/aliases.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 260px;" src="http://4.bp.blogspot.com/_iNFxbPL4FYE/Sic_kKn6YGI/AAAAAAAAASQ/LuzhZ707Q0U/s400/aliases.JPG" alt="" id="BLOGGER_PHOTO_ID_5343309373457981538" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/444986195517809571-2720498718403501774?l=javadvipa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadvipa.blogspot.com/feeds/2720498718403501774/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://javadvipa.blogspot.com/2009/06/objects.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/2720498718403501774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/2720498718403501774'/><link rel='alternate' type='text/html' href='http://javadvipa.blogspot.com/2009/06/objects.html' title='Objects'/><author><name>Aisyah Runi</name><uri>http://www.blogger.com/profile/09754809777891988684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_iNFxbPL4FYE/R_dMDxJPHQI/AAAAAAAAAAM/L8A99OeHoPU/S220/runi001.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_iNFxbPL4FYE/Sic_8DdkNzI/AAAAAAAAASY/DP8cWRciNEM/s72-c/umlnotationobjects.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-444986195517809571.post-8911048346134057575</id><published>2009-06-04T20:20:00.000-07:00</published><updated>2009-06-04T20:20:01.075-07:00</updated><title type='text'>Classes</title><content type='html'>&lt;p class="docText"&gt;One of the fundamental ways in which we handle complexity is  &lt;span class="docEmphasis"&gt;abstractions&lt;/span&gt;. An abstraction denotes the  essential properties and behaviors of an object that differentiate it from other  objects. The essence of OOP is modelling abstractions, using classes and  objects. The hard part in this endeavour is finding the right abstractions.&lt;a name="idd1e6126"&gt;&lt;/a&gt;&lt;a name="idd1e6129"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="docText"&gt;A &lt;span class="docEmphasis"&gt;class&lt;/span&gt; denotes a category of  objects, and acts as a blueprint for creating such objects. A class models an  abstraction by defining the properties and behaviors for the objects  representing the abstraction. An object exhibits the properties and behaviors  defined by its class. The properties of an object of a class are also called  &lt;span class="docEmphasis"&gt;attributes&lt;/span&gt;, and are defined by &lt;span class="docEmphasis"&gt;fields&lt;/span&gt; in Java. A &lt;span class="docEmphasis"&gt;field&lt;/span&gt;  in a class definition is a variable which can store a value that represents a  particular property. The behaviors of an object of a class are also known as  &lt;span class="docEmphasis"&gt;operations&lt;/span&gt;, and are defined using &lt;span class="docEmphasis"&gt;methods&lt;/span&gt; in Java. Fields and methods in a class  definition are collectively called &lt;span class="docEmphasis"&gt;members&lt;/span&gt;.&lt;a name="idd1e6156"&gt;&lt;/a&gt;&lt;a name="idd1e6165"&gt;&lt;/a&gt;&lt;a name="idd1e6168"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="docText"&gt;An important distinction is made between the &lt;span class="docEmphasis"&gt;contract&lt;/span&gt; and the &lt;span class="docEmphasis"&gt;implementation&lt;/span&gt; that a class provides for its objects.  The contract defines &lt;span class="docEmphasis"&gt;what&lt;/span&gt; services, and the  implementation defines &lt;span class="docEmphasis"&gt;how&lt;/span&gt; these services are  provided by the class. Clients (i.e., other objects) only need to know the  contract of an object, and not its implementation, in order to avail themselves  of the object's services.&lt;a name="idd1e6186"&gt;&lt;/a&gt;&lt;a name="idd1e6189"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="docText"&gt;As an example, we will implement different versions of a class  that models the abstraction of a stack that can push and pop characters. The  stack will use an array of characters to store the characters, and a field to  indicate the top element in the stack. Using Unified Modeling Language (UML)  notation, a class called &lt;tt&gt;CharStack&lt;/tt&gt; is graphically depicted in &lt;a class="docLink" href="http://www.blogger.com/post-create.g?blogID=444986195517809571#ch01fig01"&gt;Figure 1.1&lt;/a&gt;, which models the abstraction.  Both fields and method names are shown in &lt;a class="docLink" href="http://www.blogger.com/post-create.g?blogID=444986195517809571#ch01fig01"&gt;Figure 1.1a&lt;/a&gt;.&lt;a name="idd1e6205"&gt;&lt;/a&gt;&lt;a name="idd1e4943"&gt;&lt;/a&gt;&lt;a name="idd1e6217"&gt;&lt;/a&gt;&lt;/p&gt; &lt;center&gt; &lt;h5 class="docFigureTitle"&gt;&lt;a name="ch01fig01"&gt;&lt;/a&gt;Figure 1.1. UML Notation for  Classes&lt;/h5&gt;&lt;a name="idd1e6228"&gt;&lt;/a&gt;&lt;a name="idd1e6235"&gt;&lt;/a&gt; &lt;p class="docText"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_iNFxbPL4FYE/Sic-VdxC2ZI/AAAAAAAAASI/xmZVZgQ3sf0/s1600-h/umlnotation.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 174px;" src="http://1.bp.blogspot.com/_iNFxbPL4FYE/Sic-VdxC2ZI/AAAAAAAAASI/xmZVZgQ3sf0/s400/umlnotation.JPG" alt="" id="BLOGGER_PHOTO_ID_5343308021386893714" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;/center&gt;&lt;a name="ch01lev2sec1"&gt;&lt;/a&gt; &lt;h4 class="docSection2Title"&gt;Declaring Members: Fields and Methods&lt;/h4&gt;&lt;a name="idd1e6248"&gt;&lt;/a&gt;&lt;a name="idd1e6251"&gt;&lt;/a&gt; &lt;p class="docText"&gt;&lt;span class="docLink"&gt;Example 1.1&lt;/span&gt; shows the  definition of the class &lt;tt&gt;CharStack&lt;/tt&gt; depicted in &lt;span class="docLink"&gt;Figure 1.1&lt;/span&gt;. Its intention is to illustrate the salient  features of a class definition in Java, and not effective implementation of  stacks.&lt;/p&gt; &lt;p class="docText"&gt;A class definition consists of a series of member declarations.  In the case of the class &lt;tt&gt;CharStack&lt;/tt&gt;, it has two fields:&lt;/p&gt; &lt;ul&gt;&lt;li&gt; &lt;p class="docList"&gt;&lt;tt&gt;stackArray&lt;/tt&gt;, which is an array to hold the elements of  the stack (in this case characters)&lt;a name="idd1e6281"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/li&gt;&lt;li&gt; &lt;p class="docList"&gt;&lt;tt&gt;topOfStack&lt;/tt&gt;, which denotes the top element of the stack  (i.e., index of the last character stored in the array)&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p class="docText"&gt;The class &lt;tt&gt;CharStack&lt;/tt&gt; has five methods that implement  the essential operations on a stack:&lt;/p&gt; &lt;ul&gt;&lt;li&gt; &lt;p class="docList"&gt;&lt;tt&gt;push()&lt;/tt&gt; pushes a character on to the stack&lt;/p&gt; &lt;/li&gt;&lt;li&gt; &lt;p class="docList"&gt;&lt;tt&gt;pop()&lt;/tt&gt; removes and returns the top element of the  stack&lt;/p&gt; &lt;/li&gt;&lt;li&gt; &lt;p class="docList"&gt;&lt;tt&gt;peek()&lt;/tt&gt; returns the top element of the stack for  inspection&lt;/p&gt; &lt;/li&gt;&lt;li&gt; &lt;p class="docList"&gt;&lt;tt&gt;isEmpty()&lt;/tt&gt; determines whether the stack is empty&lt;/p&gt; &lt;/li&gt;&lt;li&gt; &lt;p class="docList"&gt;&lt;tt&gt;isFull()&lt;/tt&gt; determines whether the stack is  full&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p class="docText"&gt;The class definition also has a method-like declaration with  the same name as the class, (2). Such declarations are called &lt;span class="docEmphasis"&gt;constructors&lt;/span&gt;. As we shall see, a constructor is  executed when an object is created from the class. However, the implementation  details in the example are not important for the present discussion.&lt;a name="idd1e6334"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h5 class="docExampleTitle"&gt;&lt;a name="ch01list01"&gt;&lt;/a&gt;Example 1.1 Basic Elements of a  Class Definition&lt;/h5&gt;&lt;pre&gt;// Source Filename: CharStack.java&lt;br /&gt;public class CharStack {          // Class name&lt;br /&gt;  // Class Declarations:&lt;br /&gt;&lt;br /&gt;  // (1) Fields:&lt;br /&gt;  private char[] stackArray;    // The array implementing the stack.&lt;br /&gt;  private int    topOfStack;    // The top of the stack.&lt;br /&gt;&lt;br /&gt;  // (2) Constructor:&lt;br /&gt;  public CharStack(int n) { stackArray = new char[n]; topOfStack = -1; }&lt;br /&gt;&lt;br /&gt;  // (3) Methods:&lt;br /&gt;  public void push(char element) { stackArray[++topOfStack] = element; }&lt;br /&gt;  public char pop()              { return stackArray[topOfStack--]; }&lt;br /&gt;  public char peek()             { return stackArray[topOfStack]; }&lt;br /&gt;  public boolean isEmpty()       { return topOfStack &lt; topofstack ="=""&gt; }&lt;br /&gt;public boolean isFull()        { return topOfStack == stackArray.length - 1; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/444986195517809571-8911048346134057575?l=javadvipa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadvipa.blogspot.com/feeds/8911048346134057575/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://javadvipa.blogspot.com/2009/06/classes.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/8911048346134057575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/8911048346134057575'/><link rel='alternate' type='text/html' href='http://javadvipa.blogspot.com/2009/06/classes.html' title='Classes'/><author><name>Aisyah Runi</name><uri>http://www.blogger.com/profile/09754809777891988684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_iNFxbPL4FYE/R_dMDxJPHQI/AAAAAAAAAAM/L8A99OeHoPU/S220/runi001.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_iNFxbPL4FYE/Sic-VdxC2ZI/AAAAAAAAASI/xmZVZgQ3sf0/s72-c/umlnotation.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-444986195517809571.post-2658710431662124288</id><published>2009-06-03T20:11:00.001-07:00</published><updated>2009-06-03T20:16:18.337-07:00</updated><title type='text'>To pass the Sun Certified Programmer for Java 2 Platform 1.4 exam (SCPJ2 1.4)</title><content type='html'>&lt;p class="docText"&gt;Before embarking on the road to Java programmer certification,  it is important to understand the basic terminology and concepts in  object-oriented programming (OOP). In this chapter, the emphasis is on providing  an introduction rather than an exhaustive coverage. In-depth coverage of the  concepts follows in due course in subsequent chapters of the book.&lt;/p&gt; &lt;p class="docText"&gt;Java supports the writing of many different kinds of  executables: applications, applets, and servlets. The basic elements of a Java  application are introduced in this chapter. The old adage that practice makes  perfect is certainly true when learning a programming language. To encourage  programming on the computer, the mechanics of compiling and running a Java  application are outlined.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/444986195517809571-2658710431662124288?l=javadvipa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadvipa.blogspot.com/feeds/2658710431662124288/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://javadvipa.blogspot.com/2009/06/to-pass-sun-certified-programmer-for.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/2658710431662124288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/2658710431662124288'/><link rel='alternate' type='text/html' href='http://javadvipa.blogspot.com/2009/06/to-pass-sun-certified-programmer-for.html' title='To pass the Sun Certified Programmer for Java 2 Platform 1.4 exam (SCPJ2 1.4)'/><author><name>Aisyah Runi</name><uri>http://www.blogger.com/profile/09754809777891988684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_iNFxbPL4FYE/R_dMDxJPHQI/AAAAAAAAAAM/L8A99OeHoPU/S220/runi001.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-444986195517809571.post-4457981989045619978</id><published>2009-05-19T19:03:00.000-07:00</published><updated>2009-05-19T19:05:53.170-07:00</updated><title type='text'>Safety of Design</title><content type='html'>&lt;h3 class="docSection1Title" id="474380-896"&gt;&lt;br /&gt;&lt;/h3&gt;&lt;a name="IDX-CHP-1-0109"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0110"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0111"&gt;&lt;/a&gt; &lt;p class="docText"&gt;You have no doubt heard a lot about the fact that Java is  designed to be a safe language. But what do we mean by safe? Safe from what or  whom? The security features that attract the most attention for Java are those  features that make possible new types of dynamically portable software. Java  provides several layers of protection from dangerously flawed code as well as  more mischievous things such as viruses and Trojan horses. In the next section,  we'll take a look at how the Java virtual machine architecture assesses the  safety of code before it's run and how the Java &lt;span class="docEmphasis"&gt;class  loader&lt;/span&gt; (the bytecode loading mechanism of the Java interpreter) builds a  wall around untrusted classes. These features provide the foundation for  high-level security policies that can allow or disallow various kinds of  activities on an application-by-application basis.&lt;/p&gt; &lt;p class="docText"&gt;In this section, though, we'll look at some general features of  the Java programming language. Perhaps more important than the specific security  features, although often overlooked in the security din, is the safety that Java  provides by addressing common design and programming problems. Java is intended  to be as safe as possible from the simple mistakes we make ourselves as well as  those we inherit from legacy software. The goal with Java has been to keep the  language simple, provide tools that have demonstrated their usefulness, and let  users build more complicated facilities on top of the language when  needed.&lt;/p&gt;&lt;a name="learnjava3-CHP-1-SECT-4.1"&gt;&lt;/a&gt; &lt;h4 class="docSection2Title"&gt;Simplify, Simplify, Simplify...&lt;/h4&gt;&lt;a name="IDX-CHP-1-0112"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0113"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0114"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0115"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0116"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0117"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0118"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0119"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0120"&gt;&lt;/a&gt; &lt;p class="docText"&gt;With Java, simplicity rules. Since Java started with a clean  slate, it was able to avoid features that proved to be messy or controversial in  other languages. For example, Java doesn't allow programmer-defined operator  overloading (which in some languages allows programmers to redefine the meaning  of basic symbols like + and -). Java doesn't have a source code preprocessor, so  it doesn't have things like macros, &lt;tt&gt;#define&lt;/tt&gt; statements, or conditional  source compilation&lt;a name="IDX-CHP-1-0121"&gt;&lt;/a&gt;. These constructs exist in other  languages primarily to support platform dependencies, so in that sense, they  should not be needed in Java. Conditional compilation is also commonly used for  debugging&lt;a name="IDX-CHP-1-0122"&gt;&lt;/a&gt;, but Java's sophisticated runtime  optimizations and features such as &lt;span class="docEmphasis"&gt;assertions&lt;/span&gt;  solve the problem more elegantly (we'll cover these in &lt;span class="docLink"&gt;Chapter 4&lt;/span&gt;).&lt;/p&gt; &lt;p class="docText"&gt;Java provides a well-defined &lt;span class="docEmphasis"&gt;package&lt;/span&gt; structure for organizing class files. The  package system allows the compiler to handle some of the functionality of the  traditional &lt;span class="docEmphasis"&gt;make&lt;/span&gt; utility (a tool for building  executables from source code). The compiler can also work with compiled Java  classes directly because all type information is preserved; there is no need for  extraneous source "header" files, as in C/C++. All this means that Java code  requires less context to read. Indeed, you may sometimes find it faster to look  at the Java source code than to refer to class documentation.&lt;/p&gt; &lt;p class="docText"&gt;Java also takes a different approach to some structural  features that have been troublesome in other languages. For example, Java  supports only a single inheritance&lt;a name="IDX-CHP-1-0123"&gt;&lt;/a&gt; class hierarchy  (each class may have only one "parent" class) but allows multiple inheritance of  interfaces&lt;a name="IDX-CHP-1-0124"&gt;&lt;/a&gt;. An &lt;span class="docEmphasis"&gt;interface&lt;/span&gt;, like an abstract class in C++, specifies the  behavior of an object without defining its implementation. It is a very powerful  mechanism that allows the developer to define a "contract" for object behavior  that can be used and referred to independently of any particular object  implementation. Interfaces in Java eliminate the need for multiple inheritance  of classes and the associated problems.&lt;/p&gt; &lt;p class="docText"&gt;It is only after many years of debate that, in Java 5.0, some  major new language features have been added to the language. The latest release  of Java added &lt;span class="docEmphasis"&gt;generics&lt;/span&gt;, which are an abstraction  that allows Java classes to work with different types&lt;a name="IDX-CHP-1-0125"&gt;&lt;/a&gt;  in a safe way that the compiler can understand. While generics can hardly be  considered simple, their common usage and effect on the language will make code  more maintainable and easier to read. Providing this without a major  complication of the language has been an accomplishment.&lt;/p&gt; &lt;p class="docText"&gt;As you'll seein &lt;span class="docLink"&gt;Chapter 4&lt;/span&gt;, Java is a fairly  simple and elegant programming language and that is still a large part of its  appeal.&lt;/p&gt;&lt;a name="learnjava3-CHP-1-SECT-4.2"&gt;&lt;/a&gt; &lt;h4 class="docSection2Title"&gt;Type Safety and Method Binding&lt;/h4&gt;&lt;a name="IDX-CHP-1-0126"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0127"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0128"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0129"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0130"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0131"&gt;&lt;/a&gt; &lt;p class="docText"&gt;One attribute of a language is the kind of type checking it  uses. Generally, languages are categorized as &lt;span class="docEmphasis"&gt;static&lt;/span&gt; or &lt;span class="docEmphasis"&gt;dynamic&lt;/span&gt;, which  refers to the amount of information about variables known at compile time versus  what is known while the application is running.&lt;/p&gt; &lt;p class="docText"&gt;In a strictly statically typed language such as C or C++, data  types are etched in stone when the source code is compiled. The compiler  benefits from this by having enough information to catch many kinds of errors  before the code is executed. For example, the compiler would not allow you to  store a floating-point value in an integer variable. The code then doesn't  require runtime type checking, so it can be compiled to be small and fast. But  statically typed languages are inflexible. They don't support high-level  constructs such as lists and collections as naturally as languages with dynamic  type checking, and they make it impossible for an application to safely import  new data types while it's running.&lt;/p&gt; &lt;p class="docText"&gt;In contrast, a dynamic language such as Smalltalk or Lisp has a  runtime system that manages the types of objects and performs necessary type  checking while an application is executing. These kinds of languages allow for  more complex behavior and are in many respects more powerful. However, they are  also generally slower, less safe, and harder to debug.&lt;/p&gt; &lt;p class="docText"&gt;The differences in languages have been likened to the  differences among kinds of automobiles.&lt;sup class="docFootnote"&gt;&lt;a class="docLink" href="#learnjava3-CHP-1-FNOTE-2"&gt;[*]&lt;/a&gt;&lt;/sup&gt; Statically typed languages such  as C++ are analogous to a sports carreasonably safe and fastbut useful only if  you're driving on a nicely paved road. Highly dynamic languages such as  Smalltalk are more like an off-road vehicle: they afford you more freedom but  can be somewhat unwieldy. It can be fun (and sometimes faster) to go roaring  through the back woods, but you might also get stuck in a ditch or mauled by  bears.&lt;/p&gt; &lt;blockquote&gt; &lt;p class="docFootnote"&gt;&lt;sup&gt;&lt;a name="learnjava3-CHP-1-FNOTE-2"&gt;[*]&lt;/a&gt;&lt;/sup&gt; The  credit for the car analogy goes to Marshall P. Cline, author of the C++  FAQ.&lt;/p&gt;&lt;/blockquote&gt; &lt;p class="docText"&gt;Another attribute of a language is the way it binds method  calls to their definitions. In a static language such as C or C++, the  definitions of methods are normally bound at compile time, unless the programmer  specifies otherwise. Languages like Smalltalk, on the other hand, are called  "late binding" because they locate the definitions of methods dynamically at  runtime. Early binding is important for performance reasons; an application can  run without the overhead incurred by searching for methods at runtime. But late  binding is more flexible. It's also necessary in an object-oriented language  where new types can be loaded dynamically and only the runtime system can  determine which method to run.&lt;/p&gt; &lt;p class="docText"&gt;Java provides some of the benefits of both C++ and Smalltalk;  it's a statically typed, late-binding language. Every object in Java has a  well-defined type that is known at compile time. This means the Java compiler  can do the same kind of static type checking and usage analysis as C++. As a  result, you can't assign an object to the wrong type of variable or call  nonexistent methods on an object. The Java compiler goes even further and  prevents you from using uninitialized variables and creating unreachable  statements (see &lt;span class="docLink"&gt;Chapter 4&lt;/span&gt;).&lt;/p&gt; &lt;p class="docText"&gt;However, Java is fully runtime-typed as well. The Java runtime  system keeps track of all objects and makes it possible to determine their types  and relationships during execution. This means you can inspect an object at  runtime to determine what it is. Unlike C or C++, casts from one type of object  to another are checked by the runtime system, and it's possible to use new kinds  of dynamically loaded objects with a level of type safety. And since Java is a  late-binding language, it's always possible for a subclass to override methods  in its superclass, even a subclass loaded at runtime.&lt;/p&gt;&lt;a name="learnjava3-CHP-1-SECT-4.3"&gt;&lt;/a&gt; &lt;h4 class="docSection2Title"&gt;Incremental Development&lt;/h4&gt;&lt;a name="IDX-CHP-1-0132"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0133"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0134"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0135"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0136"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0137"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0138"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0139"&gt;&lt;/a&gt; &lt;p class="docText"&gt;Java carries all data-type and method-signature information  with it from its source code to its compiled bytecode form. This means that Java  classes can be developed incrementally. Your own Java source code can also be  compiled safely with classes from other sources your compiler has never seen. In  other words, you can write new code that references binary class files without  losing the type safety you gain from having the source code.&lt;/p&gt; &lt;p class="docText"&gt;Java does not suffer from the "fragile base class" problem. In  languages such as C++, the implementation of a base class can be effectively  frozen because it has many derived classes; changing the base class may require  recompilation of all of the derived classes. This is an especially difficult  problem for developers of class libraries. Java avoids this problem by  dynamically locating fields within classes. As long as a class maintains a valid  form of its original structure, it can evolve without breaking other classes  that are derived from it or that make use of it.&lt;/p&gt;&lt;a name="learnjava3-CHP-1-SECT-4.4"&gt;&lt;/a&gt; &lt;h4 class="docSection2Title"&gt;Dynamic Memory Management&lt;/h4&gt;&lt;a name="IDX-CHP-1-0140"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0141"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0142"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0143"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0144"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0145"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0146"&gt;&lt;/a&gt; &lt;p class="docText"&gt;Some of the most important differences between Java and  lower-level languages such as C and C++ involve how Java manages memory&lt;a name="IDX-CHP-1-0147"&gt;&lt;/a&gt;. Java eliminates ad hoc "pointers" that can reference  arbitrary areas of memory and adds object garbage collection&lt;a name="IDX-CHP-1-0148"&gt;&lt;/a&gt; and high-level arrays&lt;a name="IDX-CHP-1-0149"&gt;&lt;/a&gt; to the  language. These features eliminate many otherwise insurmountable problems with  safety, portability, and optimization.&lt;/p&gt; &lt;p class="docText"&gt;Garbage collection alone has saved countless programmers from  the single largest source of programming errors in C or C++: explicit memory  allocation and deallocation. In addition to maintaining objects&lt;a name="IDX-CHP-1-0150"&gt;&lt;/a&gt; in memory, the Java runtime system keeps track of all  references&lt;a name="IDX-CHP-1-0151"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0152"&gt;&lt;/a&gt; to those  objects. When an object is no longer in use, Java automatically removes it from  memory. You can, for the most part, simply ignore objects you no longer use,  with confidence that the interpreter will clean them up at an appropriate  time.&lt;/p&gt; &lt;p class="docText"&gt;Java uses a sophisticated garbage collector that runs  intermittently in the background, which means that most garbage collecting takes  place during idle times, between I/O pauses, mouse clicks, or keyboard hits.  Advanced runtime systems, such as HotSpot, have more advanced garbage  collection&lt;a name="IDX-CHP-1-0153"&gt;&lt;/a&gt; that can differentiate the usage patterns  of objects (such as short-lived versus long-lived) and optimize their  collection. The Java runtime can now tune itself automatically for the optimal  distribution of memory for different kinds of applications, based on their  behavior. With this kind of runtime profiling, automatic memory management&lt;a name="IDX-CHP-1-0154"&gt;&lt;/a&gt; can be much faster than the most diligently  programmer-managed resources, something that some people still find hard to  believe.&lt;/p&gt; &lt;p class="docText"&gt;We've said that Java doesn't have pointers. Strictly speaking,  this statement is true, but it's also misleading. What Java provides are  referencesa safe kind of pointerand Java is rife with them. A reference is a  strongly typed handle for an object. All objects in Java, with the exception of  primitive numeric types, are accessed through references. You can use references  to build all the normal kinds of data structures a C programmer would be  accustomed to building with pointers, such as linked lists, trees, and so forth.  The only difference is that with references you have to do so in a typesafe  way.&lt;/p&gt; &lt;p class="docText"&gt;Another important difference between a reference and a pointer  is that you can't play games (pointer arithmetic) with references to change  their values; they can point only to specific objects or elements of an array. A  reference is an atomic thing; you can't manipulate the value of a reference  except by assigning it to an object. References are passed by value, and you  can't reference an object through more than a single level of indirection. The  protection of references is one of the most fundamental aspects of Java  security. It means that Java code has to play by the rules; it can't peek into  places it shouldn't.&lt;/p&gt; &lt;p class="docText"&gt;Java references can point only to class types. There are no  pointers to methods. People sometimes complain about this missing feature, but  you will find that tasks that call for pointers to methods can be accomplished  more cleanly using interfaces and adapter classes instead. We should also  mention that Java has a sophisticated Reflection API that actually allows you to  reference and invoke individual methods. However this is not the normal way of  doing things. We discuss reflection&lt;a name="IDX-CHP-1-0155"&gt;&lt;/a&gt; in &lt;span class="docLink"&gt;Chapter 7&lt;/span&gt;.&lt;/p&gt; &lt;p class="docText"&gt;Finally, we should mention that arrays&lt;a name="IDX-CHP-1-0156"&gt;&lt;/a&gt; in Java are true, first-class objects. They can be  dynamically allocated and assigned like other objects. Arrays know their own  size and type, and although you can't directly define or subclass array classes,  they do have a well-defined inheritance relationship based on the relationship  of their base types. Having true arrays in the language alleviates much of the  need for pointer arithmetic, such as that used in C or C++.&lt;/p&gt;&lt;a name="learnjava3-CHP-1-SECT-4.5"&gt;&lt;/a&gt; &lt;h4 class="docSection2Title"&gt;Error Handling&lt;/h4&gt;&lt;a name="IDX-CHP-1-0157"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0158"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0159"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0160"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0161"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0162"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0163"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0164"&gt;&lt;/a&gt; &lt;p class="docText"&gt;Java's roots are in networked devices and embedded systems. For  these applications, it's important to have robust and intelligent error  management. Java has a powerful exception-handling mechanism, somewhat like that  in newer implementations of C++. Exceptions provide a more natural and elegant  way to handle errors. Exceptions allow you to separate error-handling code from  normal code, which makes for cleaner, more readable applications.&lt;/p&gt; &lt;p class="docText"&gt;When an exception occurs, it causes the flow of program  execution to be transferred to a predesignated "catcher" block of code. The  exception carries with it an object that contains information about the  situation that caused the exception. The Java compiler requires that a method  either declare the exceptions it can generate or catch and deal with them  itself. This promotes error information to the same level of importance as  argument and return types for methods. As a Java programmer, you know precisely  what exceptional conditions you must deal with, and you have help from the  compiler in writing correct software that doesn't leave them unhandled.&lt;/p&gt;&lt;a name="learnjava3-CHP-1-SECT-4.6"&gt;&lt;/a&gt; &lt;h4 class="docSection2Title"&gt;Threads&lt;/h4&gt; &lt;p class="docText"&gt;Today's applications require a high degree of parallelism. Even  a very single-minded application can have a complex user interfacewhich requires  concurrent activities. As machines get faster, users become more sensitive to  waiting for unrelated tasks that seize control of their time. Threads provide  efficient multiprocessing and distribution of tasks for both client and server  applications. Java makes threads&lt;a name="IDX-CHP-1-0165"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0166"&gt;&lt;/a&gt; easy to use because support for them is built into the  language.&lt;/p&gt; &lt;p class="docText"&gt;Concurrency is nice, but there's more to programming with  threads than just performing multiple tasks simultaneously. In most cases,  threads need to be synchronized, which can be tricky without explicit language  support. Java supports synchronization based on the &lt;span class="docEmphasis"&gt;monitor&lt;/span&gt; and &lt;span class="docEmphasis"&gt;condition&lt;/span&gt;  modela sort of lock and key system for accessing resources. The keyword  &lt;tt&gt;synchronized&lt;/tt&gt;&lt;a name="IDX-CHP-1-0167"&gt;&lt;/a&gt; designates methods and blocks  of code for safe, serialized access within an object. There are also simple,  primitive methods for explicit waiting and signaling between threads interested  in the same object.&lt;/p&gt; &lt;p class="docText"&gt;Java 5.0 introduced a new high-level concurrency package. This  package provides powerful utilities that address common patterns in  multithreaded programming, such as thread pools, coordination of tasks, and  sophisticated locking. With the addition of the concurrency package, Java now  provides some of the most advanced thread-related utilities of any language.&lt;/p&gt; &lt;p class="docText"&gt;Although some developers may never have to write multithreaded  code, learning to program with threads is an important part of mastering  programming in Java and something all developers should grasp. See &lt;span class="docLink"&gt;Chapter 9&lt;/span&gt; for a  discussion of this topic. For complete coverage of threads, refer to &lt;span class="docEmphasis"&gt;Java Threads&lt;/span&gt; by Scott Oaks and Henry Wong  (O'Reilly).&lt;/p&gt;&lt;a name="learnjava3-CHP-1-SECT-4.7"&gt;&lt;/a&gt; &lt;h4 class="docSection2Title"&gt;Scalability&lt;/h4&gt;&lt;a name="IDX-CHP-1-0168"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0169"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0170"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0171"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0172"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0173"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0174"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0175"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0176"&gt;&lt;/a&gt; &lt;p class="docText"&gt;At the lowest level, Java programs consist of &lt;span class="docEmphasis"&gt;classes&lt;/span&gt;&lt;a name="IDX-CHP-1-0177"&gt;&lt;/a&gt;. Classes are  intended to be small, modular components. They can be separated physically on  different systems, retrieved dynamically, stored in a compressed format, and  even cached in various distribution schemes. Over classes, Java provides &lt;span class="docEmphasis"&gt;packages&lt;/span&gt;, a layer of structure that groups classes into  functional units. Packages provide a naming convention for organizing classes  and a second tier of organizational control over the visibility of variables and  methods in Java applications.&lt;/p&gt; &lt;p class="docText"&gt;Within a package, a class is either publicly visible or  protected from outside access. Packages form another type of scope that is  closer to the application level. This lends itself to building reusable  components that work together in a system. Packages also help in designing a  scalable application that can grow without becoming a bird's nest of tightly  coupled code.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/444986195517809571-4457981989045619978?l=javadvipa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadvipa.blogspot.com/feeds/4457981989045619978/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://javadvipa.blogspot.com/2009/05/safety-of-design.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/4457981989045619978'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/4457981989045619978'/><link rel='alternate' type='text/html' href='http://javadvipa.blogspot.com/2009/05/safety-of-design.html' title='Safety of Design'/><author><name>Aisyah Runi</name><uri>http://www.blogger.com/profile/09754809777891988684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_iNFxbPL4FYE/R_dMDxJPHQI/AAAAAAAAAAM/L8A99OeHoPU/S220/runi001.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-444986195517809571.post-4894325442403307215</id><published>2009-05-15T20:02:00.000-07:00</published><updated>2009-05-15T20:03:40.952-07:00</updated><title type='text'>Online Resources</title><content type='html'>&lt;p class="docText"&gt;There are many online sources for information about Java. Sun  Microsystems's official web site for Java topics is &lt;a class="docLink" href="http://java.sun.com/" target="_blank"&gt;http://java.sun.com&lt;/a&gt;; look here for  the software, updates, and Java releases. This is where you'll find the JDK,  which includes the compiler, the interpreter, and other tools (the JDK is also  on the CD-ROM that comes with this book; view the CD content online at &lt;a class="docLink" href="http://examples.oreilly.com/learnjava3/CD-ROM/" target="_blank"&gt;http://examples.oreilly.com/learnjava3/CD-ROM/&lt;/a&gt;).&lt;/p&gt; &lt;p class="docText"&gt;You should also visit O'Reilly Media's Java site at &lt;a class="docLink" href="http://java.oreilly.com/" target="_blank"&gt;http://java.oreilly.com&lt;/a&gt;. There you'll find information about  other O'Reilly Java books, and a pointer to the home page for &lt;span class="docEmphasis"&gt;Learning Java&lt;/span&gt;, &lt;a class="docLink" href="http://www.oreilly.com/catalog/learnjava3/" target="_blank"&gt;http://www.oreilly.com/catalog/learnjava3/&lt;/a&gt;, where you'll find  the source code examples for this book.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/444986195517809571-4894325442403307215?l=javadvipa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadvipa.blogspot.com/feeds/4894325442403307215/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://javadvipa.blogspot.com/2009/05/online-resources.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/4894325442403307215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/4894325442403307215'/><link rel='alternate' type='text/html' href='http://javadvipa.blogspot.com/2009/05/online-resources.html' title='Online Resources'/><author><name>Aisyah Runi</name><uri>http://www.blogger.com/profile/09754809777891988684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_iNFxbPL4FYE/R_dMDxJPHQI/AAAAAAAAAAM/L8A99OeHoPU/S220/runi001.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-444986195517809571.post-2770994912081833266</id><published>2009-01-05T19:13:00.001-08:00</published><updated>2009-01-05T19:17:24.503-08:00</updated><title type='text'>Introduction to the JDeveloper IDE - Managing Files</title><content type='html'>&lt;h3 class="Install"&gt;&lt;span class="navheader"&gt;Managing Files &lt;/span&gt;&lt;/h3&gt;&lt;span class="bodycopy"&gt;The integrated JDeveloper tool allows search functionalities on files belonging to your current application or across multiple applications. To experiment these functionalities perform the following steps:&lt;br /&gt;&lt;/span&gt;&lt;h4&gt;&lt;table class="bodycopy" border="0" cellpadding="1" cellspacing="0" width="650" height="889"&gt;&lt;tbody&gt;&lt;tr valign="top"&gt;&lt;td width="25" height="127"&gt;&lt;b&gt;1.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;From the menu, select &lt;strong&gt;Search | Find Application Files&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t60101.gif" name="t60101" class="imgborder_off" id="t60101" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;b&gt;2.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;In the &lt;strong&gt;File List&lt;/strong&gt; tab, use the &lt;strong&gt;Look in&lt;/strong&gt; field to select the scope of your search. Keep the All Projects choice.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t60102.gif" name="t60102" class="imgborder_off" id="t60102" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="97"&gt;&lt;b&gt;3.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Select &lt;strong&gt;File Extension&lt;/strong&gt; and type &lt;strong&gt;.java&lt;/strong&gt; to retrieve all files of this type, then click &lt;strong&gt;Search&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t60103.gif" name="t60103" class="imgborder_off" id="t60103" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="97"&gt;&lt;b&gt;4.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;The Results window returns the file names corresponding to your criteria.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t60104.gif" name="t60104" class="imgborder_off" id="t60104" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Note that clicking on one of the file name from the list opens the file in the editor.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="86"&gt;&lt;b&gt;5.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;You can indicate complex search criteria using the &lt;img src="http://1.1.1.3/bmi/www.oracle.com/technology/obe/obe11jdev/11/ide/images/icon_plus_sign.gif" width="18" height="21" /&gt; sign combined with the logical &lt;strong&gt;Match &lt;/strong&gt;operators.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t60105.gif" name="t60105" class="imgborder_off" id="t60105" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="97"&gt;&lt;b&gt;6.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;You can also retrieve files recently used from the Application Navigator, click the &lt;strong&gt;Recently Opened Files&lt;/strong&gt; to deploy the accordion.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t60106.gif" name="t60106" class="imgborder_off" id="t60106" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="97"&gt;&lt;b&gt;7.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;To retrieve a Java class, click &lt;strong&gt;[Ctrl] + [-]&lt;/strong&gt; key to open a dialog.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t60107.gif" name="t60107" class="imgborder_off" id="t60107" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="97"&gt;&lt;b&gt;8.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;In the Name field, type &lt;strong&gt;Int&lt;/strong&gt;, then select the &lt;strong&gt;IntAnimal.java&lt;/strong&gt; from the list, then &lt;strong&gt;Enter&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t60108.gif" name="t60108" class="imgborder_off" id="t60108" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="97"&gt;&lt;b&gt;9.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;To retrieve a file, click &lt;strong&gt;[Ctrl] + [Alt] + [-]&lt;/strong&gt; key stroke to open a dialog. In the File Name field, type &lt;strong&gt;D&lt;/strong&gt;, then select the &lt;strong&gt;Dog.java&lt;/strong&gt; from the list, then &lt;strong&gt;Enter&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t60109.gif" name="t60109" class="imgborder_off" id="t60109" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/h4&gt;&lt;p align="right"&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/444986195517809571-2770994912081833266?l=javadvipa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadvipa.blogspot.com/feeds/2770994912081833266/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://javadvipa.blogspot.com/2009/01/introduction-to-jdeveloper-ide-managing.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/2770994912081833266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/2770994912081833266'/><link rel='alternate' type='text/html' href='http://javadvipa.blogspot.com/2009/01/introduction-to-jdeveloper-ide-managing.html' title='Introduction to the JDeveloper IDE - Managing Files'/><author><name>Aisyah Runi</name><uri>http://www.blogger.com/profile/09754809777891988684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_iNFxbPL4FYE/R_dMDxJPHQI/AAAAAAAAAAM/L8A99OeHoPU/S220/runi001.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-444986195517809571.post-5979800795151385551</id><published>2009-01-05T19:12:00.001-08:00</published><updated>2009-01-05T19:12:48.031-08:00</updated><title type='text'>Introduction to the JDeveloper IDE - Debugging Java Programs</title><content type='html'>&lt;h3 class="Install"&gt;&lt;span class="navheader"&gt;Debugging Java Programs &lt;/span&gt;&lt;/h3&gt;&lt;span class="bodycopy"&gt;The integrated JDeveloper debugger enables you to debug Java programs in the source editor. This topic shows&lt;br /&gt;you how to control the execution of a program by setting breakpoints. When program execution encounters a&lt;br /&gt;breakpoint, the program pauses, and the debugger displays the line containing the breakpoint in the source editor. You&lt;br /&gt;can then use the debugger to view the state of the program.&lt;br /&gt;&lt;/span&gt;&lt;h4&gt;&lt;table class="bodycopy" border="0" cellpadding="1" cellspacing="0" width="650" height="889"&gt;&lt;tbody&gt;&lt;tr valign="top"&gt;&lt;td width="25" height="127"&gt;&lt;b&gt;1.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Set a breakpoint in the &lt;span style="font-family:Courier New, Courier, mono;"&gt;Dog.java&lt;/span&gt; file. To do this, click in the &lt;strong&gt;margin&lt;/strong&gt; to the left of the line: &lt;span class="style3"&gt;&lt;strong&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;System.out.println(count + myDog.sayHowDoYouDo("Kate"));&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t50101.gif" name="t50101" class="imgborder_off" id="t50101" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The breakpoint icon, which looks like a red ball, is displayed in the margin.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;b&gt;2.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Right-click in the source editor and select &lt;strong&gt;Debug&lt;/strong&gt; from the context menu.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t50102.gif" name="t50102" class="imgborder_off" id="t50102" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="97"&gt;&lt;b&gt;3.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Program execution proceeds up to the breakpoint. The red arrow in the left margin of the source editor indicates where the break is occurring. The debugger window opens and displays the debugging trace.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t50103.gif" name="t50103" class="imgborder_off" id="t50103" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="97"&gt;&lt;b&gt;4.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Click the &lt;strong&gt;Step Over&lt;/strong&gt; icon in the toolbar to execute the first iteration of the &lt;span style="font-family:Courier New, Courier, mono;"&gt;myDog.sayHowDoYouDo()&lt;/span&gt; method.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t50104.gif" name="t50104" class="imgborder_off" id="t50104" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="86"&gt;&lt;b&gt;5.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Click the &lt;strong&gt;Debugging: MyProject.jpr &lt;/strong&gt;tab at the bottom of the log window and then click the &lt;strong&gt;Log&lt;/strong&gt; tab in the debugger window. Note that the log window displays the first &lt;em&gt;woof Kate&lt;/em&gt; message.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t50105.gif" name="t50105" class="imgborder_off" id="t50105" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="97"&gt;&lt;b&gt;6&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Notice the &lt;strong&gt;Smart Data&lt;/strong&gt; window to the right of the Debugging Log tab. Select the &lt;span class="style3"&gt;&lt;strong&gt;count&lt;/strong&gt;&lt;/span&gt; variable, and double-click in the&lt;strong&gt; Value&lt;/strong&gt; column to display the &lt;strong&gt;Modify Value&lt;/strong&gt; dialog.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t50106.gif" name="t50106" class="imgborder_off" id="t50106" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;7.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Type &lt;span class="style3"&gt;&lt;strong&gt;2&lt;/strong&gt;&lt;/span&gt; as the new value. Click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t50107.gif" name="t50107" class="imgborder_off" id="t50107" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="86"&gt;&lt;b&gt;8.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;In the toolbar, click &lt;strong&gt;Resume&lt;/strong&gt; to continue program execution.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t50108.gif" name="t50108" class="imgborder_off" id="t50108" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;b&gt;9.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;The&lt;span class="style3"&gt; count&lt;/span&gt; variable is incremented and exceeds its limit, so the program terminates, and the debugger disconnects.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t50109.gif" name="t50109" class="imgborder_off" id="t50109" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/h4&gt;&lt;p align="right"&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/444986195517809571-5979800795151385551?l=javadvipa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadvipa.blogspot.com/feeds/5979800795151385551/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://javadvipa.blogspot.com/2009/01/introduction-to-jdeveloper-ide_7645.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/5979800795151385551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/5979800795151385551'/><link rel='alternate' type='text/html' href='http://javadvipa.blogspot.com/2009/01/introduction-to-jdeveloper-ide_7645.html' title='Introduction to the JDeveloper IDE - Debugging Java Programs'/><author><name>Aisyah Runi</name><uri>http://www.blogger.com/profile/09754809777891988684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_iNFxbPL4FYE/R_dMDxJPHQI/AAAAAAAAAAM/L8A99OeHoPU/S220/runi001.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-444986195517809571.post-777885362713268005</id><published>2009-01-05T19:11:00.001-08:00</published><updated>2009-01-05T19:11:53.962-08:00</updated><title type='text'>Introduction to the JDeveloper IDE - Navigating through code</title><content type='html'>&lt;h4&gt;&lt;span class="boldbodycopy"&gt;Navigating through code&lt;/span&gt;&lt;/h4&gt;&lt;p class="bodycopy"&gt;JDeveloper provides easy ways to navigate to related code and to Javadoc, and the ability to expand or contract sections of code, improving navigability in large programs. To explore these features, perform the following steps:&lt;/p&gt;&lt;h4&gt;&lt;table class="bodycopy" border="0" cellpadding="1" cellspacing="0" width="650"&gt;&lt;tbody&gt;&lt;tr valign="top"&gt;&lt;td width="25"&gt;&lt;b&gt;1.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Click the &lt;strong&gt;Source&lt;/strong&gt; tab for the &lt;span class="style3"&gt;&lt;strong&gt;Dog.java&lt;/strong&gt;&lt;/span&gt; file in the editor.&lt;/p&gt;&lt;p&gt;You can navigate from one part of the code to another related part. One example of this is navigating from a method to its declaration in an interface.&lt;/p&gt;&lt;p&gt;A method that implements a declaration from an interface displays a callout icon in the left-hand margin. Clicking this icon takes you to where the method is declared.&lt;/p&gt;&lt;p&gt;Click the arrow&lt;span style="font-family:Courier New, Courier, mono;"&gt; &lt;/span&gt;icon next to the &lt;span style="font-family:Courier New, Courier, mono;"&gt;sayHowDoYouDo()&lt;/span&gt; method in the &lt;span class="style3"&gt;Dog.java&lt;/span&gt; file.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40701.gif" name="t40701" class="imgborder_off" id="t40701" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="97"&gt;&lt;b&gt;2.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;JDeveloper takes you to the &lt;span class="style3"&gt;IntAnimal&lt;/span&gt; interface where the method is declared and highlights the appropriate  line for you.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40702.gif" name="t40702" class="imgborder_off" id="t40702" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="86"&gt;&lt;b&gt;3.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;To return to where you were in the &lt;span class="style3"&gt;Dog&lt;/span&gt; class, click the green &lt;strong&gt;Back&lt;/strong&gt; button in the toolbar.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40703.gif" name="t40703" class="imgborder_off" id="t40703" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;You can also Navigate backward or forward using the &lt;strong&gt;[Alt]&lt;/strong&gt; + &lt;strong&gt;[left]&lt;/strong&gt; or &lt;strong&gt;[right]&lt;/strong&gt; arrow key.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="97"&gt;&lt;b&gt;4.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;You can also navigate to the Javadoc for a given element. In the &lt;strong&gt;&lt;span style="font-family:Courier New, Courier, mono;"&gt;Dog.java&lt;/span&gt;&lt;/strong&gt; file in the editor, right-click within the &lt;span style="font-family:Courier New, Courier, mono;"&gt;sayHowDoYouDo()&lt;/span&gt; method. From the context menu, choose &lt;strong&gt;Quick Javadoc&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40704.gif" name="t40704" class="imgborder_off" id="t40704" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="86"&gt;&lt;b&gt;5.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;The Javadoc popup window displays additional information about the selected method.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40705.gif" name="t40705" class="imgborder_off" id="t40705" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="86"&gt;&lt;b&gt;6.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Click the &lt;strong&gt;String&lt;/strong&gt; link to get more info about the String class.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40706.gif" name="t40706" class="imgborder_off" id="t40706" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Click within the code editor window to remove the doc 'ghost' window.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="86"&gt;&lt;b&gt;7.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Click &lt;strong&gt;[Ctrl]+[-]&lt;/strong&gt; (minus) key to popup the Go to Java Class dialog. It allows you to display Source or Javadoc information of the selected class.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40707.gif" name="t40707" class="imgborder_off" id="t40707" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;In the Name field type &lt;strong&gt;String&lt;/strong&gt; then Enter on the&lt;strong&gt; java.lang.String &lt;/strong&gt;highlighted suggestion.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40707b.gif" name="t40707b" class="imgborder_off" id="t40707b" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="86"&gt;&lt;b&gt;8.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;The source code for the &lt;strong&gt;String&lt;/strong&gt; class opens in the editor.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40708.gif" name="t40708" class="imgborder_off" id="t40708" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Close the &lt;strong&gt;String.java&lt;/strong&gt; tab.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40708b.gif" name="t40708b" class="imgborder_off" id="t40708b" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="146"&gt;&lt;b&gt;9.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Code folding enables you to expand and contract sections of code, making large programs more manageable.&lt;/p&gt;&lt;p&gt;Place your mouse in the space between the dotted and solid lines to the left of the &lt;span class="style3"&gt;Cat&lt;/span&gt; line.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40709.gif" name="t40709" class="imgborder_off" id="t40709" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Notice that a blue vertical line displays beside the main method body.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="86"&gt;&lt;b&gt;10.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Click the minus (&lt;span style="font-family:Courier New, Courier, mono;"&gt;&lt;strong&gt;-)&lt;/strong&gt;&lt;/span&gt; sign at the top of the vertical blue line to contract this section of code.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40710.gif" name="t40710" class="imgborder_off" id="t40710" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;b&gt;11.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Hover over the plus (&lt;span style="font-family:Courier New, Courier, mono;"&gt;&lt;strong&gt;+)&lt;/strong&gt;&lt;/span&gt; sign next to the contracted section of code. The contracted lines of code display in a blue shaded box.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40711.gif" name="t40711" class="imgborder_off" id="t40711" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;b&gt;12.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;The new Quick Outline Navigator enables you to quickly navigate to methods and fields of a class and its super classes.&lt;/p&gt;&lt;p&gt;In the code editor toolbar click the &lt;strong&gt;Quick Outline&lt;/strong&gt; icon.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40712.gif" name="t40712" class="imgborder_off" id="t40712" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The Quick Outline 'ghost' window displays.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;b&gt;13.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Click the Show Methods icon (first icon from the left) to see all the methods in the Dog class.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40713.gif" name="t40713" class="imgborder_off" id="t40713" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;b&gt;14.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;span style="color:#000000;"&gt;Filter by typing &lt;strong&gt;ge&lt;/strong&gt; in the field.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40714.gif" name="t40714" class="imgborder_off" id="t40714" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;b&gt;15.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;span style="color:#000000;"&gt;Use the down arrow key to select the &lt;strong&gt;getName()&lt;/strong&gt; method, then &lt;strong&gt;Enter&lt;/strong&gt;. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40715.gif" name="t40715" class="imgborder_off" id="t40715" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#000000;"&gt;That's a new feature that provides built-in navigation in the class you are looking at. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40715b.gif" name="t40715b" class="imgborder_off" id="t40715b" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;b&gt;16.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Back in the code editor, double-click within the ellipses of the &lt;span style="font-family:Courier New, Courier, mono;"&gt;&lt;strong&gt;main() {...} &lt;/strong&gt;&lt;/span&gt; method. JDeveloper expands the collapsed code.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40716.gif" name="t40716" class="imgborder_off" id="t40716" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/h4&gt;&lt;p align="right"&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/ide/introjdevide.htm#t4" class="bodylink"&gt;Back to Topic&lt;/a&gt;&lt;/p&gt;&lt;p align="right"&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/444986195517809571-777885362713268005?l=javadvipa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadvipa.blogspot.com/feeds/777885362713268005/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://javadvipa.blogspot.com/2009/01/introduction-to-jdeveloper-ide_101.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/777885362713268005'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/777885362713268005'/><link rel='alternate' type='text/html' href='http://javadvipa.blogspot.com/2009/01/introduction-to-jdeveloper-ide_101.html' title='Introduction to the JDeveloper IDE - Navigating through code'/><author><name>Aisyah Runi</name><uri>http://www.blogger.com/profile/09754809777891988684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_iNFxbPL4FYE/R_dMDxJPHQI/AAAAAAAAAAM/L8A99OeHoPU/S220/runi001.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-444986195517809571.post-8915366408692864750</id><published>2009-01-05T19:05:00.000-08:00</published><updated>2009-01-05T19:10:38.615-08:00</updated><title type='text'>Introduction to the JDeveloper IDE - Viewing code modification history</title><content type='html'>&lt;h4&gt;&lt;span class="boldbodycopy"&gt;Viewing code modification history&lt;/span&gt;&lt;/h4&gt;&lt;p&gt;&lt;span class="bodycopy"&gt;JDeveloper has a built-in history feature. This local history does not require a version control system to provide a recent change record and visual "diff" between versions. Versions are automatically created based on user interactions such as Save, Compile, Rename, and so on.&lt;/span&gt;&lt;/p&gt;&lt;h4&gt;&lt;table class="bodycopy" border="0" cellpadding="1" cellspacing="0" width="650"&gt;&lt;tbody&gt;&lt;tr valign="top"&gt;&lt;td width="25"&gt;&lt;b&gt;1.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Notice the three tabs at the foot of the editor window. Click the &lt;strong&gt;History&lt;/strong&gt; tab.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40601.gif" name="t40601" class="imgborder_off" id="t40601" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td width="25" height="50"&gt;&lt;b&gt;2.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;The History window displays. The top part of the window contains a list of revisions and dates, while a list of changes to the code displays in the bottom part of the window. The two windows are synchronized, so that the detail in the bottom part of the window matches the selection in the top part.&lt;/p&gt;&lt;p&gt;The revisions for the selected date and time are summarized in the status line at the bottom of the IDE, in this case &lt;em&gt;&lt;strong&gt;6 differences: 3 added, 0 removed, 3 changed.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40602.gif" name="t40602" class="imgborder_off" id="t40602" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;3.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;The lilac-colored boxes indicate changes to the code.&lt;/p&gt;&lt;p&gt;In the top portion of the window, select &lt;strong&gt;Introduce Parameter &lt;/strong&gt;near the top of the list.&lt;/p&gt;&lt;p&gt;In the bottom left portion of the editor, position your mouse over the &lt;strong&gt;green right-pointing arrow&lt;/strong&gt; in the lilac box that contains the &lt;span style="font-family:Courier New, Courier, mono;"&gt;sayHi()&lt;/span&gt; method declaration. Notice that a message displays, indicating that clicking the green arrow enables you to replace the adjacent difference. In this case, clicking the green arrow would revert the &lt;span style="font-family:Courier New, Courier, mono;"&gt;sayHowDoYouDo()&lt;/span&gt; method to &lt;span style="font-family:Courier New, Courier, mono;"&gt;sayHi()&lt;/span&gt;. Don't revert now.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40603.gif" name="t40603" class="imgborder_off" id="t40603" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;4. &lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;The green boxes indicate additions to the code.&lt;/p&gt;&lt;p&gt;In the top portion of the window, select &lt;strong&gt;Load External State&lt;/strong&gt; near the bottom of the list.&lt;/p&gt;&lt;p&gt;In the bottom of the window, select the&lt;strong&gt; //Cat myCat = new Cat();&lt;/strong&gt; line in the green box in the right hand window. Hover over the &lt;strong&gt;red X&lt;/strong&gt; with your mouse. Notice the message indicating that to delete the addition(s), you click the X.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40604.gif" name="t40604" class="imgborder_off" id="t40604" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/h4&gt;&lt;p align="right"&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/444986195517809571-8915366408692864750?l=javadvipa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadvipa.blogspot.com/feeds/8915366408692864750/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://javadvipa.blogspot.com/2009/01/introduction-to-jdeveloper-ide-viewing.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/8915366408692864750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/8915366408692864750'/><link rel='alternate' type='text/html' href='http://javadvipa.blogspot.com/2009/01/introduction-to-jdeveloper-ide-viewing.html' title='Introduction to the JDeveloper IDE - Viewing code modification history'/><author><name>Aisyah Runi</name><uri>http://www.blogger.com/profile/09754809777891988684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_iNFxbPL4FYE/R_dMDxJPHQI/AAAAAAAAAAM/L8A99OeHoPU/S220/runi001.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-444986195517809571.post-311399403575330202</id><published>2009-01-05T19:01:00.000-08:00</published><updated>2009-01-05T19:02:24.722-08:00</updated><title type='text'>Introduction to the JDeveloper IDE - Refactoring code</title><content type='html'>&lt;h4&gt;&lt;span class="boldbodycopy"&gt;Refactoring code&lt;/span&gt;&lt;/h4&gt;&lt;p&gt;&lt;span class="bodycopy"&gt;Refactoring is an editing technique that modifies code structure without altering program behavior. A refactoring operation&lt;br /&gt;is a sequence of simple edits that transforms a program's code but keeps it in a state where it compiles and runs correctly.&lt;br /&gt;JDeveloper provides a collection of refactoring operations. &lt;/span&gt;&lt;/p&gt;&lt;table class="bodycopy" border="0" cellpadding="1" cellspacing="0" width="650"&gt;&lt;tbody&gt;&lt;tr valign="top"&gt;&lt;td width="25"&gt;&lt;b&gt;1.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;One example of a refactoring operation is replacing a constant expression in a method body by a parameter for the method. The expression is replaced by the parameter name. The new parameter is added to the method's parameter list and to all invocations of the method.&lt;/p&gt;&lt;p&gt;To do this in the &lt;span class="style3"&gt;Dog&lt;/span&gt; class, right-click the literal,&lt;strong&gt; 'Kate'&lt;/strong&gt; in the &lt;span style="font-family:Courier New, Courier, mono;"&gt;sayHi()&lt;/span&gt; method code and select &lt;strong&gt;Refactor --&gt; Introduce Parameter...&lt;/strong&gt;from the context menu&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40501.gif" name="t40501" class="imgborder_off" id="t40501" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td width="25" height="86"&gt;&lt;b&gt;2.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;In the Introduce Parameter dialog, type &lt;span style="font-family:Courier New, Courier, mono;color:#000000;"&gt;&lt;strong&gt;name&lt;/strong&gt;&lt;/span&gt; in the &lt;strong&gt;Name&lt;/strong&gt; field, and click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40502.gif" name="t40502" class="imgborder_off" id="t40502" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="108"&gt;&lt;b&gt;3.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Examine the code to see the results of the refactor operation. The method declaration now contains &lt;span style="font-family:Courier New, Courier, mono;"&gt;String &lt;/span&gt;&lt;span style="font-family:Courier New, Courier, mono;color:#000000;"&gt;&lt;strong&gt;name&lt;/strong&gt;&lt;/span&gt; in its parameter list; the parameter &lt;span style="font-family:Courier New, Courier, mono;color:#000000;"&gt;&lt;strong&gt;name&lt;/strong&gt;&lt;/span&gt; has replaced the literal 'Kate' in the method return value, and the literal 'Kate' has been inserted as a parameter in the method call.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40503.gif" name="t40503" class="imgborder_off" id="t40503" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;4. &lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Another refactoring operation is to derive a new interface from selected methods in an existing class.&lt;/p&gt;&lt;p&gt;To do this in the &lt;span class="style3"&gt;Dog&lt;/span&gt; class, right-click the &lt;strong&gt;&lt;span style="font-family:Courier New, Courier, mono;"&gt;Dog&lt;/span&gt; class declaration method&lt;/strong&gt;, and from the context menu, choose &lt;strong&gt;Refactor --&gt; Extract Interface...&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40504.gif" name="t40504" class="imgborder_off" id="t40504" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;5. &lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;In the Extract Interface dialog, type &lt;span style="font-family:Courier New, Courier, mono;"&gt;&lt;strong&gt;IntAnimal&lt;/strong&gt;&lt;/span&gt; as the name of the interface, and select the &lt;strong&gt;&lt;span style="font-family:Courier New, Courier, mono;"&gt;sayHi(String)&lt;/span&gt;&lt;/strong&gt; method in the &lt;strong&gt;Extract Interface&lt;/strong&gt; list. Click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40505.gif" name="t40505" class="imgborder_off" id="t40505" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;6. &lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;The &lt;span class="style3"&gt;IntAnimal&lt;/span&gt; interface is created and opens in the source editor.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40506.gif" name="t40506" class="imgborder_off" id="t40506" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;7. &lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Another simple refactoring operation is to rename a method, whereby every occurrence of the method name is replaced by the new name.&lt;/p&gt;&lt;p&gt;To do this in the IntAnimal interface, right-click in the &lt;strong&gt;&lt;span style="font-family:Courier New, Courier, mono;"&gt;sayHi()&lt;/span&gt; &lt;/strong&gt;method, and from the context menu, choose &lt;strong&gt;Refactor --&gt; Rename.&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40507.gif" name="t40507" class="imgborder_off" id="t40507" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;8. &lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;In the Rename Method dialog, change the &lt;span class="style3"&gt;sayHi&lt;/span&gt; method name to &lt;strong&gt;&lt;span class="style3"&gt;sayHowDoYouDo&lt;/span&gt;. &lt;/strong&gt;Select the &lt;strong&gt;Preview&lt;/strong&gt; check box to see all the usages that are affected by the name change. Click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40508.gif" name="t40508" class="imgborder_off" id="t40508" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;9. &lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;The log window lists all usages of the &lt;span style="font-family:Courier New, Courier, mono;"&gt;sayHi()&lt;/span&gt; method. You should examine each usage to check that you want each occurrence of &lt;span style="font-family:Courier New, Courier, mono;"&gt;sayHi()&lt;/span&gt;to be changed to &lt;span style="font-family:Courier New, Courier, mono;"&gt;sayHowDoYouDo(). &lt;/span&gt;If so, click &lt;strong&gt;Do Refactoring&lt;/strong&gt; in the log window toolbar.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40509.gif" name="t40509" class="imgborder_off" id="t40509" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;10. &lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Note that the name change has taken place in the &lt;span class="style3"&gt;IntAnimal&lt;/span&gt; interface......&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40510.gif" name="t40510" class="imgborder_off" id="t40510" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="86"&gt;&lt;b&gt;11. &lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;.....and in the &lt;span class="style3"&gt;Dog&lt;/span&gt; class.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40511.gif" name="t40511" class="imgborder_off" id="t40511" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="86"&gt;&lt;b&gt;12.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Select the Navigate menu option. The Back option allows you to return to the previous location.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40512a.gif" name="t40512a" class="imgborder_off" id="t40512a" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;This option is also available from the toolbar, using the &lt;strong&gt;Back&lt;/strong&gt; button. Clicking the down arrow next to the Back button, shows the history of the navigation.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40512b.gif" name="t40512b" class="imgborder_off" id="t40512b" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="86"&gt;&lt;b&gt;13.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;From the menu select &lt;strong&gt;Search | Auto Code Highlight&lt;/strong&gt; to turn off this option, and in the code editor toolbar click the &lt;strong&gt;Clear All Highlighting &lt;/strong&gt;icon.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40513.gif" name="t40513" class="imgborder_off" id="t40513" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt; &lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40513b.gif" name="t40513b" class="imgborder_off" id="t40513b" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt; &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p align="right"&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/444986195517809571-311399403575330202?l=javadvipa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadvipa.blogspot.com/feeds/311399403575330202/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://javadvipa.blogspot.com/2009/01/introduction-to-jdeveloper-ide_6235.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/311399403575330202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/311399403575330202'/><link rel='alternate' type='text/html' href='http://javadvipa.blogspot.com/2009/01/introduction-to-jdeveloper-ide_6235.html' title='Introduction to the JDeveloper IDE - Refactoring code'/><author><name>Aisyah Runi</name><uri>http://www.blogger.com/profile/09754809777891988684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_iNFxbPL4FYE/R_dMDxJPHQI/AAAAAAAAAAM/L8A99OeHoPU/S220/runi001.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-444986195517809571.post-5373834991083125625</id><published>2009-01-05T18:55:00.001-08:00</published><updated>2009-01-05T19:01:19.110-08:00</updated><title type='text'>Introduction to the JDeveloper IDE - Searching and Highlighting code</title><content type='html'>&lt;h4&gt;&lt;span class="boldbodycopy"&gt;Searching and Highlighting code&lt;/span&gt;&lt;/h4&gt;&lt;p&gt;&lt;span class="bodycopy"&gt;Using the code editor, you can search for text and display all occurrences of the search criteria. You can also use a highlighting facility that retrieves all occurrences of an object. &lt;/span&gt;&lt;/p&gt;&lt;table class="bodycopy" border="0" cellpadding="1" cellspacing="0" width="650"&gt;&lt;tbody&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;1.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Use the Search/Code highlight feature. In the &lt;strong&gt;Search&lt;/strong&gt; box on the left of the code editor toolbar, type &lt;strong&gt;name&lt;/strong&gt;. The first instance of name found is highlighted in the code editor.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40401.gif" name="t40401" class="imgborder_off" id="t40401" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;2.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Click the &lt;strong&gt;'down'&lt;/strong&gt; arrow to move to the next occurrence of the string.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40402.gif" name="t40402" class="imgborder_off" id="t40402" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;3.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;span style="color:#000000;"&gt;Click the binocular icon to have access to additional options and check the &lt;strong&gt;Highlight Occurrences&lt;/strong&gt; option. Click the &lt;strong&gt;down&lt;/strong&gt; arrow to highlight all Occurrences.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40403.gif" name="t40403" class="imgborder_off" id="t40403" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Notice that the search function retrieves all Occurrences of a string in the code.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;4.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Click the &lt;strong&gt;Clear All Highlighting&lt;/strong&gt; icon in the editor toolbar.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40404.gif" name="t40404" class="imgborder_off" id="t40404" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;5.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Remove &lt;strong&gt;&lt;span style="font-family:Courier New, Courier, mono;"&gt;name&lt;/span&gt;&lt;/strong&gt; from the Search field.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40405.gif" name="t40405" class="imgborder_off" id="t40405" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;6.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;From the menu, choose &lt;strong&gt;Search | Auto Code Highlight&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40406.gif" name="t40406" class="imgborder_off" id="t40406" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;7.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;In the code editor select the &lt;span style="font-family:Courier New, Courier, mono;"&gt;&lt;strong&gt;age&lt;/strong&gt;&lt;/span&gt; parameter of the &lt;span style="font-family:Courier New, Courier, mono;"&gt;&lt;strong&gt;setAge&lt;/strong&gt;&lt;/span&gt; method. Notice that then the highlighted occurrences are restricted to occurrences of the same semantic object. The age variable being excluded.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40407.gif" name="t40407" class="imgborder_off" id="t40407" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;8.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;span style="color:#000000;"&gt;Now select the &lt;span style="font-family:Courier New, Courier, mono;"&gt;&lt;strong&gt;age&lt;/strong&gt;&lt;/span&gt; variable in the setAge method to highlight all Occurrences of that variable.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40408.gif" name="t40408" class="imgborder_off" id="t40408" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;9.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;span style="color:#000000;"&gt;In the right margin, hover over the &lt;strong&gt;top yellow marker &lt;/strong&gt;with the mouse to display the code. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40409.gif" name="t40409" class="imgborder_off" id="t40409" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;10.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;span style="color:#000000;"&gt;Double click this &lt;strong&gt;yellow marker&lt;/strong&gt;. This moves you to the corresponding location in the source editor.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40410.gif" name="t40410" class="imgborder_off" id="t40410" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;b&gt;11.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Configure JDeveloper to allow a 'ghost' window to display additional information. From the main menu, select &lt;strong&gt;Tools | Preferences&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40410x.gif" name="t40410x" class="imgborder_off" id="t40410x" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;b&gt;12.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;In the Preferences dialog, select &lt;strong&gt;Accelerators&lt;/strong&gt; and from the &lt;strong&gt;All&lt;/strong&gt; Category, select &lt;strong&gt;Quick Peek&lt;/strong&gt;. The assigned accelerator is&lt;strong&gt; [Ctrl]+[1]&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40410y.gif" name="t40410y" class="imgborder_off" id="t40410y" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;b&gt;13.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;span style="color:#000000;"&gt;You can view the definition of a variable or method without navigating to a different file or opening a new editor. JDeveloper uses a 'ghost' window to overlay your code in the code editor, or the structure pane, enabling you to discover the information you need without having your attention drawn away to a separate dialog interaction.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#000000;"&gt;In the structure pane, move your mouse over one of the nodes and click the &lt;strong&gt;[Ctrl]+[1]&lt;/strong&gt; keys. This way you can also display the code front structure from the class structure.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40411.gif" name="t40411" class="imgborder_off" id="t40411" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The ghost window closes as you release the shortcut keys.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;14.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Now back in the source editor window, hover your mouse over the &lt;span style="font-family:Courier New, Courier, mono;"&gt;&lt;strong&gt;sayHi&lt;/strong&gt;&lt;/span&gt; method in the &lt;span style="font-family:Courier New, Courier, mono;"&gt;System.out.println(count + myDog.sayHi()); &lt;/span&gt;and press the &lt;strong&gt;[Ctrl]&lt;/strong&gt;&lt;strong&gt;+[1]&lt;/strong&gt; keys. This displays the method definition.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40412.gif" name="t40412" class="imgborder_off" id="t40412" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;15.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Reformat your code by clicking the&lt;strong&gt; Reformat &lt;/strong&gt;icon in the code editor toolbar.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40413.gif" name="t40413" class="imgborder_off" id="t40413" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/444986195517809571-5373834991083125625?l=javadvipa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadvipa.blogspot.com/feeds/5373834991083125625/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://javadvipa.blogspot.com/2009/01/introduction-to-jdeveloper-ide_7041.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/5373834991083125625'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/5373834991083125625'/><link rel='alternate' type='text/html' href='http://javadvipa.blogspot.com/2009/01/introduction-to-jdeveloper-ide_7041.html' title='Introduction to the JDeveloper IDE - Searching and Highlighting code'/><author><name>Aisyah Runi</name><uri>http://www.blogger.com/profile/09754809777891988684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_iNFxbPL4FYE/R_dMDxJPHQI/AAAAAAAAAAM/L8A99OeHoPU/S220/runi001.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-444986195517809571.post-9152947116599583855</id><published>2009-01-05T18:52:00.000-08:00</published><updated>2009-01-05T18:53:26.583-08:00</updated><title type='text'>Introduction to the JDeveloper IDE - Working with Code Assist</title><content type='html'>&lt;h4&gt;&lt;span class="boldbodycopy"&gt;Working with Code Assist&lt;/span&gt;&lt;/h4&gt;&lt;p&gt;&lt;span class="bodycopy"&gt;Code Assist examines your code in the editor and provides assistance to fix common problems. Here you use the &lt;span class="style3"&gt;Dog&lt;/span&gt; class to explore some examples of the suggestions that are offered.&lt;/span&gt;&lt;/p&gt;&lt;h4&gt;&lt;table class="bodycopy" border="0" cellpadding="1" cellspacing="0" width="650"&gt;&lt;tbody&gt;&lt;tr valign="top"&gt;&lt;td width="25"&gt;&lt;b&gt;1.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Create a &lt;span class="style3"&gt;Cat&lt;/span&gt; object.&lt;/p&gt;&lt;p&gt;At the start of the &lt;span style="font-family:Courier New, Courier, mono;"&gt;main&lt;/span&gt; method, just after the first curly brace, press &lt;strong&gt;[Enter]&lt;/strong&gt; to create a new line. In the new line, enter the following code:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;span style="font-family:Courier New, Courier, mono;"&gt;&lt;strong&gt;Cat myCat = new Cat();&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40301.gif" name="t40301" class="imgborder_off" id="t40301" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;2.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Notice that the red wavy lines and margin indicators have again appeared. Place the mouse over a margin indicator to see what the problem is from the code popup window.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40302.gif" name="t40302" class="imgborder_off" id="t40302" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Notice that the popup box displays the problematic lines as well as telling you what the problem is.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;3.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Hover your mouse over the light bulb icon in the left hand margin of the 'cat' line. A message tells you that 'quick fixes and code assists' are available for this line.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40303a.gif" name="t40303a" class="imgborder_off" id="t40303a" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;4.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Click the icon to see what they are.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40303.gif" name="t40303" class="imgborder_off" id="t40303" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;You need a &lt;span style="font-family:Courier New, Courier, mono;"&gt;Cat&lt;/span&gt; class to instantiate a &lt;span style="font-family:Courier New, Courier, mono;"&gt;Cat&lt;/span&gt; object. If you click on the first suggestion in the list offered, JDeveloper creates a class called &lt;span style="font-family:Courier New, Courier, mono;"&gt;Cat&lt;/span&gt;.&lt;/p&gt;&lt;p&gt;On this occasion you don't want to create the Cat class immediately, so you remind yourself to do it later by setting yourself a task: press&lt;strong&gt; [Enter]&lt;/strong&gt; after &lt;span class="style8"&gt;new Cat();&lt;/span&gt; to open a new line and in the new line enter the following code:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;span style="font-family:Courier New, Courier, mono;"&gt;&lt;strong&gt;//TODO create a Cat class&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40304.gif" name="t40304" class="imgborder_off" id="t40304" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;5.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Select &lt;strong&gt;View | Tasks &lt;/strong&gt;to see a list of tasks that you have created.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40305.gif" name="t40305" class="imgborder_off" id="t40305" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;6.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;The Tasks window displays a list of the tasks you have created (in this case, it is your only task).&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40306.gif" name="t40306" class="imgborder_off" id="t40306" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;7.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;If you double-click a task in the list, JDeveloper takes you to the relevant task, inserting the cursor at the start of the line.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40307.gif" name="t40307" class="imgborder_off" id="t40307" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;8.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Notice the pink marker at the top right margin of the editor. It indicates where you have created a task. Hover over the marker with the mouse to see what the task is.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40308.gif" name="t40308" class="imgborder_off" id="t40308" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;9.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Comment out the line that creates the &lt;span class="style3"&gt;Cat&lt;/span&gt; object. Notice that the red markers have now disappeared, to be replaced by a green marker indicating that there are no errors in your code.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40309.gif" name="t40309" class="imgborder_off" id="t40309" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;10.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Check out the new toolbar in the code editor.&lt;/p&gt;&lt;p&gt;Add two variables to the class. Hit&lt;span style="font-family:Courier New, Courier, mono;"&gt;&lt;strong&gt; &lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;[Enter&lt;/strong&gt;&lt;span style="font-family:Courier New, Courier, mono;"&gt;&lt;strong&gt;]&lt;/strong&gt;&lt;/span&gt; to create a new line after the class declaration. Declare two variables as follows:&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-family:Courier New, Courier, mono;"&gt;String name;&lt;br /&gt;int age;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40310.gif" name="t40310" class="imgborder_off" id="t40310" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;11.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;In the code editor, right click and select the &lt;span style="color:#000000;"&gt;Generate Accessors option&lt;/span&gt; from context.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40311.gif" name="t40311" class="imgborder_off" id="t40311" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;The generate accessor option is &lt;span style="color:#000000;"&gt;also available from &lt;/span&gt;the code editor toolbar using the &lt;strong&gt;Generate Accessors&lt;/strong&gt; icon.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40311b.gif" name="t40311b" class="imgborder_off" id="t40311b" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;12.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;In the Generate Accessors dialog, &lt;span style="color:#000000;"&gt;check the Dog box to generate&lt;/span&gt; Getter and Setter methods for both variables.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40312.gif" name="t40312" class="imgborder_off" id="t40312" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#000000;"&gt;Notice that you can define the scope for the methods, and define other properties to be implemented in the setter methods such as involving listeners and verifying the new value.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40312a.gif" name="t40312a" class="imgborder_off" id="t40312a" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Click &lt;strong&gt;OK&lt;/strong&gt;. Getter and Setter methods are generated into the Dog class.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40312b.gif" name="t40312b" class="imgborder_off" id="t40312b" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;13.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Right click within the code editor and from context select &lt;strong&gt;Source --&gt; Generate Constructor from fields&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40313.gif" name="t40313" class="imgborder_off" id="t40313" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;14.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;In the Generate Constructor from Fields dialog, select both fields and click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40314.gif" name="t40314" class="imgborder_off" id="t40314" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;15.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;The new constructor method is added to your code.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40315.gif" name="t40315" class="imgborder_off" id="t40315" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;16.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Click the &lt;strong&gt;Undo&lt;/strong&gt; button since we don't need this constructor method.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40316.gif" name="t40316" class="imgborder_off" id="t40316" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;tbody&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/h4&gt;&lt;p align="right"&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/444986195517809571-9152947116599583855?l=javadvipa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadvipa.blogspot.com/feeds/9152947116599583855/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://javadvipa.blogspot.com/2009/01/introduction-to-jdeveloper-ide-working.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/9152947116599583855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/9152947116599583855'/><link rel='alternate' type='text/html' href='http://javadvipa.blogspot.com/2009/01/introduction-to-jdeveloper-ide-working.html' title='Introduction to the JDeveloper IDE - Working with Code Assist'/><author><name>Aisyah Runi</name><uri>http://www.blogger.com/profile/09754809777891988684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_iNFxbPL4FYE/R_dMDxJPHQI/AAAAAAAAAAM/L8A99OeHoPU/S220/runi001.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-444986195517809571.post-8949030759341752255</id><published>2009-01-05T18:10:00.000-08:00</published><updated>2009-01-05T18:13:15.249-08:00</updated><title type='text'>Introduction to the JDeveloper IDE - Compiling and running your Java class</title><content type='html'>&lt;h4&gt;&lt;span class="boldbodycopy"&gt;Compiling and running your Java class&lt;/span&gt;&lt;/h4&gt;&lt;p class="bodycopy"&gt;When you successfully compile a &lt;span class="style3"&gt;.java&lt;/span&gt; file, you create a &lt;span class="style3"&gt;.class&lt;/span&gt; file in the &lt;span class="style3"&gt;\src&lt;/span&gt; directory of the project. Compiling a class in JDeveloper automatically saves the &lt;span class="style3"&gt;.java&lt;/span&gt; file as well. When you run a class, it is automatically compiled and saved.&lt;/p&gt;&lt;table class="bodycopy" border="0" cellpadding="1" cellspacing="0" width="650"&gt;&lt;tbody&gt;&lt;tr valign="top"&gt;&lt;td width="25"&gt;&lt;b&gt;1.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;In the Application Navigator or in the source editor, right-click &lt;span style="font-family:Courier New, Courier, mono;"&gt;&lt;strong&gt;Dog.java&lt;/strong&gt;&lt;/span&gt; and select &lt;strong&gt;Make&lt;/strong&gt; from the context menu.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40201.gif" name="t40201" class="imgborder_off" id="t40201" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="128"&gt;&lt;b&gt;2.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;At the bottom right of the JDeveloper IDE, the log window should show successful compilation. If the log window does not display, use&lt;strong&gt; View | Log&lt;/strong&gt; to display it ( or press &lt;strong&gt;[Ctrl]+[Shift]+[L]&lt;/strong&gt;).&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40202.gif" name="t40202" class="imgborder_off" id="t40202" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Notice that when using the Make option to compile your class, JDeveloper saves all the files in your project.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="86"&gt;&lt;b&gt;3.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;In the Application Navigator or in the source editor, right-click &lt;span style="font-family:Courier New, Courier, mono;"&gt;&lt;strong&gt;Dog.java&lt;/strong&gt;&lt;/span&gt; again, and this time select &lt;strong&gt;Run&lt;/strong&gt; from the context menu.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40203.gif" name="t40203" class="imgborder_off" id="t40203" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;.&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="86"&gt;&lt;b&gt;4.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;The log window displays 3 counts of the ' &lt;strong&gt;woof Kate&lt;/strong&gt;' message.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40204.gif" name="t40204" class="imgborder_off" id="t40204" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p align="right"&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/444986195517809571-8949030759341752255?l=javadvipa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadvipa.blogspot.com/feeds/8949030759341752255/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://javadvipa.blogspot.com/2009/01/introduction-to-jdeveloper-ide_05.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/8949030759341752255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/8949030759341752255'/><link rel='alternate' type='text/html' href='http://javadvipa.blogspot.com/2009/01/introduction-to-jdeveloper-ide_05.html' title='Introduction to the JDeveloper IDE - Compiling and running your Java class'/><author><name>Aisyah Runi</name><uri>http://www.blogger.com/profile/09754809777891988684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_iNFxbPL4FYE/R_dMDxJPHQI/AAAAAAAAAAM/L8A99OeHoPU/S220/runi001.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-444986195517809571.post-2181768344168061808</id><published>2009-01-05T18:04:00.000-08:00</published><updated>2009-01-05T18:08:47.356-08:00</updated><title type='text'>Introduction to the JDeveloper IDE - Using the Source Editor with Your Java Class</title><content type='html'>&lt;h3 class="Install"&gt;&lt;span class="navheader"&gt;Using the Source Editor with Your Java Class &lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span class="bodycopy"&gt;Editors are where most of the application development work takes place; this is where you write code and design user interfaces. In this topic you explore some of the features of the Java Source Editor.&lt;/span&gt;&lt;/p&gt;&lt;table border="0" cellpadding="1" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr valign="top"&gt;&lt;td width="16"&gt;&lt;img src="http://1.1.1.3/bmi/www.oracle.com/technology/obe/obe11jdev/11/ide/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td colspan="2" class="bodylink" width="242"&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/ide/introjdevide.htm#t4s1"&gt;Using code templates &lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td width="16"&gt;&lt;img src="http://1.1.1.3/bmi/www.oracle.com/technology/obe/obe11jdev/11/ide/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td colspan="2" class="bodylink"&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/ide/introjdevide.htm#t4s2"&gt;Compiling and running your Java class &lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;img src="http://1.1.1.3/bmi/www.oracle.com/technology/obe/obe11jdev/11/ide/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td colspan="2" class="bodylink"&gt;&lt;span class="bodycopy"&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/ide/introjdevide.htm#t4s3"&gt;Working with Code Assist&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;img src="http://1.1.1.3/bmi/www.oracle.com/technology/obe/obe11jdev/11/ide/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td colspan="2" class="bodylink"&gt;&lt;span class="bodycopy"&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/ide/introjdevide.htm#t4s4"&gt;Searching and Highlighting Code&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;img src="http://1.1.1.3/bmi/www.oracle.com/technology/obe/obe11jdev/11/ide/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td colspan="2" class="bodylink"&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/ide/introjdevide.htm#t4s5"&gt;Refactoring code&lt;/a&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/ide/introjdevide.htm#t2s4"&gt; &lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;img src="http://1.1.1.3/bmi/www.oracle.com/technology/obe/obe11jdev/11/ide/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td colspan="2" class="bodylink"&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/ide/introjdevide.htm#t4s6"&gt;Viewing code modification history&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td width="16"&gt;&lt;img src="http://1.1.1.3/bmi/www.oracle.com/technology/obe/obe11jdev/11/ide/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td colspan="2" class="bodylink"&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/ide/introjdevide.htm#t4s7"&gt;Navigating through code&lt;/a&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/ide/introjdevide.htm#t2s4"&gt; &lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;a name="t4s1" id="t4s1"&gt;&lt;/a&gt;&lt;span class="boldbodycopy"&gt;Using code templates&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="bodycopy"&gt;Code templates assist you in writing code more quickly and efficiently while you are in the source editor. You can edit existing templates or create your own. This topic shows you how to use some of the existing code templates in the &lt;span class="style3"&gt;Dog&lt;/span&gt; class.&lt;/span&gt;&lt;/p&gt;&lt;table class="bodycopy" border="0" cellpadding="1" cellspacing="0" width="650"&gt;&lt;tbody&gt;&lt;tr valign="top"&gt;&lt;td width="25"&gt;&lt;b&gt;1.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;There is a code template for adding a &lt;span style="font-family:Courier New, Courier, mono;"&gt;main&lt;/span&gt; method to a Java class.&lt;br /&gt;Press&lt;strong&gt; [&lt;/strong&gt;&lt;strong&gt;Enter]&lt;/strong&gt; to create a new line after the &lt;span style="font-family:Courier New, Courier, mono;"&gt;sayHi()&lt;/span&gt; method. Type the letter &lt;span class="style3"&gt;&lt;strong&gt;m&lt;/strong&gt;&lt;/span&gt;, and press &lt;strong&gt;[Ctrl]+[Enter]&lt;/strong&gt; to invoke code templates.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40101.gif" name="t40101" class="imgborder_off" id="t40101" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The &lt;span style="font-family:Courier New, Courier, mono;"&gt;main&lt;/span&gt; method template is suggested.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td width="25" height="50"&gt;&lt;b&gt;2.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Press &lt;strong&gt;Enter&lt;/strong&gt; again to accept the suggestion and incorporate the template.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40102.gif" name="t40102" class="imgborder_off" id="t40102" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;3.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Create a &lt;span class="style3"&gt;&lt;strong&gt;Dog&lt;/strong&gt;&lt;/span&gt; object in the &lt;span class="style3"&gt;main&lt;/span&gt; method by adding the following code:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;span style="font-family:Courier New, Courier, mono;"&gt;&lt;strong&gt;Dog myDog = new Dog();&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40103.gif" name="t40103" class="imgborder_off" id="t40103" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;If you mouse over the &lt;span class="style3"&gt;myDog&lt;/span&gt; variable, a tooltip displays to tell you that the variable has not been used.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40103b.gif" name="t40103b" class="imgborder_off" id="t40103b" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;You see other examples like this in &lt;em&gt;Working with Code Assist &lt;/em&gt;later in this tutorial.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;4. &lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Add a new line and press &lt;strong&gt;[Ctrl]+[Enter]&lt;/strong&gt; to see the list of code templates that are available.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40104.gif" name="t40104" class="imgborder_off" id="t40104" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;5. &lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;You decide to create an integer-based loop using a &lt;em&gt;&lt;strong&gt;for&lt;/strong&gt;&lt;/em&gt; type code template. Type&lt;strong&gt; &lt;/strong&gt;&lt;span class="style3"&gt;&lt;strong&gt;fo&lt;/strong&gt;&lt;/span&gt; to restrict the list.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40105.gif" name="t40105" class="imgborder_off" id="t40105" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Three templates are suggested.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;6. &lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Double-click the second of the three suggestions, the&lt;strong&gt; fori integer based loop&lt;/strong&gt;, to select it.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40106a.gif" name="t40106a" class="imgborder_off" id="t40106a" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The template code is incorporated into the file.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40106.gif" name="t40106" class="imgborder_off" id="t40106" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;7. &lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Modify the template code.&lt;br /&gt;Replace &lt;span class="style3"&gt;&lt;strong&gt;i&lt;/strong&gt;&lt;/span&gt; with &lt;span class="style3"&gt;&lt;strong&gt;count&lt;/strong&gt;&lt;/span&gt;. Notice that changing the first &lt;span class="style3"&gt;i&lt;/span&gt; variable name in the loop changes all subsequent references.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40107.gif" name="t40107" class="imgborder_off" id="t40107" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Limit the loop to &lt;span class="style8"&gt;3&lt;/span&gt; iterations.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40107e.gif" name="t40107e" class="imgborder_off" id="t40107e" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;8. &lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Enter a &lt;span style="font-family:Courier New, Courier, mono;"&gt;System.out.println&lt;/span&gt; statement.&lt;br /&gt;Place the cursor on the blank line inside the curly braces of the &lt;span class="style3"&gt;for&lt;/span&gt; loop, and type &lt;span class="style3"&gt;&lt;strong&gt;System.&lt;/strong&gt;&lt;/span&gt; (be sure to include the dot at the end of the word.) A list of suggested code appears.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40108a.gif" name="t40108a" class="imgborder_off" id="t40108a" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Type the letter &lt;strong&gt;&lt;/strong&gt;&lt;span style="font-family:Courier New, Courier, mono;"&gt;&lt;strong&gt;o&lt;/strong&gt;&lt;/span&gt; and press &lt;strong&gt;[Enter]&lt;/strong&gt; to select the suggested &lt;span style="font-family:Courier New, Courier, mono;"&gt;&lt;strong&gt;out&lt;/strong&gt;&lt;/span&gt; code.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40108b.gif" name="t40108b" class="imgborder_off" id="t40108b" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Type&lt;strong&gt; &lt;span style="font-family:Courier New, Courier, mono;"&gt;.&lt;/span&gt;&lt;/strong&gt; (dot), and when the list of suggested code appears, type the letter &lt;strong&gt;&lt;/strong&gt;&lt;span style="font-family:Courier New, Courier, mono;"&gt;&lt;strong&gt;p&lt;/strong&gt;&lt;/span&gt; and double-click the&lt;strong&gt; &lt;span style="font-family:Courier New, Courier, mono;"&gt;println(&lt;/span&gt;)&lt;/strong&gt; suggested code. &lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40108c.gif" name="t40108c" class="imgborder_off" id="t40108c" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; An even quicker way to enter a &lt;span class="style3"&gt;System.out.println()&lt;/span&gt; statement is to enter &lt;span class="style3"&gt;&lt;strong&gt;sop&lt;/strong&gt;&lt;/span&gt; and then press &lt;strong&gt;[Ctrl]+[Enter]&lt;/strong&gt;. The technique above is given to illustrate how to use code completion.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;9. &lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Add code to use the loop to display the &lt;span class="style3"&gt;sayHi&lt;/span&gt; message. Inside the parentheses after &lt;span class="style3"&gt;println&lt;/span&gt;, you want to enter the following code:&lt;strong&gt;&lt;span style="font-family:Courier New, Courier, mono;"&gt; &lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family:Courier New, Courier, mono;"&gt;count + myDog.sayHi()&lt;/span&gt;. Start typing &lt;span style="font-family:Courier New, Courier, mono;"&gt;&lt;strong&gt;count + myDog.&lt;/strong&gt;&lt;/span&gt; and select the &lt;span style="font-family:Courier New, Courier, mono;"&gt;&lt;strong&gt;sayHi&lt;/strong&gt;&lt;/span&gt; method from the list.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40109.gif" name="t40109" class="imgborder_off" id="t40109" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The complete line should read: &lt;/p&gt;&lt;blockquote&gt;&lt;p class="style3"&gt;&lt;span style="font-family:Courier New, Courier, mono;"&gt;&lt;strong&gt;System.out.println(count + myDog.sayHi());&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;10.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;span style="color:#000000;"&gt;Right-click within the editor view and select &lt;strong&gt;Reformat&lt;/strong&gt; to have JDeveloper restructure your code.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40110.gif" name="t40110" class="imgborder_off" id="t40110" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;11.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Your code should now look like this:&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t40111.gif" name="t40111" class="imgborder_off" id="t40111" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;12.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Save your work. Go to &lt;strong&gt;File--&gt;Save All&lt;/strong&gt;, or click the Save All button &lt;img src="http://1.1.1.5/bmi/www.oracle.com/technology/obe/obe11jdev/11/ide/images/iconSaveAll.gif" width="22" height="21" /&gt; in the toolbar.&lt;span style="font-family:Courier New, Courier, mono;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p align="right"&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/444986195517809571-2181768344168061808?l=javadvipa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadvipa.blogspot.com/feeds/2181768344168061808/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://javadvipa.blogspot.com/2009/01/introduction-to-jdeveloper-ide-using.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/2181768344168061808'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/2181768344168061808'/><link rel='alternate' type='text/html' href='http://javadvipa.blogspot.com/2009/01/introduction-to-jdeveloper-ide-using.html' title='Introduction to the JDeveloper IDE - Using the Source Editor with Your Java Class'/><author><name>Aisyah Runi</name><uri>http://www.blogger.com/profile/09754809777891988684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_iNFxbPL4FYE/R_dMDxJPHQI/AAAAAAAAAAM/L8A99OeHoPU/S220/runi001.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-444986195517809571.post-2831956173018686224</id><published>2009-01-05T17:57:00.001-08:00</published><updated>2009-01-05T18:03:13.163-08:00</updated><title type='text'>Introduction to the JDeveloper IDE</title><content type='html'>&lt;h3 class="topstoryhead"&gt;Introduction to the JDeveloper IDE&lt;/h3&gt;&lt;h4 class="navheader"&gt;Purpose&lt;/h4&gt;&lt;p class="bodycopy"&gt;&lt;span class="bodycopy"&gt;This tutorial provides a tour of the major components in the Oracle JDeveloper 11&lt;em&gt;g &lt;/em&gt;IDE, and shows you how they can be used to build a basic application. &lt;/span&gt;&lt;/p&gt;&lt;h4 class="navheader"&gt;Time to Complete&lt;/h4&gt;&lt;p class="bodycopy"&gt;Approximately 45 minutes.&lt;/p&gt;&lt;h3 class="Overview"&gt;&lt;a name="t"&gt;&lt;/a&gt;&lt;span class="navheader"&gt;Topics&lt;/span&gt;&lt;/h3&gt;&lt;p class="bodycopy"&gt;This tutorial covers the following topics:&lt;/p&gt;&lt;table border="0" cellpadding="1" cellspacing="0" width="369"&gt;&lt;tbody&gt;&lt;tr valign="top"&gt;&lt;td width="16"&gt;&lt;img src="http://1.1.1.3/bmi/www.oracle.com/technology/obe/obe11jdev/11/ide/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td class="bodylink" width="349"&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/ide/introjdevide.htm#o"&gt;Overview&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;img src="http://1.1.1.3/bmi/www.oracle.com/technology/obe/obe11jdev/11/ide/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td class="bodylink"&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/ide/introjdevide.htm#p"&gt;Prerequisites&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;img src="http://1.1.1.3/bmi/www.oracle.com/technology/obe/obe11jdev/11/ide/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/ide/introjdevide.htm#t1" class="boldbodylink"&gt;Launching JDeveloper 11&lt;em&gt;g&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="19"&gt;&lt;img src="http://1.1.1.3/bmi/www.oracle.com/technology/obe/obe11jdev/11/ide/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/ide/introjdevide.htm#t2" class="boldbodylink"&gt;Creating Your First Application&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;img src="http://1.1.1.3/bmi/www.oracle.com/technology/obe/obe11jdev/11/ide/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/ide/introjdevide.htm#t3" class="boldbodylink"&gt;Creating Your First Java Class&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="19"&gt;&lt;img src="http://1.1.1.3/bmi/www.oracle.com/technology/obe/obe11jdev/11/ide/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/ide/introjdevide.htm#t4" class="boldbodylink"&gt;Using the Source Editor with Your Java Class&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;img src="http://1.1.1.3/bmi/www.oracle.com/technology/obe/obe11jdev/11/ide/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/ide/introjdevide.htm#t5" class="boldbodylink"&gt;Debugging Java Programs&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;img src="http://1.1.1.3/bmi/www.oracle.com/technology/obe/obe11jdev/11/ide/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/ide/introjdevide.htm#t6" class="boldbodylink"&gt;Managing Files&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;img src="http://1.1.1.3/bmi/www.oracle.com/technology/obe/obe11jdev/11/ide/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td class="bodylink"&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/ide/introjdevide.htm#s"&gt;Summary&lt;/a&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h4 class="navheader"&gt;Viewing Screenshots&lt;/h4&gt;&lt;p class="bodycopy"&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/obe/obe11jdev/11/ide/images/view_image.gif" onmouseover="showAllImages()" align="absmiddle" /&gt; &lt;b&gt;&lt;span class="style1"&gt;&lt;span style="font-family:Arial, Helvetica, sans-serif;color:#ff0000;"&gt;Place the cursor over this icon to load and view all the screenshots for this tutorial. (Caution: This action loads all screenshots simultaneously, so response time may be slow depending on your Internet connection.) &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="bodycopy"&gt;&lt;b&gt;Note: &lt;/b&gt;Alternatively, you can place the cursor over an individual icon in the following steps to load and view only the screenshot associated with that step. You can hide an individual screenshot by clicking it. &lt;/span&gt;&lt;/p&gt;&lt;h3 class="Overview"&gt;&lt;a name="o"&gt;&lt;/a&gt;&lt;span class="navheader"&gt;Overview&lt;/span&gt;&lt;/h3&gt;&lt;p class="bodycopy"&gt;&lt;span class="bodycopy"&gt;In the tutorial, you learn how to create a simple Java class. Using your new class, you then explore some of the features of the JDeveloper IDE, including Code Assist and the Debugger.&lt;/span&gt;&lt;/p&gt;&lt;p class="bodycopy" align="right"&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/ide/introjdevide.htm#t" class="bodylink"&gt;Back to Topic List&lt;/a&gt;&lt;/p&gt;&lt;h3 class="Install"&gt;&lt;a name="p"&gt;&lt;/a&gt;&lt;span class="navheader"&gt;Prerequisites &lt;/span&gt;&lt;/h3&gt;&lt;p class="bodycopy"&gt;Before you begin this tutorial, you should:&lt;/p&gt;&lt;table border="0" cellpadding="1" cellspacing="0" width="650"&gt;&lt;tbody&gt;&lt;tr valign="top"&gt;&lt;td class="bodycopy" width="25"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;p class="bodycopy"&gt;Have access to or have installed &lt;span style="color:#000000;"&gt;Oracle JDeveloper 11&lt;em&gt;g&lt;/em&gt; Production&lt;/span&gt;. You can download it from &lt;a href="http://www.oracle.com/technology//index.html"&gt;Oracle  Technology Network&lt;/a&gt;.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;h3 class="Install"&gt;&lt;span class="navheader"&gt;Launching JDeveloper 11g&lt;/span&gt;&lt;/h3&gt;&lt;table border="0" cellpadding="1" cellspacing="0" width="650"&gt;&lt;tbody&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;span class="bodycopy"&gt;&lt;strong class="bodycopy"&gt;1.&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class="bodycopy"&gt;&lt;p class="bodycopy"&gt;Start JDeveloper by selecting &lt;strong&gt;Start &gt; All Programs &gt; Oracle WebLogic &gt; JDeveloper Studio 11.1.1.0.0&lt;/strong&gt;&lt;/p&gt;&lt;p class="bodycopy"&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/JDev.gif" name="JDev" class="imgborder_off" id="JDev" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;If a dialog box opens asking if you would like to migrate from a previous version of JDeveloper, click &lt;strong&gt;NO&lt;/strong&gt;.&lt;/p&gt;&lt;p class="bodycopy"&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;strong class="bodycopy"&gt;2.&lt;/strong&gt;&lt;/td&gt;&lt;td class="bodycopy"&gt;&lt;p class="bodycopy"&gt;In the Select Role dialog, choose &lt;strong&gt;Default Role&lt;/strong&gt; and click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt;&lt;p class="bodycopy"&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/jdev_role.gif" name="jdev_role" class="imgborder_off" id="jdev_role" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="bodycopy"&gt;Note: Shaping, which is based on the role of the user, allows the JDeveloper environment to tailor itself. It does this by removing unneeded items from the menus, preferences, new gallery, and even individual fields on dialogs. Shaping can even control the default values for fields on dialogs within the tool. When you first start JDeveloper, you are prompted to choose a role that describes how you use JDeveloper. If you choose a role of "Java Developer" versus "CRM Applications Developer" versus "Default Role" you will get a totally different experience!&lt;/p&gt;&lt;p&gt;Close the &lt;strong&gt;Tip of the Day&lt;/strong&gt; window.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td width="25"&gt;&lt;strong class="bodycopy"&gt;3.&lt;/strong&gt;&lt;/td&gt;&lt;td class="bodycopy"&gt;&lt;p&gt;Once loaded, the JDeveloper IDE appears. The very first time you open JDeveloper, the Start Page displays. You can re-invoke the Start Page later by choosing &lt;strong&gt;Help | Start Page.&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Notice the various options available to help you learn about JDeveloper. After exploring these options, close the Start Page by clicking the&lt;strong&gt; X &lt;/strong&gt;on its tab (the X appears when you mouse over the tab).&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/jdev_ide.gif" name="jdev_ide" class="imgborder_off" id="jdev_ide" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p align="right"&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/ide/introjdevide.htm#t" class="bodylink"&gt;Back to Topic List&lt;/a&gt;&lt;/p&gt;&lt;h4&gt;&lt;p&gt;&lt;a name="t2"&gt;&lt;/a&gt;&lt;span class="navheader"&gt;Creating Your First Application&lt;/span&gt;&lt;/p&gt;&lt;/h4&gt;&lt;p class="bodycopy"&gt;&lt;span class="bodycopy"&gt;The application is the highest level in the control structure. It is a view of all the objects you need while you are working. An application keeps track of all your projects while you are developing your Java programs.&lt;br /&gt;&lt;br /&gt;Applications are stored in files with the extension &lt;span style="font-family:Courier New, Courier, mono;"&gt;.jws&lt;/span&gt;. When you open JDeveloper, the last application used is opened by default, so that you can resume where you left off.&lt;br /&gt;&lt;br /&gt;When creating a new application you have the option to base it on a template. The application template you select determines the initial project structure, that is, the named project folders within the application.&lt;br /&gt;&lt;br /&gt;In JDeveloper you always work with projects contained within an application. A JDeveloper project is a logical grouping of related files. You can add multiple projects to an application to easily access, modify and reuse your source code.&lt;br /&gt;&lt;br /&gt;The Application Navigator is the main JDeveloper window from which you access the components of your application. The structure of the Application Navigator is hierarchical and supports, for a given application, projects, images, &lt;span style="font-family:Courier New, Courier, mono;"&gt;.html&lt;/span&gt; files, and many more. By default the Application Navigator displays on the left side of the IDE.&lt;/span&gt;&lt;span class="bodycopy"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="bodycopy"&gt;To create an application, perform the following steps:&lt;/p&gt;&lt;table class="bodycopy" border="0" cellpadding="1" cellspacing="0" width="650"&gt;&lt;tbody&gt;&lt;tr valign="top"&gt;&lt;td width="25"&gt;&lt;b&gt;1.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Click the &lt;strong&gt;New Application&lt;/strong&gt; link in the Application Navigator.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t20101.gif" name="t20101" class="imgborder_off" id="t20101" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td width="25" height="50"&gt;&lt;b&gt;2.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;In the Create Application dialog, modify the default application name to &lt;span style="font-family:Courier New, Courier, mono;"&gt;&lt;strong&gt;MyFirstApp&lt;/strong&gt;&lt;/span&gt;. Note that the Directory Name changes accordingly.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t20102.gif" name="t20102" class="imgborder_off" id="t20102" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="50"&gt;&lt;b&gt;3.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Scroll down the &lt;strong&gt;Application Template&lt;/strong&gt; pane to review the list of available templates. Select the &lt;strong&gt;Generic Application&lt;/strong&gt; to configure this application with a single project that has access to all JDeveloper technologies.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t20103.gif" name="t20103" class="imgborder_off" id="t20103" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td height="115"&gt;&lt;b&gt;4. &lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;In this new step, change the default Project Name to &lt;strong&gt;&lt;span style="font-family:Courier New, Courier, mono;"&gt;MyProject&lt;/span&gt;&lt;/strong&gt;, and then click &lt;strong&gt;Finish&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t20104.gif" name="t20104" class="imgborder_off" id="t20104" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td width="25"&gt;&lt;b&gt;5. &lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;In the Application Navigator, projects are displayed as the second level in the hierarchy under the application. The Application Navigator should look like this:&lt;/p&gt;&lt;p class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t20105.gif" name="t20105" class="imgborder_off" id="t20105" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/p&gt;&lt;p class="bodycopy"&gt;Note that the project folder is a child of the application folder.&lt;/p&gt;&lt;p class="style4"&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td width="25"&gt;&lt;b&gt;6. &lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;span style="color:#000000;"&gt;The Visual Editor displays information about the various categories of JDeveloper, and at the bottom of each category, provides links to enable you to discover more information about that category.&lt;/span&gt;&lt;/p&gt;&lt;p class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t20106.gif" name="t20106" class="imgborder_off" id="t20106" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/p&gt;&lt;p class="style4"&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td width="25"&gt;&lt;b&gt;7.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;span style="color:#000000;"&gt;Within the Application Navigator, notice the three titles corresponding to accordion type of panes. &lt;/span&gt;&lt;/p&gt;&lt;p class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t20107.gif" name="t20107" class="imgborder_off" id="t20107" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/p&gt;&lt;p class="navheader"&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td width="25"&gt;&lt;b&gt;8.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;span style="color:#000000;"&gt;Click in the accordion title to expand it.&lt;/span&gt;&lt;/p&gt;&lt;p class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t20108.gif" name="t20108" class="imgborder_off" id="t20108" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/p&gt;&lt;p class="navheader"&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td width="25"&gt;&lt;b&gt;9.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;span style="color:#000000;"&gt;Click in the title of an expanded accordion to collapse it.&lt;/span&gt;&lt;/p&gt;&lt;p class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t20109.gif" name="t20109" class="imgborder_off" id="t20109" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/p&gt;&lt;p class="navheader"&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td width="25"&gt;&lt;b&gt;10.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;span style="color:#000000;"&gt;Accordions are also available in other panes of JDeveloper such as the &lt;strong&gt;Structure&lt;/strong&gt; pane or &lt;strong&gt;Resources Palette&lt;/strong&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;h3 class="Install"&gt;&lt;span class="navheader"&gt;Creating Your First Java Class&lt;/span&gt;&lt;/h3&gt;&lt;p class="bodycopy"&gt;To create a new Java class, perform the following steps:&lt;/p&gt;&lt;table class="bodycopy" border="0" cellpadding="1" cellspacing="0" width="650"&gt;&lt;tbody&gt;&lt;tr valign="top"&gt;&lt;td width="25"&gt;&lt;b&gt;1.&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Right-click the &lt;strong&gt;MyProject&lt;/strong&gt; node in the Application Navigator and select &lt;strong&gt;New...&lt;/strong&gt; from the context menu.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t30101.gif" name="t30101" class="imgborder_off" id="t30101" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td width="25" height="50"&gt;&lt;span class="style6"&gt;&lt;strong&gt;2.&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;The New Gallery displays. By default, the first category, General, is highlighted in the Categories list. The other categories enable you to work with different technologies to build the various tiers of an application.&lt;/p&gt;&lt;p&gt;Click the &lt;strong&gt;+ &lt;/strong&gt;sign to the left of the &lt;strong&gt;General&lt;/strong&gt; category to expand it, and take note of the sub-categories that are available.&lt;/p&gt;&lt;p&gt;Select the &lt;strong&gt;Java&lt;/strong&gt; node, and then select &lt;strong&gt;Java Class &lt;/strong&gt;in the Items list in the right portion of the window. Click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t30102.gif" name="t30102" class="imgborder_off" id="t30102" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td width="25" height="50"&gt;&lt;span class="style6"&gt;&lt;strong&gt;3.&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;In the Create Java Class dialog, change the default name to &lt;strong&gt;&lt;span style="font-family:Courier New, Courier, mono;"&gt;Dog&lt;/span&gt;&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;Because you did not specify a package name when creating the application, the package name defaults to the project name in lowercase. You could change this if desired, but you do not need to do so for this tutorial.&lt;/p&gt;&lt;p&gt;Accept all other defaults and click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t30103.gif" name="t30103" class="imgborder_off" id="t30103" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td width="25" height="116"&gt;&lt;strong&gt;&lt;span class="style6"&gt;4.&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;The new class opens automatically in the source editor, where you see the skeleton class definition.&lt;/p&gt;&lt;p&gt;Add a method to the class. After the constructor, press &lt;strong&gt;[Enter&lt;/strong&gt;&lt;strong&gt;]&lt;/strong&gt; to create a new line, and type the following code:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-family:Courier New, Courier, mono;"&gt;public String sayHi() &lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t30104.gif" name="t30104" class="imgborder_off" id="t30104" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Notice that the line that you just entered has a wavy red line under it, indicating a problem with the syntax. There are also red boxes in the right margin of the source editor. If you mouse over these boxes or over the wavy red line, a tooltip displays information about the error or errors. You see other examples like this in &lt;em&gt;Working with Code Assist &lt;/em&gt;later in this tutorial.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td width="25" height="50"&gt;&lt;strong&gt;&lt;span class="style6"&gt;5.&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;At the end of the line, press &lt;strong&gt;[Ctrl]+[Shift] [Enter]&lt;/strong&gt; and JDeveloper provides auto-completion of the method structure, and some of the error indicators disappear. However some indicators remain, showing that the syntax is still not complete.&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t30105.gif" name="t30105" class="imgborder_off" id="t30105" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#000000;"&gt;Notice that auto-completion is also accessible from the &lt;strong&gt;Source | Complete Statement&lt;/strong&gt; menu option.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t30105b.gif" name="t30105b" class="imgborder_off" id="t30105b" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td width="25" height="71"&gt;&lt;strong&gt;&lt;span class="style6"&gt;6.&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Add code to provide the missing return statement.&lt;/p&gt;&lt;p&gt;In the blank line between the two curly braces that were added to the method, add the following code:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;span style="font-family:Courier New, Courier, mono;"&gt;&lt;strong&gt;return " woof " + "Kate";&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;span class="navheader"&gt;&lt;img src="http://www.oracle.com/technology/obe/obe11jdev/11/ide/images/t30106.gif" name="t30106" class="imgborder_off" id="t30106" onclick="hideImage(this)" onmouseover="showImage(this)" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Notice that when you type the first double quote symbol ("), JDeveloper automatically provides you with the second double quote, enclosing the cursor between them, so that you can easily type the literal. Notice also that a green box has appeared in the upper right margin to indicate that there are now no syntax errors.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p align="right"&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/444986195517809571-2831956173018686224?l=javadvipa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadvipa.blogspot.com/feeds/2831956173018686224/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://javadvipa.blogspot.com/2009/01/introduction-to-jdeveloper-ide.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/2831956173018686224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/2831956173018686224'/><link rel='alternate' type='text/html' href='http://javadvipa.blogspot.com/2009/01/introduction-to-jdeveloper-ide.html' title='Introduction to the JDeveloper IDE'/><author><name>Aisyah Runi</name><uri>http://www.blogger.com/profile/09754809777891988684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_iNFxbPL4FYE/R_dMDxJPHQI/AAAAAAAAAAM/L8A99OeHoPU/S220/runi001.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-444986195517809571.post-2364701400170052623</id><published>2009-01-05T17:33:00.000-08:00</published><updated>2009-01-05T17:37:37.250-08:00</updated><title type='text'>Oracle JDeveloper 11g Tutorials - Oracle by Example Series: JDeveloper 11g Production</title><content type='html'>&lt;table border="0" cellpadding="0" cellspacing="4" width="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td colspan="2" valign="top"&gt;&lt;p&gt;&lt;span class="parahead1"&gt;Oracle by Example Series: JDeveloper 11g Production&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2" valign="top"&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/images/bullets_and_symbols/divider.gif" width="100%" height="15" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td colspan="2"&gt;&lt;span class="bodycopy"&gt;&lt;p&gt;The Oracle by Example series provides step-by-step instructions on how to perform a variety of common tasks using Oracle JDeveloper. These short tutorials allow you to gain valuable hands-on experience, and then use the lessons as the foundation for your own implementation.&lt;br /&gt; &lt;/p&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left" valign="top" width="25"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td class="boldbodycopy" valign="top" width="1218"&gt;Generic IDE and Java EE&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left" valign="top" width="25"&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/images/bullets_and_symbols/bullet.gif" align="top" width="16" height="16" /&gt;&lt;/td&gt;&lt;td valign="top" width="1218"&gt;&lt;a class="bodylink" href="http://www.oracle.com/technology/obe/obe11jdev/11/ide/introjdevide.htm"&gt;Introduction to the JDeveloper IDE&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left" valign="top" width="25"&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/images/bullets_and_symbols/bullet.gif" align="top" width="16" height="16" /&gt;&lt;/td&gt;&lt;td valign="top" width="1218"&gt;&lt;a class="bodylink" href="http://www.oracle.com/technology/obe/obe11jdev/11/ejb/ejb.html"&gt;Build a Web Application with JDeveloper 11g Using EJB, JPA, and JavaServer Faces&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left" valign="top" width="25"&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/images/bullets_and_symbols/bullet.gif" align="top" width="16" height="16" /&gt;&lt;/td&gt;&lt;td valign="top" width="1218"&gt;&lt;a class="bodylink" href="http://www.oracle.com/technology/obe/obe11jdev/11/db_dev/obe_%20databasedevmt.htm"&gt;Database Development with JDeveloper&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left" valign="top" width="25"&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/images/bullets_and_symbols/bullet.gif" align="top" width="16" height="16" /&gt;&lt;/td&gt;&lt;td valign="top" width="1218"&gt;&lt;a class="bodylink" href="http://www.oracle.com/technology/obe/obe11jdev/11/ws/ws.html"&gt;Build Web Services with Oracle JDeveloper&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left" valign="top" width="25"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td class="boldbodycopy" valign="top" width="1218"&gt;&lt;br /&gt;Oracle ADF Tutorials&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left" valign="top" width="25"&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/images/bullets_and_symbols/bullet.gif" align="top" width="16" height="16" /&gt;&lt;/td&gt;&lt;td valign="top" width="1218"&gt;&lt;a class="bodylink" href="http://www.oracle.com/technology/obe/obe11jdev/11/bus_serv1/developbusinessservices.html"&gt;Developing Business Services with ADF Business Components&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left" valign="top" width="25"&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/images/bullets_and_symbols/bullet.gif" align="top" width="16" height="16" /&gt;&lt;/td&gt;&lt;td valign="top" width="1218"&gt;&lt;a class="bodylink" href="http://www.oracle.com/technology/obe/obe11jdev/11/dev_ui/developuserinterface.html"&gt;Developing a User Interface with ADF Faces&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left" valign="top" width="25"&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/images/bullets_and_symbols/bullet.gif" align="top" width="16" height="16" /&gt;&lt;/td&gt;&lt;td valign="top" width="1218"&gt;&lt;a class="bodylink" href="http://www.oracle.com/technology/obe/obe11jdev/11/adfbc_new_features/adfbc.html"&gt;Examining ADF Business Components New Features&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left" valign="top" width="25"&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/images/bullets_and_symbols/bullet.gif" align="top" width="16" height="16" /&gt;&lt;/td&gt;&lt;td valign="top" width="1218"&gt;&lt;a class="bodylink" href="http://www.oracle.com/technology/obe/obe11jdev/11/rich_client/adfrichclient.htm"&gt;Developing Ajax-Based User Interfaces with JSF: An Introduction to ADF Faces Rich Client Components&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left" valign="top" width="25"&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/images/bullets_and_symbols/bullet.gif" align="top" width="16" height="16" /&gt;&lt;/td&gt;&lt;td valign="top" width="1218"&gt;&lt;a class="bodylink" href="http://www.oracle.com/technology/obe/obe11jdev/11/dvt/gant_chart_pivot_table.htm"&gt;Introduction to ADF Data Visualization Components - Graphs, Gauge, Maps, Pivot Table and Gantt&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left" valign="top" width="25"&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/images/bullets_and_symbols/bullet.gif" align="top" width="16" height="16" /&gt;&lt;/td&gt;&lt;td valign="top" width="1218"&gt;&lt;a class="bodylink" href="http://www.oracle.com/technology/obe/obe11jdev/11/wsdc/wsdc.htm"&gt;Use JDeveloper 11g to Create a Data Control From a Web Service&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left" valign="top" width="25"&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/images/bullets_and_symbols/bullet.gif" align="top" width="16" height="16" /&gt;&lt;/td&gt;&lt;td valign="top" width="1218"&gt;&lt;a class="bodylink" href="http://www.oracle.com/technology/obe/obe11jdev/11/bookmark/url_bookmark.html"&gt;Build a Bookmarkable JSF Page with JDeveloper 11g&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left" valign="top" width="25"&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/images/bullets_and_symbols/bullet.gif" align="top" width="16" height="16" /&gt;&lt;/td&gt;&lt;td valign="top" width="1218"&gt;&lt;a class="bodylink" href="http://www.oracle.com/technology/obe/obe11jdev/11/btf/bounded_task_flow.html"&gt;Extending the JSF Controller - Working with Bounded Task Flows, Regions and Routers&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span class="bodycopy"&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;a class="bodylink" href="http://www.oracle.com/technology/products/jdev/11/cuecards/index.html"&gt;Additional Cue Card Tutorials for JDeveloper 11g &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a class="bodylink" href="http://www.oracle.com/technology/obe/obe1013jdev/index.htm"&gt;OBEs for JDeveloper 10.1.3.&lt;/a&gt;&lt;br /&gt;&lt;a class="bodylink" href="http://www.oracle.com/technology/products/jdev/collateral/4gl/collateral.html#odd_10_1_3"&gt;Additional Tutorials and Collateral for Forms Developers&lt;/a&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/444986195517809571-2364701400170052623?l=javadvipa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadvipa.blogspot.com/feeds/2364701400170052623/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://javadvipa.blogspot.com/2009/01/oracle-jdeveloper-11g-tutorials-oracle.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/2364701400170052623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/2364701400170052623'/><link rel='alternate' type='text/html' href='http://javadvipa.blogspot.com/2009/01/oracle-jdeveloper-11g-tutorials-oracle.html' title='Oracle JDeveloper 11g Tutorials - Oracle by Example Series: JDeveloper 11g Production'/><author><name>Aisyah Runi</name><uri>http://www.blogger.com/profile/09754809777891988684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_iNFxbPL4FYE/R_dMDxJPHQI/AAAAAAAAAAM/L8A99OeHoPU/S220/runi001.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-444986195517809571.post-3721284510430764440</id><published>2009-01-05T16:41:00.000-08:00</published><updated>2009-01-05T16:43:04.403-08:00</updated><title type='text'>Oracle JDeveloper Downloads</title><content type='html'>&lt;p class="topstoryhead"&gt;Oracle JDeveloper Downloads&lt;br /&gt;&lt;/p&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="parahead1" valign="top"&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/images/bullets_and_symbols/divider.gif" width="100%" height="10" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign="top" width="16"&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/images/bullets_and_symbols/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td valign="top" width="945"&gt;&lt;a href="http://www.oracle.com/technology/software/products/jdev/htdocs/soft11.html" class="bodylink"&gt;Oracle JDeveloper 11g &lt;/a&gt;&lt;span class="bodycopy"&gt;&lt;/span&gt; &lt;span class="boldbodycopy"&gt;New December 2008&lt;/span&gt;&lt;br /&gt;&lt;span class="bodycopy"&gt;Certified on Windows NT/2000/XP/Vista, Linux, and Macintosh. Supported on any platform that runs JDK 6.&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="parahead1" valign="top"&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/images/bullets_and_symbols/divider.gif" width="100%" height="10" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign="top" width="16"&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/images/bullets_and_symbols/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td valign="top" width="945"&gt;&lt;a href="http://www.oracle.com/technology/software/products/jdev/htdocs/soft10134.html" class="bodylink"&gt;Oracle JDeveloper (10.1.3.4)&lt;/a&gt;&lt;span class="bodycopy"&gt;&lt;/span&gt; &lt;span class="boldbodycopy"&gt;July 2008&lt;/span&gt;&lt;br /&gt;&lt;span class="bodycopy"&gt;Certified on Windows NT/2000/XP, Linux, and Macintosh. Supported on any platform that runs JDK 5.0.&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top" width="16"&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/images/bullets_and_symbols/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td valign="top" width="945"&gt;&lt;a href="http://www.oracle.com/technology/software/products/jdev/htdocs/adfinstaller.html" class="bodylink"&gt;Oracle ADF Installer (10.1.3.4) &lt;/a&gt;&lt;span class="boldbodycopy"&gt;July 2008&lt;/span&gt;&lt;br /&gt;&lt;span class="bodycopy"&gt;Certified on Windows NT/2000/XP, Linux, and Macintosh. Supported on any platform that runs JDK 5.0.&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table border="0" width="750"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td colspan="2" class="parahead1" valign="top"&gt;&lt;a name="archive"&gt;&lt;/a&gt;Oracle JDeveloper Archives&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2" class="parahead1" valign="top"&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/images/bullets_and_symbols/divider.gif" width="100%" height="10" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top" width="16"&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/images/bullets_and_symbols/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td valign="top" width="734"&gt;&lt;a href="http://www.oracle.com/technology/software/products/jdev/archives.html" class="bodylink"&gt;Archives&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2" class="parahead1" valign="top"&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/images/bullets_and_symbols/divider.gif" width="100%" height="10" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top" width="16"&gt; &lt;/td&gt;&lt;td class="parahead1" valign="top" width="734"&gt; &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top" width="16"&gt; &lt;/td&gt;&lt;td class="parahead1" valign="top" width="734"&gt;Related Products&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top" width="16"&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/images/bullets_and_symbols/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td valign="top" width="734"&gt;&lt;a href="http://www.oracle.com/technology/software/products/database/xe/index.html" class="bodylink"&gt;Oracle Database XE - The Free Oracle Database Version&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top" width="16"&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/images/bullets_and_symbols/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td valign="top" width="734"&gt;&lt;a href="http://www.oracle.com/technology/products/oc4j" class="bodylink"&gt;Oracle Containers for J2EE&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top" width="16"&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/images/bullets_and_symbols/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td valign="top" width="734"&gt;&lt;a href="http://www.oracle.com/technology/software/tech/webservices/index.html" class="bodylink"&gt;Oracle SOA Suite&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top" width="16"&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/images/bullets_and_symbols/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td valign="top" width="734"&gt;&lt;a href="http://www.oracle.com/technology/products/webcenter/index.html" class="bodylink"&gt;Oracle WebCenter Suite&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/444986195517809571-3721284510430764440?l=javadvipa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadvipa.blogspot.com/feeds/3721284510430764440/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://javadvipa.blogspot.com/2009/01/oracle-jdeveloper-downloads.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/3721284510430764440'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/3721284510430764440'/><link rel='alternate' type='text/html' href='http://javadvipa.blogspot.com/2009/01/oracle-jdeveloper-downloads.html' title='Oracle JDeveloper Downloads'/><author><name>Aisyah Runi</name><uri>http://www.blogger.com/profile/09754809777891988684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_iNFxbPL4FYE/R_dMDxJPHQI/AAAAAAAAAAM/L8A99OeHoPU/S220/runi001.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-444986195517809571.post-4304833182142910110</id><published>2009-01-05T15:10:00.000-08:00</published><updated>2009-01-05T15:11:50.633-08:00</updated><title type='text'>Oracle ADF Faces Documentation</title><content type='html'>&lt;h1&gt;&lt;span style="font-size:100%;"&gt;Oracle ADF Faces Documentation&lt;/span&gt;&lt;/h1&gt;&lt;hr /&gt;&lt;h3&gt;API documentation&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.oracle.com/technology/products/adf/adffaces/11/doc/multiproject/adf-richclient-api/enhanced-tagdoc.html"&gt;ADF Faces Tag Enhanced Documentation&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.oracle.com/technology/products/adf/adffaces/11/doc/multiproject/adf-richclient-api/tagdoc.html"&gt;ADF Faces Tag Documentation&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.oracle.com/technology/products/adf/adffaces/11/doc/multiproject/adf-richclient-api/apidocs/index.html"&gt;Rich API Javadoc&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.oracle.com/technology/products/adf/adffaces/11/doc/multiproject/adf-faces-api/apidocs/index.html"&gt;Apache Trinidad API Javadoc&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.oracle.com/technology/products/adf/adffaces/11/doc/multiproject/adf-richclient-api/js_docs_out/index.html"&gt;JavaScript Doc&lt;/a&gt; (Note: While JS APIs can now be used, they are still subject to change. Component APIs are generally stable - it is the non-component classes that are at issue.)&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.oracle.com/technology/products/adf/adffaces/11/doc/skin-selectors.html"&gt;ADF Faces Skinning Selectors definitions&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.oracle.com/technology/products/adf/adffaces/11/doc/multiproject/dvt/index.html"&gt;ADF Faces Data Visualization Tags&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.oracle.com/technology/products/adf/adffaces/11/doc/demo/adf_faces_rc_demo.html"&gt;ADF Faces Runtime Demo Installation&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Supported Platforms&lt;/h2&gt;&lt;p&gt;ADF Faces is currently supported in the following user agents (i.e. browsing platforms):&lt;/p&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr class="a"&gt;&lt;td clas="bodycopy"&gt;&lt;strong&gt;User Agent&lt;/strong&gt;&lt;/td&gt;&lt;td clas="bodycopy"&gt;&lt;strong&gt;Windows&lt;/strong&gt;&lt;/td&gt;&lt;td clas="bodycopy"&gt;&lt;strong&gt;Solaris&lt;/strong&gt;&lt;/td&gt;&lt;td clas="bodycopy"&gt;&lt;strong&gt;Mac OS X&lt;/strong&gt;&lt;/td&gt;&lt;td clas="bodycopy"&gt;&lt;strong&gt;Red Hat Linux&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class="b"&gt;&lt;td clas="bodycopy"&gt;&lt;strong&gt;Internet Explorer&lt;/strong&gt;&lt;/td&gt;&lt;td clas="bodycopy"&gt;7.0&lt;/td&gt;&lt;td clas="bodycopy"&gt;-&lt;/td&gt;&lt;td clas="bodycopy"&gt;-&lt;/td&gt;&lt;td clas="bodycopy"&gt;-&lt;/td&gt;&lt;/tr&gt;&lt;tr class="a"&gt;&lt;td clas="bodycopy"&gt;&lt;strong&gt;Firefox&lt;/strong&gt;&lt;/td&gt;&lt;td clas="bodycopy"&gt;2.0.0.2+&lt;/td&gt;&lt;td clas="bodycopy"&gt;2.0.0.2+&lt;/td&gt;&lt;td clas="bodycopy"&gt;2.0.0.2+&lt;/td&gt;&lt;td clas="bodycopy"&gt;2.0.0.2+&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/444986195517809571-4304833182142910110?l=javadvipa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadvipa.blogspot.com/feeds/4304833182142910110/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://javadvipa.blogspot.com/2009/01/oracle-adf-faces-documentation.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/4304833182142910110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/4304833182142910110'/><link rel='alternate' type='text/html' href='http://javadvipa.blogspot.com/2009/01/oracle-adf-faces-documentation.html' title='Oracle ADF Faces Documentation'/><author><name>Aisyah Runi</name><uri>http://www.blogger.com/profile/09754809777891988684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_iNFxbPL4FYE/R_dMDxJPHQI/AAAAAAAAAAM/L8A99OeHoPU/S220/runi001.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-444986195517809571.post-344632128784441530</id><published>2009-01-05T15:06:00.000-08:00</published><updated>2009-01-05T15:07:06.927-08:00</updated><title type='text'>Developing Ajax-Based User Interfaces with JSF: An Introduction to ADF Faces Rich Client Components</title><content type='html'>&lt;h3 class="topstoryhead"&gt;&lt;span style="color:#000000;"&gt;Developing Ajax-Based User Interfaces with JSF: An Introduction to ADF Faces Rich Client Components &lt;/span&gt;&lt;/h3&gt;&lt;h4 class="navheader"&gt;Purpose&lt;/h4&gt;&lt;p class="bodycopy"&gt;&lt;span style="color:#000000;"&gt;In this tutorial, you learn how to create JSF pages using O&lt;/span&gt;racle ADF Faces Rich Client (RC). &lt;span style="color:#000000;"&gt;O&lt;/span&gt;racle ADF Faces Rich Client is a set of standard JSF components that include built-in Ajax functionality. While Ajax allows rich client-like applications to run on standard internet technologies, JSF provides server-side control, which reduces the dependency on an abundance of JavaScript often found in typical Ajax applications.&lt;/p&gt;&lt;p class="navheader"&gt;Time to Complete&lt;/p&gt;&lt;p class="bodycopy"&gt;60 minutes&lt;/p&gt;&lt;h3 class="Overview"&gt;&lt;a name="t"&gt;&lt;/a&gt;&lt;span class="navheader"&gt;Topics&lt;/span&gt;&lt;/h3&gt;&lt;p class="bodycopy"&gt;The tutorial covers the following topics:&lt;/p&gt;&lt;table border="0" cellpadding="1" cellspacing="0" width="397"&gt;&lt;tbody&gt;&lt;tr valign="top"&gt;&lt;td width="23"&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/obe/obe11jdev/11/rich_client/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td class="bodylink" width="370"&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/rich_client/adfrichclient.htm#o"&gt;Overview&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/obe/obe11jdev/11/rich_client/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td class="bodylink"&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/rich_client/adfrichclient.htm#sc"&gt;Scenario&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/obe/obe11jdev/11/rich_client/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td class="bodylink"&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/rich_client/adfrichclient.htm#p"&gt;Prerequisites&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/obe/obe11jdev/11/rich_client/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/rich_client/adfrichclient.htm#t1" class="boldbodylink"&gt;Open the Startup Application&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/obe/obe11jdev/11/rich_client/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/rich_client/adfrichclient.htm#ta" class="boldbodylink"&gt;Create the Page Flow&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/obe/obe11jdev/11/rich_client/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/rich_client/adfrichclient.htm#t10" class="boldbodylink"&gt;Use Layout Components to Design the Page&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/obe/obe11jdev/11/rich_client/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/rich_client/adfrichclient.htm#t11" class="boldbodylink"&gt;ADF Table Component and ADF Binding&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/obe/obe11jdev/11/rich_client/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/rich_client/adfrichclient.htm#t2" class="boldbodylink"&gt;Test the Main Page&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/obe/obe11jdev/11/rich_client/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/rich_client/adfrichclient.htm#t3" class="boldbodylink"&gt;Work with the Image and Gauge components&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/obe/obe11jdev/11/rich_client/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/rich_client/adfrichclient.htm#t3b" class="boldbodylink"&gt;Work with Menus&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/obe/obe11jdev/11/rich_client/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/rich_client/adfrichclient.htm#t4" class="boldbodylink"&gt;Work with Input Components&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/obe/obe11jdev/11/rich_client/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/rich_client/adfrichclient.htm#t4b" class="boldbodylink"&gt;Implement Partial Page Rendering&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/obe/obe11jdev/11/rich_client/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/rich_client/adfrichclient.htm#t5" class="boldbodylink"&gt;Add Pop up Functionality to the Main Page&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/obe/obe11jdev/11/rich_client/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/rich_client/adfrichclient.htm#t5b" class="boldbodylink"&gt;Add Drag and Drop Functionality to the Main Page&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/obe/obe11jdev/11/rich_client/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/rich_client/adfrichclient.htm#tb" class="boldbodylink"&gt;Use Skins to Change the Look and Feel of the Application&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="top"&gt;&lt;td&gt;&lt;img src="http://1.1.1.4/bmi/www.oracle.com/technology/obe/obe11jdev/11/rich_client/images/bullet.gif" width="16" height="16" /&gt;&lt;/td&gt;&lt;td class="bodylink"&gt;&lt;a href="http://www.oracle.com/technology/obe/obe11jdev/11/rich_client/adfrichclient.htm#s"&gt;Summary&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/444986195517809571-344632128784441530?l=javadvipa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadvipa.blogspot.com/feeds/344632128784441530/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://javadvipa.blogspot.com/2009/01/developing-ajax-based-user-interfaces.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/344632128784441530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/344632128784441530'/><link rel='alternate' type='text/html' href='http://javadvipa.blogspot.com/2009/01/developing-ajax-based-user-interfaces.html' title='Developing Ajax-Based User Interfaces with JSF: An Introduction to ADF Faces Rich Client Components'/><author><name>Aisyah Runi</name><uri>http://www.blogger.com/profile/09754809777891988684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_iNFxbPL4FYE/R_dMDxJPHQI/AAAAAAAAAAM/L8A99OeHoPU/S220/runi001.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-444986195517809571.post-709646330932784092</id><published>2009-01-01T20:05:00.000-08:00</published><updated>2009-05-15T20:07:58.007-07:00</updated><title type='text'>Enter to Java</title><content type='html'>&lt;h3 class="docSection1Title" id="474380-823"&gt;Enter Java&lt;/h3&gt;&lt;a name="IDX-CHP-1-0059"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0060"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0061"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0062"&gt;&lt;/a&gt; &lt;p class="docText"&gt;The Java programming language, developed at Sun Microsystems  under the guidance of Net luminaries James Gosling and Bill Joy, is designed to  be a machine-independent programming language that is both safe enough to  traverse networks and powerful enough to replace native executable code. Java  addresses the issues raised here and helps us start building the kinds of  applications we want.&lt;/p&gt; &lt;p class="docText"&gt;Initially, most of the enthusiasm for Java centered on its  capabilities for building embedded applications for the Web called &lt;span class="docEmphasis"&gt;applets&lt;/span&gt;&lt;a name="IDX-CHP-1-0063"&gt;&lt;/a&gt;. But in the early  days, applets and other client-side GUI applications written in Java were  limited. Today, Java has Swing, one of the most sophisticated toolkits for  building graphical user interfaces (GUIs) in any language. This development has  allowed Java to become a popular platform for developing traditional client-side  application software.&lt;/p&gt; &lt;p class="docText"&gt;Of even more importance in the past few years, Java has become  the premier platform for web-based applications and web services. These  applications use technologies including the Java Servlet API, Enterprise  JavaBeans?, and many popular open source and commercial Java application servers  and frameworks. Java's portability and speed make it the platform of choice for  modern business applications.&lt;/p&gt; &lt;p class="docText"&gt;This book will show you how to use Java to accomplish all of  these real-world programming tasks. In the coming chapters we'll cover  everything from text processing to networking, building rich client-side GUI  applications with Swing and lightweight web-based applications with XML.&lt;/p&gt;&lt;a name="learnjava3-CHP-1-SECT-1.1"&gt;&lt;/a&gt; &lt;h4 class="docSection2Title"&gt;Java's Origins&lt;/h4&gt;&lt;a name="IDX-CHP-1-0064"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0065"&gt;&lt;/a&gt; &lt;p class="docText"&gt;The seeds of Java were planted in 1990 by Sun Microsystems  patriarch and chief researcher, Bill Joy. At the time, Sun was competing in a  relatively small workstation market while Microsoft was beginning its domination  of the more mainstream, Intel-based PC world. When Sun missed the boat on the PC  revolution, Joy retreated to Aspen, Colorado to work on advanced research. He  was committed to the idea of accomplishing complex tasks with simple software  and founded the aptly named Sun Aspen Smallworks.&lt;/p&gt; &lt;p class="docText"&gt;Of the original members of the small team of programmers  assembled in Aspen, James Gosling will be remembered as the father of Java.  Gosling first made a name for himself in the early 80s as the author of Gosling  Emacs, the first version of the popular Emacs editor that was written in C and  ran under Unix. Gosling Emacs became popular but was soon eclipsed by a free  version, GNU Emacs, written by Emacs's original designer. By that time, Gosling  had moved on to design Sun's NeWS, which briefly contended with the X Window  System for control of the Unix GUI desktop&lt;a name="IDX-CHP-1-0066"&gt;&lt;/a&gt; in 1987.  Although some people would argue that NeWS was superior to X, NeWS lost because  Sun kept it proprietary and didn't publish source code while the primary  developers of X formed the X Consortium and took the opposite approach.&lt;/p&gt; &lt;p class="docText"&gt;Designing NeWS taught Gosling the power of integrating an  expressive language with a network-aware windowing GUI. It also taught Sun that  the Internet programming community will ultimately refuse to accept proprietary  standards, no matter how good they may be. The seeds of Java's licensing scheme  and open (if not quite "open source") code were sown by NeWS's failure. Gosling  brought what he had learned to Bill Joy's nascent Aspen project. In 1992, work  on the project led to the founding of the Sun subsidiary, FirstPerson, Inc. Its  mission was to lead Sun into the world of consumer electronics.&lt;/p&gt; &lt;p class="docText"&gt;The FirstPerson team worked on developing software for  information appliances, such as cellular phones and personal digital assistants  (PDAs)&lt;a name="IDX-CHP-1-0067"&gt;&lt;/a&gt;. The goal was to enable the transfer of  information and real-time applications over cheap infrared and packet-based  networks. Memory and bandwidth limitations dictated small, efficient code. The  nature of the applications also demanded they be safe and robust. Gosling and  his teammates began programming in C++, but they soon found themselves  confounded by a language that was too complex, unwieldy, and insecure for the  task. They decided to start from scratch, and Gosling began working on something  he dubbed "C++ minus minus."&lt;/p&gt; &lt;p class="docText"&gt;With the foundering of the Apple Newton, it became apparent  that the PDA's ship had not yet come in, so Sun shifted FirstPerson's efforts to  interactive TV (ITV)&lt;a name="IDX-CHP-1-0068"&gt;&lt;/a&gt;. The programming language of  choice for ITV set-top boxes was to be the near ancestor of Java, a language  called Oak. Even with its elegance and ability to provide safe interactivity,  Oak could not salvage the lost cause of ITV at that time. Customers didn't want  it, and Sun soon abandoned the concept.&lt;/p&gt; &lt;p class="docText"&gt;At that time, Joy and Gosling got together to decide on a new  strategy for their innovative language. It was 1993, and the explosion of  interest in the Web presented a new opportunity. Oak was small, safe,  architecture-independent, and object-oriented. As it happens, these are also  some of the requirements for a universal, Internet-savvy programming language.  Sun quickly changed focus, and, with a little retooling, Oak became Java.&lt;/p&gt;&lt;a name="learnjava3-CHP-1-SECT-1.2"&gt;&lt;/a&gt; &lt;h4 class="docSection2Title"&gt;Growing Up&lt;/h4&gt;&lt;a name="IDX-CHP-1-0069"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0070"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0071"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0072"&gt;&lt;/a&gt; &lt;p class="docText"&gt;It would not be overdoing it to say that Java caught on like  wildfire. Even before its first official release when Java was still a  nonproduct, nearly every major industry player had jumped on the Java bandwagon.  Java licensees included Microsoft, Intel, IBM, and virtually all major hardware  and software vendors. That's not to say that everything was easy. Even with all  this support, Java took a lot of knocks and had some growing pains during its  first few years.&lt;/p&gt; &lt;p class="docText"&gt;A series of breech of contract and antitrust lawsuits between  Sun and Microsoft over the distribution of Java and its use in Internet Explorer  has hampered its deployment on the world's most common desktop operating  systemWindows. Microsoft's involvement with Java also become one focus of a  larger federal lawsuit over serious anticompetitive practices at the company,  with court testimony revealing concerted efforts by the software giant to  undermine Java&lt;a name="IDX-CHP-1-0073"&gt;&lt;/a&gt; by introducing incompatibilities in  its version of the language. Meanwhile, Microsoft introduced its own Java-like  language called C# (C-sharp) as part of its .NET initiative and dropped Java  from inclusion in the latest versions of Windows.&lt;/p&gt; &lt;p class="docText"&gt;But Java continues to spread on both high- and low-end  platforms. As we begin looking at the Java architecture&lt;a name="IDX-CHP-1-0074"&gt;&lt;/a&gt;, you'll see that much of what is exciting about Java  comes from the self-contained, virtual machine environment in which Java  applications run. Java has been carefully designed so that this supporting  architecture can be implemented either in software, for existing computer  platforms, or in customized hardware, for new kinds of devices. Sun and other  industry giants are producing fast Java chips and microprocessors tailored to  run media-rich Java applications. Hardware implementations of Java are currently  used in smart cards&lt;a name="IDX-CHP-1-0075"&gt;&lt;/a&gt; and other embedded systems. Today  you can buy "wearable" devices, such as rings and dog tags, that have Java  interpreters&lt;a name="IDX-CHP-1-0076"&gt;&lt;/a&gt;&lt;a name="IDX-CHP-1-0077"&gt;&lt;/a&gt; embedded in  them. Software implementations of Java are available for all modern computer  platforms down to portable computing devices, such as the popular Palm PDA. Java  is also becoming standard equipment on many new cell phones.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/444986195517809571-709646330932784092?l=javadvipa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadvipa.blogspot.com/feeds/709646330932784092/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://javadvipa.blogspot.com/2009/01/enter-to-java.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/709646330932784092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/709646330932784092'/><link rel='alternate' type='text/html' href='http://javadvipa.blogspot.com/2009/01/enter-to-java.html' title='Enter to Java'/><author><name>Aisyah Runi</name><uri>http://www.blogger.com/profile/09754809777891988684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_iNFxbPL4FYE/R_dMDxJPHQI/AAAAAAAAAAM/L8A99OeHoPU/S220/runi001.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-444986195517809571.post-5716880861090367279</id><published>2008-12-23T22:33:00.000-08:00</published><updated>2008-12-23T22:42:12.411-08:00</updated><title type='text'>Simple MDB with Oracle Database JMS Provider</title><content type='html'>&lt;div style="text-align: justify;"&gt;Continuing in my JMS explorations of late I was asked about clustering MDB on top of a simple topic backended by AQ. My first problem was I could not find a quick and dirty example of an MDB (EJB 3.0) using a JMS topic, the recommended JMS resource adapter approach of OracleAS 10.1.3 and on top of AQ. A simple hello world was all I was after.&lt;br /&gt;&lt;br /&gt;Give me something very simple and I can go miles because the doc for JMS (&lt;a href="http://download-west.oracle.com/docs/cd/B25221_04/web.1013/b14427/jms.htm#i1085966"&gt;http://download-west.oracle.com/docs/cd/B25221_04/web.1013/b14427/jms.htm#i1085966&lt;/a&gt;) and MDB (&lt;a href="http://download-west.oracle.com/docs/cd/B25221_04/web.1013/b14428/mdb30cfg.htm#BCGFGDAI"&gt;http://download-west.oracle.com/docs/cd/B25221_04/web.1013/b14428/mdb30cfg.htm#BCGFGDAI&lt;/a&gt;) explains all the advanced stuff and this OTN how-to (&lt;a href="http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-connect-to-oemsjmsd/doc/how-to-connect-to-oemsjmsd.html"&gt;http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-connect-to-oemsjmsd/doc/how-to-connect-to-oemsjmsd.html&lt;/a&gt;) gives a pretty rich example with a lot of detail on what the idiosyncracies are with setup.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;However, despite this being easy, I also wanted quick set up using the tools provided by Oracle that combined setting up the resource adapter, configuring a topic and writing an MDB to process messages into one sequence of steps rather than 3 different tasks. This entry is devoted to getting going fast with such a sample - cobbled together from other similar examples, a bit of new stuff and a bit of begging and pleading from various people who built it all - thanks to Demed Lher (JMS PM), Debu Panda (EJB PM) and the ASControl 10.1.3 folks who made this possible.&lt;br /&gt;&lt;br /&gt;Here goes:&lt;br /&gt;&lt;br /&gt;1. Create a JMS user on your database and grant them AQ rights. I am using XE and you can tell I have a tough password policy:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;sqlplus sys/welcome1@xe as sysdba&lt;br /&gt;&lt;br /&gt;grant connect, resource, aq_administrator_role to jmsuser identified by jmsuser;&lt;br /&gt;grant execute on sys.dbms_aqadm to jmsuser;&lt;br /&gt;grant execute on sys.dbms_aq to jmsuser;&lt;br /&gt;grant execute on sys.dbms_aqin to jmsuser;&lt;br /&gt;grant execute on sys.dbms_aqjms to jmsuser;&lt;br /&gt;exec dbms_aqadm.grant_system_privilege('ENQUEUE_ANY','jmsuser');&lt;br /&gt;exec dbms_aqadm.grant_system_privilege('DEQUEUE_ANY','jmsuser');&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;2. Create a AQ topic - in this case JMSDEMO_TOPIC:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;sqlplus jmsuser/jmsuser@xe&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;exec dbms_aqadm.create_queue_table(queue_table=&gt;'JMSDEMO_QUEUE_TABLE', queue_payload_type=&gt;'sys.aq$_jms_text_message',multiple_consumers=&gt;true);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;exec dbms_aqadm.create_queue(queue_name=&gt;'JMSDEMO_TOPIC', queue_table=&gt;'JMSDEMO_QUEUE_TABLE');&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;exec dbms_aqadm.start_queue(queue_name=&gt;'JMSDEMO_TOPIC');&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;commit;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;span style="font-size: 100%;"&gt;&lt;span style="font-family: georgia;"&gt;3. Create a data-source in OracleAS to point to the database user JMSUSER. I used Application Server Control to do this here by creating a connection pool called oemsdbPool and a data source called oemsdbDS:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/oemsds1.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.1.1.5/bmi/photos1.blogger.com/blogger2/3046/4153/320/oemsds1.png" alt="" border="0" /&gt;&lt;/a&gt;Which could also be put directly into your data-sources.xml using this snippet:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;&lt;managed-data-source name="oemsdbPool" name="jndi/oemsdbDS" name="oemsdbDS"&gt;&lt;br /&gt;&lt;connection-pool name="oemsdbPool"&gt;&lt;br /&gt;&lt;connection-factory class="oracle.jdbc.pool.OracleDataSource" user="jmsuser" password="jmsuser" url="jdbc:oracle:thin:@//127.0.0.1:1521/xe"&gt;&lt;br /&gt;&lt;/connection-pool&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: justify;"&gt;4. In order to use the resource provider approach for my MDB, I need to configure up the OEMS Database provider. Unlike 10.1.3.0 where this was a manual and configuration process, it is a nicely automated procedure in OracleAS 10.1.3.1 (I am using the Developer Preview).&lt;br /&gt;&lt;br /&gt;The following 3 screen shots show how trivial the Application Server Control team have made this.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;a. In the administration tab, click on the OEMS database persistence configuration&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/oemsdb1.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.1.1.3/bmi/photos1.blogger.com/blogger2/3046/4153/320/oemsdb1.png" alt="" border="0" /&gt;&lt;/a&gt;b. Click on the deploy button to deploy it&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/oemsdb2.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.1.1.4/bmi/photos1.blogger.com/blogger2/3046/4153/320/oemsdb2.png" alt="" border="0" /&gt;&lt;/a&gt;c. Name the resource adapter/provider and hook it up to the data source created previously. When you click on finish, you will be asked to restart the default application. Mine never came back so I ended up using opmnctl to do a full OC4J instance re-start ... I believe this is a bug in the developer preview that was fixed after its August release.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_ZzeakfnWdl4/RcpvqNY0jAI/AAAAAAAAABs/eQvhnhIaWl8/s1600-h/simpleOems.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.1.1.3/bmi/bp0.blogger.com/_ZzeakfnWdl4/RcpvqNY0jAI/AAAAAAAAABs/eQvhnhIaWl8/s320/simpleOems.gif" alt="" id="BLOGGER_PHOTO_ID_5028954704851536898" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;You can then see and do further configuration of the adapter on the adapters page. From a lot of doc to about a 4 click operation, I have to say the ASControls folks who I have the luck to know reasonably well, did a great simplification job of a complex area!&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;5. Now for my application clients using the OEMS Database provider, I need to surface my topic with some logical names. This I found this confusing though correctly documented but again ASControl made short work of exactly the things I needed to do:&lt;br /&gt;&lt;br /&gt;a. Make sure an appropriate connection factory is available by going to the connection factory tab of my newly created resource adapter (picture below), name it (I gave it the adapter name - simpleOemsRA/MyTCF) and give it a private connection pool for simplicity.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/oemsdb4.0.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.1.1.4/bmi/photos1.blogger.com/blogger2/3046/4153/320/oemsdb4.0.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;b. Name my administered topic object (&lt;span id="objTable"&gt;oracle.j2ee.ra.jms.generic.AdminObjectTopicImpl from the drop down list box&lt;/span&gt;) to provide a JNDI mapping to the physical database topic JMSDEMO_TOPIC and finally hook it up to the resource provider created during deployment.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;This has two parts so here are they are in detail:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;b1. Unlike the OracleAS JMS screen you will see that you do *not* have to provide the JNDI location and JNDI name for the Topic. You just give a JNDI location. You can provide a JNDI name but you would have to manually edit the underlying oc4j-connectors.xml. What this is "encouraging" is the use of autowrapping of the destinations. So enter your JNDI name - I chose &lt;span class="x2"&gt;simpleOemsRA/AutoWrap because this JNDI name will be the "automatic" wrapper for all my topics. See later for some details on this.&lt;/span&gt;&lt;br /&gt;&lt;span class="x2"&gt;&lt;/span&gt;&lt;br /&gt;b2. Second the screen asks for the resource provider name and defaults it to ojmsrp when you should be using the resource provider name you used when deploying the resource adapter - in our case simpleOemsRP - both b1 and b2 are shown in the screen sequence below.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/oemsdb5.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.1.1.2/bmi/photos1.blogger.com/blogger2/3046/4153/320/oemsdb5.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/autowrap1.0.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.1.1.5/bmi/photos1.blogger.com/blogger2/3046/4153/320/autowrap1.0.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;To get a sense of some comfort that things are working at this stage, if you go back to the Administer OEMS tab of the Application Server Control you should be able to see the physical AQ JMSDEMO_TOPIC in the list of available topics that are hooked up to the environment like below with a JNDI URL of something like java:comp/resource/simpleOemsRP/Topics/JMSDEMO_TOPIC:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/oemsdb8.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.1.1.5/bmi/photos1.blogger.com/blogger2/3046/4153/320/oemsdb8.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span class="x2"&gt;What's up here? I can see that from my configuration of my resource provider having a database connection we created earlier it automatically discovered my topic. That's cool! But what is also interesting is the resolution of the physical JNDI name - &lt;/span&gt;&lt;span id="destinations"&gt;java:comp/&lt;wbr&gt;resource/&lt;wbr&gt;simpleOemsRP/&lt;wbr&gt;Topics/&lt;wbr&gt;JMSDEMO_TOPIC&lt;/span&gt;&lt;span class="x2"&gt; - where did that /Topics/ come from?&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="x2"&gt;It turns out that is part of how OEMS Database provider queues and topics are surfaced through the resource provider&lt;/span&gt;&lt;span class="x2"&gt; - the prefix /Topics/ and /Queues/ are prefixed on the database queue/topic name. As such, taking an example, a database topic named JMSDEMO_TOPIC will have the physical suffix of Topics/JMSDEMO_TOPIC. Likewise with queues, a database queue named JMSDEMO_QUEUE will have a physical suffix of Queues/JMSDEMO_QUEUE. This is doc'd more formally just under the table this URL points at:&lt;/span&gt;&lt;br /&gt;&lt;span class="x2"&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="x2"&gt;&lt;br /&gt;&lt;a href="http://download-east.oracle.com/docs/cd/B25221_04/web.1013/b14427/jms.htm#sthref295"&gt;http://download-east.oracle.com/docs/cd/B25221_04/web.1013/b14427/jms.htm#sthref295&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: justify;"&gt;The end result when working with MDBs and clients, the JNDI location you will use for this example is going to have the logical name of (using my example): &lt;span class="x2"&gt;simpleOemsRA/Autowrap/Topics&lt;/span&gt;/JMSDEMO_TOPIC which in turn will resolve to the physical name &lt;span class="x2"&gt;java:comp/resource/simpleOemsRP/Topics/JMSDEMO_TOPIC. &lt;/span&gt;Check out my MDB at the end of this blog where I provide this setting in the destination name. If you want to manually wrap this in order to obfusticate the JMSDEMO_TOPIC name you can as well but this is not avialable from the ASControl screen.&lt;br /&gt;&lt;br /&gt;5. With that, everything - at least the minimal - is done and it is possible to write an MDB. Again following the lazy man's approach I will use EJB 3.0 so I can do it all in as little configuration as possible. Mucking around my MDB pretty much wires up to the configuration done above and does a simple printout of the message off the queue. It looks like the following code at the end of this&lt;span style="font-weight: bold;"&gt; [1] &lt;/span&gt;blog - code liberally stolen from Debu Panda's EJB 3.0 MDB samples at &lt;a href="http://otn.oracle.com/ejb3"&gt;http://otn.oracle.com/ejb3&lt;/a&gt;.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;6. As I was doing this in JDeveloper, I simply packaged this guy up in an ear and then used the admin_client deployment tool to deploy it as follows:&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;SET JAVA_HOME=d:\jdk150&lt;br /&gt;SET PATH=d:\jdk150\bin&lt;br /&gt;SET ORACLE_HOME=d:\soasuite&lt;br /&gt;java -jar %ORACLE_HOME%\j2ee\home\admin_client.jar deployer:oc4j:opmn://127.0.0.1:6003/home oc4jadmin welcome1 -deploy -file D:\mywork\oemsMDB\deploy\myMDB.ear -deploymentName myMDB&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;7. Then of course we need a client to throw messages on the queue. The easiest way is to write a simple Java client. Again in the spirit of begging and borrowing code, I have taken a sample from the JMS product manager, Demed LHer and slimmed it down to the bare essentials so it just does that one thing in&lt;span style="font-weight: bold;"&gt; [2]&lt;/span&gt;.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;To run that client you simply have to compile it with the right classpath:&lt;br /&gt;&lt;br /&gt;set AS_HOME=D:\soasuite&lt;br /&gt;set DB_HOME=D:\oraclexe\app\oracle\product\10.2.0\server&lt;br /&gt;set JAVA_HOME=D:\jdk150 CLASSPATH=.;%DB_HOME%/RDBMS/jlib/aqapi13.jar;%DB_HOME%/RDBMS/jlib/jmscommon.jar;%DB_HOME%/RDBMS/jlib/xdb.jar;%DB_HOME%/lib/xmlparserv2.jar;%DB_HOME%/jdbc/lib/ojdbc14.jar;%DB_HOME%/jlib/orai18n.jar;%DB_HOME%/jlib/jndi.jar;%J2EE_HOME%/lib/jta.jar&lt;br /&gt;javac -classpath %CLASSPATH% Send.java&lt;br /&gt;java Send "JMSDEMO_TOPIC"&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;And there you go. If you look in your ORACLE_HOME\opmn\logs you should see the MDB sucking the above message off the topic and spitting out the results using its System.out.println.&lt;br /&gt;&lt;br /&gt;I can't say it was trivial, but broken down to its simplest form, hopefully it is a building block that can be generalized for others!&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;[1] My MDB:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;package demo.mdb;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;import java.util.Date;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;import javax.ejb.MessageDriven;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;import oracle.j2ee.ejb.MessageDrivenDeployment;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;import javax.ejb.ActivationConfigProperty;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;import javax.jms.Message;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;import javax.jms.MessageListener;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;import javax.jms.Message;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;@MessageDriven(&lt;br /&gt;activationConfig = {&lt;br /&gt;@ActivationConfigProperty(&lt;br /&gt;propertyName="ConnectionFactoryJndiName", propertyValue="simpleOemsRA/MyTCF"),&lt;br /&gt;@ActivationConfigProperty(&lt;br /&gt;propertyName="DestinationName", propertyValue="simpleOemsRA/AutoWrap/Topics/JMSDEMO_TOPIC"),&lt;br /&gt;@ActivationConfigProperty(&lt;br /&gt;propertyName="DestinationType", propertyValue="javax.jms.Topic"),&lt;br /&gt;@ActivationConfigProperty(&lt;br /&gt;propertyName="SubscriptionDurability", propertyValue="Durable"),&lt;br /&gt;@ActivationConfigProperty(&lt;br /&gt;propertyName="SubscriptionName", propertyValue="MySubscription"),&lt;br /&gt;@ActivationConfigProperty(&lt;br /&gt;propertyName="messageSelector", propertyValue="RECIPIENT = 'MDB'")&lt;br /&gt;})&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;// associate MDB with the database JMS resource adapter&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;@MessageDrivenDeployment(resourceAdapter = "simpleOemsRA")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;* This is a very simple example of a Message-Driven Bean configured to listen&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;* on an AQ Topic using the generic resource adapter for JMS. It listens to the&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;* configured Topic and gets notified via an invocation of it's&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;* onMessage() method when a message has been posted to the Topic. This&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;* bean simply prints out the contents of the message.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;public class MessageTopicProcessor {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;public void onMessage(Message message) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;System.out.println("onMessage() - " + message);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;try {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;String subject = message.getStringProperty("subject");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;String inmessage = message.getStringProperty("message");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;System.out.println("Message received\n\tDate: "&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;+ new java.util.Date() + "\n\tSubject: " + subject&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;+ "\n\tMessage: " + inmessage + "\n");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;catch (Throwable ex) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;ex.printStackTrace();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-size: 100%;"&gt;&lt;span style="font-family: georgia;"&gt;[2] Sample Database JMS Client&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;*&lt;br /&gt;* If using Oracle XE, the following jar files are required in your classpath to&lt;br /&gt;* run this example:&lt;br /&gt;*&lt;br /&gt;* .;%DB_HOME%/RDBMS/jlib/aqapi13.jar;%DB_HOME%/RDBMS/jlib/jmscommon.jar;&lt;br /&gt;* %DB_HOME%/RDBMS/jlib/xdb.jar;%DB_HOME%/lib/xmlparserv2.jar;&lt;br /&gt;* %DB_HOME%/jdbc/lib/ojdbc14.jar;%DB_HOME%/jlib/orai18n.jar;%DB_HOME%/jlib/jndi.jar;%J2EE_HOME%/lib/jta.jar&lt;br /&gt;*&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;// Java infrastructure packages&lt;br /&gt;import java.lang.*;&lt;br /&gt;import java.util.Properties;&lt;br /&gt;import java.io.FileInputStream;&lt;br /&gt;import java.io.IOException;&lt;br /&gt;import java.io.InputStream;&lt;br /&gt;&lt;br /&gt;// JMS packages&lt;br /&gt;import oracle.AQ.*;&lt;br /&gt;import oracle.jms.*;&lt;br /&gt;import javax.jms.*;&lt;br /&gt;&lt;br /&gt;/* -------------------------------------------------------&lt;br /&gt;* Send&lt;br /&gt;* ------------------------------------------------------- */&lt;br /&gt;public class Send&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;// Here's the XML payload to put in a text message&lt;br /&gt;private final static String SOME_XML =&lt;br /&gt;"\n" +&lt;br /&gt;"&lt;ns:name ns="\"&gt;\n" +&lt;br /&gt;" &lt;data&gt;\n" +&lt;br /&gt;" &lt;fname&gt;John&lt;/fname&gt;\n" +&lt;br /&gt;" &lt;middle&gt;W&lt;/middle&gt;\n" +&lt;br /&gt;" &lt;lname&gt;Doe&lt;/lname&gt;\n" +&lt;br /&gt;" &lt;/data&gt;\n"+&lt;br /&gt;"&lt;/ns:name&gt;";&lt;br /&gt;&lt;br /&gt;public static void main (String args [])&lt;br /&gt;throws java.sql.SQLException, ClassNotFoundException, JMSException&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;TopicConnectionFactory tcfact =null;&lt;br /&gt;TopicConnection tconn =null;&lt;br /&gt;Topic topic =null;&lt;br /&gt;TopicSession tsess =null;&lt;br /&gt;TopicPublisher publisher = null;&lt;br /&gt;TopicSubscriber subscriber = null;&lt;br /&gt;TextMessage txtmsg, dtxtmsg;&lt;br /&gt;String destName = "JMSDEMO_TOPIC";&lt;br /&gt;String dbHost = "127.0.0.1";&lt;br /&gt;String dbPort = "1521";&lt;br /&gt;String dbSid = "XE";&lt;br /&gt;String dbDriver = "thin";&lt;br /&gt;String dbUser = "jmsuser";&lt;br /&gt;String dbPassword = "jmsuser";&lt;br /&gt;&lt;br /&gt;System.out.println("\n-------------------------------------------------------------");&lt;br /&gt;System.out.println("OEMS.155 - simple JMS Send / JMS 1.02 / Database AQ / no JNDI");&lt;br /&gt;System.out.println("-------------------------------------------------------------");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;// get destination to Send on from command-line&lt;br /&gt;try {&lt;br /&gt;destName = args[0];&lt;br /&gt;} catch (Exception e) {&lt;br /&gt;System.out.println("** please provide a destination to send on [" + args.length + "]");&lt;br /&gt;usage();&lt;br /&gt;System.exit(0);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;try {&lt;br /&gt;// get connection factory - we are not going through JNDI here&lt;br /&gt;tcfact = AQjmsFactory.getTopicConnectionFactory(dbHost, dbSid, Integer.parseInt(dbPort), dbDriver);&lt;br /&gt;System.out.println("Connection factory = " + tcfact.toString());&lt;br /&gt;// create connection&lt;br /&gt;tconn = tcfact.createTopicConnection(dbUser,dbPassword);&lt;br /&gt;System.out.println("Created connection = " + tconn.toString());&lt;br /&gt;// create session&lt;br /&gt;tsess = tconn.createTopicSession(true, Session.CLIENT_ACKNOWLEDGE);&lt;br /&gt;System.out.println("Created session = " + tsess.toString());&lt;br /&gt;// start connection&lt;br /&gt;tconn.start() ;&lt;br /&gt;System.out.println("started connection");&lt;br /&gt;// get topic&lt;br /&gt;topic = ((AQjmsSession)tsess).getTopic(dbUser,destName) ;&lt;br /&gt;System.out.println("Got topic = " + topic.toString());&lt;br /&gt;System.out.println("started session = " + tsess.toString());&lt;br /&gt;&lt;br /&gt;} catch (JMSException e) {&lt;br /&gt;System.err.println("** JMS: failed starting session. Do not forget to run the SQL scripts to create necessary tables in RDBMS.\n");&lt;br /&gt;e.printStackTrace();&lt;br /&gt;System.exit(-1);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;try {&lt;br /&gt;publisher = tsess.createPublisher(topic);&lt;br /&gt;txtmsg = tsess.createTextMessage(SOME_XML) ;&lt;br /&gt;System.out.println("\ndestination: " + topic + "\nmessage :\n\n" + SOME_XML);&lt;br /&gt;publisher.publish(topic, txtmsg) ;&lt;br /&gt;tsess.commit() ;&lt;br /&gt;System.out.println("\nmessage was sent with ID="+txtmsg.getJMSMessageID());&lt;br /&gt;} catch (Exception e) {&lt;br /&gt;System.err.println("** Problem publishing messaging:\n");&lt;br /&gt;e.printStackTrace();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Cleaning up before exiting&lt;br /&gt;try {&lt;br /&gt;//((AQjmsDestination)topic).stop(tsess, true, true, false);&lt;br /&gt;tsess.close() ;&lt;br /&gt;tconn.close() ;&lt;br /&gt;} catch (Exception e) {&lt;br /&gt;System.err.println("** Problem terminating session and connection:\n");&lt;br /&gt;e.printStackTrace();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/*-----------------------------------------------------------------------&lt;br /&gt;* usage&lt;br /&gt;* prints program usage&lt;br /&gt;*----------------------------------------------------------------------*/&lt;br /&gt;&lt;br /&gt;private static void usage() {&lt;br /&gt;System.err.println("\nUsage: Send &lt;topic&gt;");&lt;br /&gt;System.err.println("Ex : Send JMSDEMO_TOPIC");&lt;br /&gt;}&lt;br /&gt;}&lt;/topic&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/444986195517809571-5716880861090367279?l=javadvipa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadvipa.blogspot.com/feeds/5716880861090367279/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://javadvipa.blogspot.com/2008/12/simple-mdb-with-oracle-database-jms.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/5716880861090367279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/5716880861090367279'/><link rel='alternate' type='text/html' href='http://javadvipa.blogspot.com/2008/12/simple-mdb-with-oracle-database-jms.html' title='Simple MDB with Oracle Database JMS Provider'/><author><name>Aisyah Runi</name><uri>http://www.blogger.com/profile/09754809777891988684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_iNFxbPL4FYE/R_dMDxJPHQI/AAAAAAAAAAM/L8A99OeHoPU/S220/runi001.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-444986195517809571.post-6228840043707463050</id><published>2008-12-23T22:17:00.001-08:00</published><updated>2008-12-23T22:21:37.435-08:00</updated><title type='text'>Using HTTPS with Web Services</title><content type='html'>&lt;a name="7552948976703954402"&gt;&lt;/a&gt;&lt;h3 class="post-title"&gt;Using HTTPS with Web Services&lt;/h3&gt;&lt;p&gt;&lt;span style="text-decoration: underline;"&gt;Prerequisites:&lt;/span&gt;&lt;br /&gt;In this article you have&lt;br /&gt;&lt;/p&gt;&lt;ul style="text-align: justify;"&gt;&lt;li&gt;already a Web Service deployed in OC4J that is running on the default HTTP port. The WSDL and Endpoint are available. In my sample the non secure Web Service endpoint is: &lt;span class="code"&gt;http://127.0.0.1:8888/math-service/MathServiceSoapHttpPort&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h4&gt;Add HTTPS to OC4J&lt;/h4&gt;&lt;h4&gt;Creating of the Keystore&lt;/h4&gt;&lt;div style="text-align: justify;"&gt;The first thing to do to secure OC4J would be to create a new keystore that will contain the different certificates. The easiest way to do that for a Java developer is to use &lt;a href="http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/keytool.html" target=""&gt;SUN's keytool&lt;/a&gt;:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;blockquote&gt;&lt;span class="code"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;keytool -genkey -alias oracle-server -dname "CN=Tug Grall, OU=Blog O=Grall And Co L=Redwood Shores, S=CA, C=US" -keyalg RSA -keypass welcome -storepass welcome -keystore server.keystore&lt;/span&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;You can copy the &lt;span class="code"&gt;server.keystore&lt;/span&gt; into the &lt;span class="code"&gt;$ORACLE_HOME/j2ee/home/config&lt;/span&gt; to simplify the next steps.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;h4&gt;Configuring OC4J&lt;/h4&gt;&lt;div style="text-align: justify;"&gt;OC4J stand alone is using the notion of Web-Site to expose HTTP resources (Web Applications). The default-web-site is define is he $ORACLE_HOME/j2ee/home/config/default-web-site.xml. To secure an OC4J you can follow the steps describe in the &lt;a href="http://download.oracle.com/docs/cd/B25221_04/web.1013/b14429/configssl.htm" target=""&gt;OC4J Security guide&lt;/a&gt; that I have summarized in the following section.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;What we want to achieve for the purpose of the demonstration is to have OC4J using HTTP and HTTPS, on port 8888 and 4443 for example.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;1. Copy &lt;span class="code"&gt;default-web-site.xml&lt;/span&gt; to  &lt;span class="code"&gt;secure-web-site.xml&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2. Edit the secure-web-site.xml:&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;    2.1. Change the &lt;span class="code"&gt;web-site&lt;/span&gt; tag by changing the port to &lt;span class="code"&gt;4443&lt;/span&gt; and adding the element &lt;span class="code"&gt;secure="true"&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;    2.1. Add the &lt;span class="code"&gt;ssl-config&lt;/span&gt; element and point this to the new created keystore.&lt;br /&gt;    The file looks like:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span class="code"&gt;&lt;web-site xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;&lt;br /&gt;&lt;span class="code"&gt;            xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/web-site-10_0.xsd"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;" class="code"&gt;            port="4443"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;" class="code"&gt;            secure="true"&lt;/span&gt;&lt;br /&gt;&lt;span class="code"&gt;            display-name="OC4J 10g (10.1.3) Default Web Site"&lt;/span&gt;&lt;br /&gt;&lt;span class="code"&gt;            schema-major-version="10"&lt;/span&gt;&lt;br /&gt;&lt;span class="code"&gt;            schema-minor-version="0" &gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="code"&gt;        ...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;" class="code"&gt;        &lt;ssl-config keystore="server.keystore" password="welcome"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="code"&gt;        ...&lt;/span&gt;&lt;br /&gt;&lt;span class="code"&gt;&lt;/web-site&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;3. Import the new Web site in your OC4J instance by editing the &lt;span class="code"&gt;$ORACLE_HOME/j2ee/home/server.xml&lt;/span&gt; file. You need to add or replace the web-site tag. In my case I want to add the secure web site to my instance so the configuration looks like:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;    &lt;span class="code"&gt;...    &lt;/span&gt;&lt;br /&gt;&lt;span class="code"&gt;    &lt;web-site default="true" path="./default-web-site.xml"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="code" style="font-weight: bold;"&gt;    &lt;web-site path="./secure-web-site.xml"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="code"&gt;    ...&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Since we have copied the file from the default-web-site, all applications are available using HTTP and HTTPS&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;h4&gt;Start OC4J and test the HTTPS port&lt;/h4&gt;&lt;div style="text-align: justify;"&gt;Start OC4J using the standard Java command or shell script, I am adding the Java Network debug flag that would help you to see what is happening at the SSL level.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;    &lt;span class="code"&gt;java -Djavax.net.debug=ssl -jar oc4j.jar&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;You should be able to access the service WSDL using the HTTPS port for example in my case:&lt;br /&gt;&lt;ul class="code"&gt;&lt;li&gt;    https://127.0.0.1:4443/math-service/MathServiceSoapHttpPort?WSDL&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;Consuming the Service using HTTPS&lt;/h3&gt;&lt;h4&gt;Generate and configure a client Keystore&lt;/h4&gt;&lt;div style="text-align: justify;"&gt;Event if this is possible to use the same keystore for the server and the client, I will guide you in the steps to create a client certificate and import the certificate from the existing -server- one. Here the command &lt;span style="text-decoration: underline;"&gt;to create&lt;/span&gt; a new keystore:&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;blockquote&gt;&lt;span class="code"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;keytool -genkey -alias oracle-client -dname "CN=John Doe, OU=Blog O=MyDummyClient, S=CA, C=US" -keyalg RSA -keypass welcomeClient -storepass welcomeClient -keystore client.keystore&lt;/span&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br /&gt;The next step is to &lt;span style="text-decoration: underline;"&gt;export the certificate&lt;/span&gt; from the server keystore to be able to import it in the client:&lt;br /&gt;&lt;blockquote&gt;&lt;span class="code"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;keytool -keystore &lt;span style="font-weight: bold;"&gt;server.keystore&lt;/span&gt; -&lt;span style="font-weight: bold;"&gt;export&lt;/span&gt; -alias &lt;span style="font-weight: bold;"&gt;oracle-serve&lt;/span&gt;r -file server.cer&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;You can now &lt;span style="text-decoration: underline;"&gt;import the cerificate&lt;/span&gt; in the client keystore:&lt;br /&gt;&lt;blockquote&gt;&lt;span class="code"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;keytool -keystore &lt;span style="font-weight: bold;"&gt;client.keystore&lt;/span&gt; -&lt;span style="font-weight: bold;"&gt;import&lt;/span&gt; -file server.cer&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;h3&gt;Generate the proxy&lt;br /&gt;&lt;/h3&gt;&lt;div style="text-align: justify;"&gt;You have now the client certificate so you can use the Oracle Web Service Assembler to generate the proxy. The only specific thing you have to do is to specify which key store to use when running the tool. The command to use when generating the proxy is:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span class="code"&gt;java &lt;span style="font-weight: bold;"&gt;-Djavax.net.ssl.trustStore=/Users/tgrall/ssl/client.keystore&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;     -Djavax.net.ssl.keyStore=/Users/tgrall/ssl/client.keystore &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;     -Djavax.net.ssl.trustStorePassword=welcomeClient &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;     -Djavax.net.ssl.keyStorePassword=welcomeClient &lt;/span&gt;&lt;br /&gt;     -jar $ORACLE_HOME/webservices/lib/wsa.jar&lt;br /&gt;     -genProxy&lt;br /&gt;     -wsdl &lt;span style="font-weight: bold;"&gt;https&lt;/span&gt;://127.0.0.1:&lt;span style="font-weight: bold;"&gt;4443&lt;/span&gt;/math-service/MathServiceSoapHttpPort?WSDL&lt;/span&gt;&lt;/blockquote&gt;&lt;h3&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;Calling the Service using secure endpoint&lt;/h3&gt;Configure the Java Environment to use the client store is made using the following System properties:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;javax.net.ssl.trustStore&lt;/li&gt;&lt;li&gt;javax.net.ssl.keyStore&lt;/li&gt;&lt;li&gt;javax.net.ssl.trustStorePassword&lt;/li&gt;&lt;li&gt;javax.net.ssl.keyStorePassword&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: left;"&gt;      &lt;br /&gt;&lt;div style="text-align: justify;"&gt;This could be done using different approach, property file, -D command line parameter or programmatically. To simply the example I am using the programmatic approach, the following code is part of the main method of the Client class:&lt;br /&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;span class="code"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="code"&gt;  ...&lt;/span&gt;&lt;br /&gt;&lt;span class="code"&gt;   System.setProperty("javax.net.ssl.trustStore", "/Users/tgrall/ssl/client.keystore");&lt;/span&gt;&lt;br /&gt;&lt;span class="code"&gt;   System.setProperty("javax.net.ssl.keyStore", "/Users/tgrall/ssl/client.keystore");&lt;/span&gt;&lt;br /&gt;&lt;span class="code"&gt;   System.setProperty("javax.net.ssl.trustStorePassword", "welcomeClient");&lt;/span&gt;&lt;br /&gt;&lt;span class="code"&gt;   System.setProperty("javax.net.ssl.keyStorePassword", "welcomeClient");&lt;br /&gt;   ...&lt;br /&gt;   // Adding Debug information&lt;br /&gt;   &lt;/span&gt;&lt;span class="code"&gt;System.setProperty("&lt;/span&gt;&lt;span class="code"&gt;javax.net.debug&lt;/span&gt;&lt;span class="code"&gt;", "ssl");&lt;/span&gt;&lt;br /&gt;&lt;span class="code"&gt; &lt;/span&gt;&lt;span class="code"&gt;  ...&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;It is possible to change the Endpoint dynamically in the Proxy using the &lt;span class="code"&gt;setEndpoint&lt;/span&gt; method.&lt;br /&gt;&lt;blockquote&gt;&lt;span class="code"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;  ...&lt;br /&gt;  democlient.proxy.MathServiceSoapHttpPortClient myPort = new democlient.proxy.MathServiceSoapHttpPortClient();&lt;br /&gt;  ...&lt;br /&gt;&lt;/span&gt;&lt;span class="code"&gt;  String ep = "&lt;span style="font-weight: bold;"&gt;https&lt;/span&gt;://127.0.0.1:&lt;span style="font-weight: bold;"&gt;4443&lt;/span&gt;/math-service/MathServiceSoapHttpPort";&lt;br /&gt;  myPort.setEndpoint(ep);&lt;br /&gt;&lt;/span&gt;&lt;span class="code"&gt;  System.out.println("Result of the operation is "+ myPort.add(2,2));&lt;br /&gt;  ...&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;You should now be able to run the client and call the service using HTTPS. This would look like:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;img style="width: 626px; height: 439px;" alt="" src="http://1.1.1.5/bmi/static.flickr.com/86/268580831_c24ec07d89_o.png" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;by: Tugdual Grall&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/444986195517809571-6228840043707463050?l=javadvipa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadvipa.blogspot.com/feeds/6228840043707463050/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://javadvipa.blogspot.com/2008/12/using-https-with-web-services.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/6228840043707463050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/6228840043707463050'/><link rel='alternate' type='text/html' href='http://javadvipa.blogspot.com/2008/12/using-https-with-web-services.html' title='Using HTTPS with Web Services'/><author><name>Aisyah Runi</name><uri>http://www.blogger.com/profile/09754809777891988684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_iNFxbPL4FYE/R_dMDxJPHQI/AAAAAAAAAAM/L8A99OeHoPU/S220/runi001.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-444986195517809571.post-1971983276525199142</id><published>2008-12-18T14:29:00.000-08:00</published><updated>2008-12-18T14:30:43.188-08:00</updated><title type='text'>Enhanced Graphics, Text, and Imaging</title><content type='html'>Early versions of the AWT provided a simple rendering package suitable for rendering&lt;br /&gt;common HTML pages, but not full-featured enough for complex graphics,&lt;br /&gt;text, or imaging. As a simplified rendering package, the early AWT embodied&lt;br /&gt;specific cases of more general rendering concepts. The Java 2D™ API provides a&lt;br /&gt;more flexible, full-featured rendering package by expanding the AWT to support&lt;br /&gt;more general graphics and rendering operations.&lt;br /&gt;For example, through the Graphics class you can draw rectangles, ovals, and&lt;br /&gt;polygons. Graphics2D enhances the concept of geometric rendering by providing&lt;br /&gt;a mechanism for rendering virtually any geometric shape. Similarly, with the Java&lt;br /&gt;2D API you can draw styled lines of any width and fill geometric shapes with virtually&lt;br /&gt;any texture.&lt;br /&gt;Geometric shapes are provided through implementations of the Shape interface,&lt;br /&gt;for example Rectangle2D and Ellipse2D. Curves and arcs are also specific&lt;br /&gt;implementations of Shape.&lt;br /&gt;Fill and pen styles are provided through implementations of the Paint and&lt;br /&gt;Stroke interfaces, for example BasicStroke, GradientPaint, TexturePaint,&lt;br /&gt;and Color.&lt;br /&gt;AffineTransform defines linear transformations of 2D coordinates, including&lt;br /&gt;scale, translate, rotate, and shear.&lt;br /&gt;Clip regions are defined by the same implementations of the Shape interface that&lt;br /&gt;are used to define general clipping regions, for example Rectangle2D and GeneralPath.&lt;br /&gt;Color composition is provided by implementations of the Composite interface,&lt;br /&gt;for example AlphaComposite.&lt;br /&gt;A Font is defined by collections of Glyphs, which are in turn defined by individual&lt;br /&gt;Shapes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/444986195517809571-1971983276525199142?l=javadvipa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadvipa.blogspot.com/feeds/1971983276525199142/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://javadvipa.blogspot.com/2008/12/enhanced-graphics-text-and-imaging.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/1971983276525199142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/1971983276525199142'/><link rel='alternate' type='text/html' href='http://javadvipa.blogspot.com/2008/12/enhanced-graphics-text-and-imaging.html' title='Enhanced Graphics, Text, and Imaging'/><author><name>Aisyah Runi</name><uri>http://www.blogger.com/profile/09754809777891988684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_iNFxbPL4FYE/R_dMDxJPHQI/AAAAAAAAAAM/L8A99OeHoPU/S220/runi001.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-444986195517809571.post-450259076082248899</id><published>2008-12-14T01:05:00.000-08:00</published><updated>2008-12-14T01:06:03.714-08:00</updated><title type='text'>JAVA PROGRAMMING EXAMPLE BASIC CONCEPTS</title><content type='html'>This program illustrates the basic concepts of java programming. ARRAY is use to list months, weekdays and days; SCANNER is use to input the year; the COUNTER starts New Years Day on the correct weekday; NESTED for LOOP is&lt;br /&gt;&lt;a title="View JAVA PROGRAMMING EXAMPLE BASIC CONCEPTS document on Scribd" href="http://www.scribd.com/doc/8948462/JAVA-PROGRAMMING-EXAMPLE-BASIC-CONCEPTS" style="margin: 12px auto 6px auto; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; display: block; text-decoration: underline;"&gt;JAVA PROGRAMMING EXAMPLE BASIC CONCEPTS&lt;/a&gt; &lt;object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" id="doc_399184035200991" name="doc_399184035200991" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" align="middle" height="500" width="100%"&gt;  &lt;param name="movie" value="http://documents.scribd.com/ScribdViewer.swf?document_id=8948462&amp;access_key=key-293413ftbmaf7ewl0pho&amp;page=1&amp;version=1&amp;viewMode="&gt;   &lt;param name="quality" value="high"&gt;   &lt;param name="play" value="true"&gt;  &lt;param name="loop" value="true"&gt;   &lt;param name="scale" value="showall"&gt;  &lt;param name="wmode" value="opaque"&gt;   &lt;param name="devicefont" value="false"&gt;  &lt;param name="bgcolor" value="#ffffff"&gt;   &lt;param name="menu" value="true"&gt;  &lt;param name="allowFullScreen" value="true"&gt;   &lt;param name="allowScriptAccess" value="always"&gt;   &lt;param name="salign" value=""&gt;      &lt;embed src="http://documents.scribd.com/ScribdViewer.swf?document_id=8948462&amp;access_key=key-293413ftbmaf7ewl0pho&amp;page=1&amp;version=1&amp;viewMode=" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" play="true" loop="true" scale="showall" wmode="opaque" devicefont="false" bgcolor="#ffffff" name="doc_399184035200991_object" menu="true" allowfullscreen="true" allowscriptaccess="always" salign="" type="application/x-shockwave-flash" align="middle"  height="500" width="100%"&gt;&lt;/embed&gt; &lt;/object&gt; &lt;div style="margin: 6px auto 3px auto; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; display: block;"&gt; &lt;a href="http://www.scribd.com/upload" style="text-decoration: underline;"&gt;Publish at Scribd&lt;/a&gt; or &lt;a href="http://www.scribd.com/browse" style="text-decoration: underline;"&gt;explore&lt;/a&gt; others:    &lt;a href="http://viewer.scribd.com/browse?c=44-cheat-sheets" style="text-decoration: underline;"&gt;Cheat Sheets&lt;/a&gt;      &lt;a href="http://viewer.scribd.com/browse?c=43-reference" style="text-decoration: underline;"&gt;Reference&lt;/a&gt;       &lt;a href="http://viewer.scribd.com/tag/java" style="text-decoration: underline;"&gt;java&lt;/a&gt;      &lt;a href="http://viewer.scribd.com/tag/break" style="text-decoration: underline;"&gt;break&lt;/a&gt;    &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/444986195517809571-450259076082248899?l=javadvipa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadvipa.blogspot.com/feeds/450259076082248899/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://javadvipa.blogspot.com/2008/12/java-programming-example-basic-concepts.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/450259076082248899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/444986195517809571/posts/default/450259076082248899'/><link rel='alternate' type='text/html' href='http://javadvipa.blogspot.com/2008/12/java-programming-example-basic-concepts.html' title='JAVA PROGRAMMING EXAMPLE BASIC CONCEPTS'/><author><name>Aisyah Runi</name><uri>http://www.blogger.com/profile/09754809777891988684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp3.blogger.com/_iNFxbPL4FYE/R_dMDxJPHQI/AAAAAAAAAAM/L8A99OeHoPU/S220/runi001.jpg'/></author><thr:total>0</thr:total></entry></feed>
