Friday, April 6, 2012
Introduction to Java Concurrent Programming
The last few years, multicore processors have become less expensive. Most desktop computers and laptops are using multicore chips and developers are programming more and more with multiple concurrent threads. A downside is that the bug reports related to threading are also increasing every day; this shows that multicore programming is not the easiest thing to do. In Java, concurrency bugs are one of the most painful problems and in many occasions they are highly unpredictable. One of the biggest issues regarding Java concurrent programming is the mind-set of the programmers that doesn't match the concurrency features offered in Java. Programmers need to start thinking about concurrency and parallelism in the foundation of their programs. The Java language provides low level tools for concurrency such as condition waits, synchronization, message passing and resource sharing. The problem is that these tools need to be implemented at application level consistently. The conclusion? It can already be hard to write correct programs, but writing correct concurrent programs is even harder. The right mind-set is needed. The reason behind the high difficulty level is that there are simply more levels where things can go wrong with Java concurrent programming. The reason developers still choose to use concurrency on their programs is because threads are an inevitable feature of the Java language and the easiest way to use the multicore power we see almost everywhere these days. When looking are the future, the only conclusion that can be made is that concurrency programming will become increasingly important with the rising number of cores.
For more information regarding Java concurrent programming, please visit www.ateji.com.
Article Source: http://EzineArticles.com/6401289
Monday, February 6, 2012
Understand The Java Classpath
This article is about a small simple collection of batch files which can be used to test the behavior of the javac compiler and java class launcher for different classpath scenarios. The system is called ClasspathTester. Download instructions are included at the end of this article.
When you are in the middle of trying to debug a java build it is a bad time to try to boil everything down to a simple test case, so basically the intent of my test collection is to do this for you ahead of time. If you can't find the precise test you need, it is easy to modify the existing tests or create a new test to suit your needs.
How ClasspathTester Works
As previously stated, I did everything with batch files, because I wanted the tests to be as uncomplicated, portable (within the Windows environment), and simple as possible. There are a few helper batch files to do things like create formatted output and build a directory structure, but otherwise nearly all of the work is done in the RunAllTests.bat file.
What RunAllTests.bat consists of is tests and sub-tests. If you haven't downloaded it yet, I suggest you download it and take a look. Each test consists of some sort of a setup. Setup normally involves the following:
1. Test environment is cleaned up of old directories, files, and classpath.
2. New directory structure is created, new files are created and placed in correct directories, and the classpath is set if necessary.
After setup, the tests are run. This consists of running either the javac.exe compiler, the java.exe launcher, or both. That's all there is to it.
A Simple Example
To understand what ClasspathTester, does, open the RunAllTests.bat file in your text editor and look at TEST1. Each test is a collection of sub-tests which are loosely grouped around some kind of a central testing theme, and TEST1 is one of the simplest.
So what happens in Test1? First it calls banner.bat to add a header to the results file. Then it creates the Hello.java and MyLibClass.java files, by copying them from their corresponding avaj files (the reason for using avaj files is discussed later in this article). Now everything is set up to run some subtests.
TEST1A is very simple. According to its description, " The Hello.java file is located in the current directory, and the Hello.class file will be written to the current directory and run from the current directory". As you can imagine, TEST1A operates flawlessly.
TEST1B and TEST1C are designed to show different ways that using java.exe to launch the Hello.class file can fail. In TEST1B the classpath is been set to an empty directory. In TEST1C the file Hello.class is erased. Interestingly, these two tests fail in exactly the same way.
Note that all tests results are stored in the results.log file.
How the Tests are Kept Safe
By "safe" I mean safe to your computer, safe to your other data. Since the tests involve batch files that are creating and destroying files and directories, care must be taken to avoid accidentally destroying or writing over other unrelated files. This is accomplished in the cleanup.bat file by avoiding the use of statements like "erase /S *.*" or "rmdir /S *". Instead, all erasures are kept fairly specific.
In fact, the cleanup.bat file consists of the following statements:
set classpath=
rmdir /S /Q aq
rmdir /S /Q EmptyDirectory
erase Hello*.java
erase Hello*.class
erase MyLibClass*.java
erase MyLibClass*.class
This ensures that there will be no tragic accidental loss of unrelated data.
Why Use .avaj Suffix Files
Part of the operation of ClasspathTester involves completely wiping the base directory clean of all .java files, .class files, and subdirectories; therefore, all the suffix of all permanent java files is mangled to avaj. For any test, the appropriate avaj files are copied to java files. The available files are:
Hello.avaj
Hello1.avaj
Hello2.avaj
MyLibClass.avaj
MyLibClass1.avaj
MyLibClass2.avaj
Download Information
You can find and download a zipped copy of the ClasspathTester can be on my Article Support Page
Summary
ClasspathTester is simple, portable, unobtrusive, customizable and solves an annoying development problem, the need to quickly test special classpath situations with javac.exe, java.exe, or both.
Monday, January 23, 2012
Difference Between Java and WordPress
Java
Java is an enterprise Language, what it means it is used to build enterprise applications, what do we mean by that?
· A variety of clients can interact with applications like browsers, smart tablets, B2B applications, .NET and other language apps.
· High Security to support the standards.
· Highly Scalable to support the growing traffic.
· Performance - Begin compile time performance is high.
· E.g applications are Gaming, ECommerce websites, Billing, Retail, CRM and tons of others

Java can be used to create blogging CMS like WordPress. There are CMS's like alfresco, Plone, JRoller whodo to attempt to that, but none has been able so popular as WordPress.
WordPress
Very specialized CMS/blogging engine build on top of PHP.
· It is very easy to learn software, compare it to learning MS Word.
· You don't need to know PHP/programming to be WordPress website developer.
· It has a themes concept, which allows a developer to configure website pages with easy.
· Supports thousands of plugins, almost easy to find any kind of functionality a website needs.
· Installs on Apache Server with PHP engine.
· Many hosting sites support 1 click install.
· Uses MySQL as the backend engine.
As you see, WordPress and Java cannot be compared as one is a language where another is a software built on PHP language.

Had WordPress been written in Java
As a Java Developer, I do wish WordPress was built on Java, it would have given
1. Java applications a web flair, we would have to see all together new set of applications /widgets/ plugins.
2. Designers would have not been scared of the language at all.
3. Applications could have used the WordPress database, which has a very simple schema.
WordPress And Java Together
Resin Quercus
Resin is a Java Application server, but with a twist, it has a Quercus engine which allow PHP applications to installed as Java applications.
What does this mean, if a WordPress can be installed on Resin will run as a Java application and also take advantage of libraries like Spring, Hibernate,SOA.
Also, will definitely perform way better as it will be compiled only once and not be interpreted with every request like it does now
To have this integration working has its own challenges but good news is there is a way.
Summary
While WordPress has it own niche, creating CMS websites with blog functionality, it is the DeFacto Platform.
But when it comes to creating highly scalable enterprise Applications Java is the DeFacto Platform.
Makarand Bhatamrekar is a enterprise Java RIA Career Coach. He has been coaching since 2007 on Java technologies to help trainees achieve their java career goals. http://careerInJava.com is a dedicated the effort to give all the resources needed to succeed.
To be informed of the latest update, do subscribe the Newsletter at http://www.careerInJava.com
WordPress is the easiest CMS out here, which allows to create your website with no knowledge of PHP. Makarand was able to develop coaching website on WordPress with no prior knowledge of the same, hence this post comparing the two.
Article Source: http://EzineArticles.com/6811651
utvecklare intranet
Wednesday, July 20, 2011
Why Java RDBMS?
The importance of Java in the software scenario has led to another major trend. Software vendors are either rewriting their existing products in Java, or are creating new products exclusively or partially in Java. This has led many analysts to question the need to port already existing applications to Java. While the prospects of porting small or medium sized software to Java may not attract concern, it assumes significance when we consider porting existing databases that could be handling millions of sensitive blocks of information. Similarly, experts also have to decide between deploying reputed databases, and new databases that have been entirely developed in Java, in their organizations. Analysts have to answer many pertinent questions like: What are the advantages of a Java RDBMS that would compel my company to switch to it? Would it be cost effective to change to an RDBMS that has all the advantages of Java? Would the costs involved in porting millions of existing records justify the perceived performance and scalability features of the Java RDBMS? How secure would be the new RDBMS? What is the learning curve that has to be tackled by the staff who may be assigned to this database? In fact, there are a host of questions that a concerned technical head may ask himself before taking that all important decision to switch to a Java RDBMS. Let's try finding out some of the answers.
What are the advantages of a Java RDBMS?
OK, so we all know that Java is set to capture, or has already captured a sizeable chunk of the software market. However, how does that justify the use of a Java Database? After all, is not Java theoretically capable of integrating with any database? What advantages can be afforded by a Java RDBMS?
Well the answer is quite simple. Java RDBMS has, or supports, the much sought after qualities of Java, which is the most important reason to switch to it. Some of the Java RDBMS already available in the markets answers the immediate concerns of the Technical Lead in the most persuasive manner. For example, Daffodil DB, an RDBMS written in Java, considers the following as its core strengths:
Multiple Platform Portability
Small Size
Java Stored Procedures
Transparent to End User
Zero Administration Efforts
Some of these features are worth a second look.
One RDBMS, multiple avatars
Java RDBMS not only offers the advantages of Java, but also introduces new concepts that can revolutionize database programming techniques. For a start, the much famed portability of Java is the core strength of a Java RDBMS. Now, you don't have to buy different RDBMS for different platforms within the same enterprise. Other than the cost factors, the biggest advantage such an arrangement can give is that in-house code need not be redesigned for different platforms. By standardizing the database that is used, programs working across platforms can interact transparently and effectively. Project managers would vouch that portability, synchronization and customization effort for software running on different platforms are some of the most time consuming and tension filled activities in the office. Now all these activities can be easily implemented with the Java RDBMS in its rightful place.
Store and use those procedures with abandon
Security buffs within the enterprise would always throw a tantrum when dealing with stored procedures. Traditionally, the implementation of stored procedures had been the responsibility of the specific application vendor, and most of them could crash the whole database due to internal errors, rendering precious time and money waste. Java stored procedures with its inbuilt security features is the new fad of security administrators who are finding it powerful, fast, and very safe. Java does not implement Pointers, and so is a safe bet for developers to write secure code and procedures. In addition, with the JVM overlooking all the activities (the sandbox approach), there is no scope for external access that could jeopardize mission critical enterprise applications.
Transparent to End User
Java technologies have always been in the forefront to give us seamless transparent applications with inbuilt security features being given the utmost importance. In a Java RDBMS, database components can be embedded in applications, and they can perform complex tasks without user intervention. In addition, the user need not know the complexities of the database because the embedded database components will do all the work for him without him even knowing about it. This allows the user to concentrate on his tasks rather than configuring databases, which is an auxiliary requirement. In addition, other routine activities like starting the server and repetitive configuring of the database can also be avoided. Perhaps the biggest advantage that Java RDBMS offers is that the user need not weigh the pros and cons about choosing a database vendor. This is because Java RDBMS being extremely portable can seamlessly integrate with almost all platforms, and the embedded components will handle all the chores of integrating with different vendor software. Java RDBMS can also be seamlessly operated across multiple platforms without the need to configure the database for each and every operating system.
Zero Administration Efforts
Java RDBMS comes in with zero administration efforts, which means that once installed and configured, your clients need not change their settings to suit new changes that you make in your database. Java RDBMS also does away with, or considerably reduces, the role of the Database Administrator because of its self-managed features, and its extremely scalable mode of operation.
If you have not thought of it yet, it is a good time to think about Java RDBMS. The time is not far away when the databases industry will be greatly influenced by the power and functionality of Java RDBMS.
Article Source: http://EzineArticles.com/3103
Diamond Engagement Ring : Womens & Mens Diamond Watches & Diamond Jewelry Sale up to 82% Off: Diamond watches, diamonds, womens and mens diamond jewelry at NYCs #1 Diamond Jewelry Store.
Buy Digital Cameras Online : Digital Cameras have simplified the process of taking high quality pictures. Today, practically all cameras are digital which allow maximum photo taking efficiency. These cameras have built-in computers and all of them record images electronically.
Swarovski 5810 : original Swarovski Crystallized TM Elements Made in Austria, swarovski 2028 xilion rose, rhinestones, swaroski, svaroski, strass, swarovski strass, swarovski stones
weight loss supplements : Want no more diets. Looking for fast weight loss pills or diet pills? We are the most trusted diet pill review site. Visit #1 ranked diet pill now!
K2 Trophies and Awards : Trophies & Trophy: Looking for lowest price trophies, awards, medals or plaques? Visit K2 Trophies and Awards. We have the right trophy, plaque or award for any sport or occasion. FAST FREE shipping on orders over $200. High quality but cheap price.
Self managed super Bankstown : We have experienced Small Business Company Accountants across Liverpool, Moorebank, Ingleburn, Campbelltown, Bankstown, Wetherill and Fairfield having in depth understanding of each industry’s areas of risk and opportunity.
Travertine floor tiles Travertine Marble Kitchen Tiles - Marble Kitchen Tiles and Travertine Kitchen Tiles at great prices from StoneSuperStore. Visit today or call for expert advice on Kitchen Tiles. masterbatchesREPIN is #1 Masterbatch Industry among various Masterbatch Manufacturers & supplier, providing services worldwide. Get Clariant Masterbatch and more from REPIN. welding projects TIG, MIG, STICK, Plasma Cutting, Welding Advice, Welding Forum, Tips, Tricks, Learn How To Weld for Professionals and Enthusiasts penny stocks Peter Leeds and his Team Use Leeds Analysis to Uncover the Absolute Best Penny Stock Picks and Top Penny Stock Picks. Visit Penny Stocks Now Wohl Associates At Wohl Associates We purchase an individual machine or a complete a line or even a complete facility, including real estate. Life Insurance Quote Lifebroker provides free life insurance & income protection quotes that allow you to compare 20 different life insurance companies in once place. We are the broker of choice across the United Kingdom for all your personal life, critical illness, disablement and income protection needs. fence panelsFence Stores is one of the South’s largest manufacturers and suppliers of Fencing, Fencing Panel, Fence Panels, Industrial Fencing and Garden Buildings such as Summerhouses, Sheds and Cabins serving Devon, Somerset, Hampshire and Dorset. Melbourne accommodation deals Melbourne accommodation deals, news and updates from City Edge accommodation Apartment and Hotels. We offer the best accommodation deals in Melbourne. Debbie Dogrul Associatesleading no VA real estate team in Virginia. The best Northern VA realtors to aid you in your Northern Virginia house for sale or purchase. Letting AgentLetting agents are individuals who deal with rental property on a landlord’s behalf in exchange for fees. They can provide a whole range of services depending on your requirements. Unlike many Lettings Agents there are no hidden fees when dealing Greenaway Residential Letting Agents and we only get paid when our clients get paid. Personal injury ProtectionLeading Law Firm & Attorney Brad Sinclair Represents Personal Injury, Car Accident & Motorcycle Accident Victims in Melbourne, Palm Bay, Cocoa Beach, Titusville, Rockledge, Merritt Island, Cape Canaveral, Cocoa and Brevard County. commercial plumber Wet Basement Repair Meet Wet Basement Waterproofing Expert can resolve home issue like Leaky Basement and many more. Visit www.dxbasementwaterproofing.com for Wet Basement Repair. window coverings new york marine paint protectionTRIBOS, the leading international supplier of protective paint coatings for the automotive, marine and aviation market has now gained a strong foothold in the Southeast Asia. Whistler Mountain Transportation Whistler Mountain Transportation specializes in providing luxurious, chauffeured transportation to Whistler Blackcomb from either Vancouver or Seattle. junk removal in San DiegoLooking for water heater removal in San Diego? We are a full-service water heater removal and hauling services based in San Diego. Call Junkeez for a free estimate today! hotels in Stellenbosch - Find the best accommodation in Stellenbosch and hotels in Stellenbosch with Majeka Guest House. Chicago limo serviceAny Time Limo Chicago Provide Top Quality Limo & Limousine Services in Chicago and Suburban Area at Reasonable Rates. To Book Limousine in Chicago Call Us (773) 353-8024) Or Visit Us! San Diego Advertising San Diego solar power will benefit home-owners who consume more electricity than average users. They pay high income taxes and they can benefit a lot from tax credits. San Diego Solar PanelThe Restaurants in San Diego are famous for serving the world’s best beer. The bars offer a glamorous as well as erotic atmosphere to their customers. charter bus service in San FranciscoWe provide charter bus service in San Francisco at affordable prices with complete client satisfaction. homes for sale in Santa Ana Search Luxury Homes for Sale in Orange County through homesalesinorangecounty.com. Our listing Updated daily with latest Listing on homes/houses for sale in Orange County. Contact us today! Vancouver airport limo serviceisGet special deal on booking of vancouver airport ground transportation to whistler with details of all cheap Vancouver Airport Limo Service by prime time limo services. washer dryer house lightingLED world is an online electrical wholesaler in Australia which offers led flood lights and led strip light at affordable prices. restaurant in Cape Town Whistler limousine service Limousine is considered as the most luxurious transportation among all and it is like a dream come true for anyone getting a chance to travel in it. Whether it is a wedding occasion or graduation prom or any corporate meeting, people expect to enjoy a luxurious ride and arrive in style. Time and Gems
Monday, January 24, 2011
BASIC CONCEPTS OF JAVA
If really it wants to dominate Java, is not sufficient to know the code. You should begin to think as a programmer, and in this new edition of his guide of best-seller, Java Concepts, programming Cay Horstmann guru shows him how. It brought up to date to integrate Java 6, Concepts of Java, fifth edition is an introduction to the techniques of fundamental programming and the abilities of design that are crucial to learn to plan. Basing on its many years of experience as expert programmer and professor, Horstmann shows the most important elements of the data processing, troubleshooting and the design of the program. Thanks to the formula tested Horstmann, you will be able to complete this book with a solid base in the concepts of programming and troubleshooting and to arrive quickly to the velocity to write program efficient and successful. You Can find the Best Java Knowledge Concepts here exclusive on javaequation.blogspot.com
Characteristics of the fifth new edition: * The focus "gradual Objects" conducts you to step oriented to objects thinking to step, the use of classes, the application of simple methods, until coming to design its own programs oriented to objects. * A strong emphasis in the development based on tests invites to consider the results as is written the code of programming so that a better design, that can be utilized more you program * unique Focus goes beyond the syntax of the language to be concentrate on concepts of data processing and troubleshooting, that encourage to think like a solucionador of problems * New and learning teaching tools in WileyPLUS -
including a corrector of unique allocation that will permit you to put to test your problems of programming in line before submitting them to a degree * Useful "the tests in trail" he introduces the techniques and tools step by step, what guarantees a teacher before passing to the following one * The graphics are themes developed gradually along the text, conveniently noticeable in different sections by color * The cover of updating is completely compatible with Java 5 and includes a discussion of the last characteristics of Java 6.
computer courses london : Ethames graduate school is a leader in computer courses London. This school of computing has the world's best faculty and teaching material.
SEO In Miami- How to Increase Your Site's Traffic Offers CD Duplication and CD Replication to Save Your Data iDEA Media Services’ duplication department can duplicate one CD at a time, or one thousand CD's on demand, so that you can have your finished product in your hands in just a few days. corporate website SEO Company NY Day Trading How to Make a Free Website Rocket Web Design has launched a new design program, making the process of making a free website easier than ever. Currently, Rocket is launching a new program so that customers can share this custom web design system with their families and friends. TheHeadsetShop.com Bournemouth Digital Agency :- Web Design Bournemouth- Gazelle Design is the leading Digital & Design Agency providing the best Web design & website design, SEO Services, Graphic design services in Bournemouth, Dorset, Poole SEO Company :- SEO India Profit By Search™ #1 SEO Company India. Outsourcing Seo Services India Can Improve Your Bottom Line, As SEO Consultants in India are Cheap and can produce much better results when compared to their foreign Counterparts...!! Web Design India :- No matter what your web development and design needs, Profit By Outsourcing India can help. Learn more about our web design and development services. Recruitment Process Outsourcing :- RPO Services @ Profit By RPO- India's #1 Recruitment Process Outsourcing (RPO) Firm. Hire Dedicated Recruiters from Profit By RPO @ $1500/Month, Enquire Now Investment Casting India :- R.K. Engineers is an Investment Casting Company in India offering Precision, Lost Wax Investment Casting Manufacturing Services in India. SEO Company NJ :- 1SEO.com is a premium SEO Company providing effective SEO services in Philadelphia PA and NJ. Call 877-311-7361 today and get proven results for your company.
My Aim Language Java
They are structured in the shape of brief lessons, that cover all the aspects of the language in a basic-medium level. Itself they are not assumed know-how of other programming languages, although obviously to be familiarized with concepts relating to the programming as variable, algorithms, objects, etc. facilitates a lot of the task. Nevertheless, the reference has been avoided deliberately or the comparison with other languages, especially with C/C + + that so present is in many texts of Java.
The first part of these annotations covers all the aspects of the language (Classes, Interfaces, inheritance, control of flow, types of data, etc.). The second part, at present in elaboration, treats matters of the API of Java, grouping them for themes (Entrance/Exit, Threads, applets, etc.).
Sunday, July 4, 2010
Access Control
control. Recall that making a member of a class public makes it accessible from anywhere, including from other classes. On the other hand, a private member can
only be used in the class where it is defined.
In the opinion of many programmers, almost all member variables should be declared
private. This gives you complete control over what can be done with the
variable. Even if the variable itself is private, you can allow other classes to find out
what its value is by providing a public accessor method that returns the value of
the variable. For example, if your class contains a private member variable, title,
of type String, you can provide a method
public String getTitle() { return title; }
that returns the value of title. By convention, the name of an accessor method for
a variable is obtained by capitalizing the name of variable and adding “get” in front
of the name. So, for the variable title, we get an accessor method named “get” +
“Title”, or getTitle(). Because of this naming convention, accessor methods are
more often referred to as getter methods. A getter method provides “read access” to
a variable.
You might also want to allow “write access” to a private variable. That is, you
might want to make it possible for other classes to specify a new value for the variable.
This is done with a setter method. (If you don’t like simple, Anglo-Saxon
words, you can use the fancier term mutator method.) The name of a setter method
should consist of “set” followed by a capitalized copy of the variable’s name, and it
should have a parameter with the same type as the variable. A setter method for the
variable title could be written
public void setTitle( String newTitle ) { title = newTitle; }
It is actually very common to provide both a getter and a setter method for a
private member variable. Since this allows other classes both to see and to change
the value of the variable, you might wonder why not just make the variable public?
The reason is that getters and setters are not restricted to simply reading and writing
the variable’s value. In fact, they can take any action at all. For example, a getter
method might keep track of the number of times that the variable has been accessed:
public String getTitle() {
titleAccessCount++; / / Increment member v a r i a b l e t i t leAc ces sCount .
return title;
}
and a setter method might check that the value that is being assigned to the variable
is legal:
public void setTitle( String newTitle ) {
if ( newTitle == null ) / / Don ’ t al low n u l l s t r i n g s as t i t l e s !
title = " ( Unt i t led ) "; / / Use an appropr iate d e f a u l t value instead .
else
title = newTitle; }
Even if you can’t think of any extra chores to do in a getter or setter method, you
might change your mind in the future when you redesign and improve your class. If
you’ve used a getter and setter from the beginning, you can make the modification
to your class without affecting any of the classes that use your class. The private
member variable is not part of the public interface of your class; only the public
getter and setter methods are. If you haven’t used get and set from the beginning,
you’ll have to contact everyone who uses your class and tell them, “Sorry guys, you’ll
have to track down every use that you’ve made of this variable and change your code.”