What..When...? I always wonder, why Java is not intelligent enough to fix problems in the code when it knows something goes wrong; rather than throwing just exceptions? May be Gosling wants it that way, saving donuts for him! Now read on... A.java 1  public class A{ 2 3  public static void main(String []s) throws classNotFoundException{ 4    B obj = new B(); 5 &...
9

View comments

By default, Spring Boot applications will listen on port 8080. Elastic Beanstalk assumes that the application will listen on port 5000. There are two ways to fix this discrepancy: change the port Elastic Beanstalk is configured to use, or change the port the Spring Boot application listens on.

Before Java 8, it was virtually impossible to change an interface once published. Any change e.g. addition of a new method would have broken all clients.

The default emulator is annoyingly slow. Read on this post to boot your emulator in 15s 1) You HAVE to have an Intel CPU, anything else (AMD) will NOT work.

Original @Author BalusC. Re-post from Stackoverflow. Creational patterns Abstract factory (recognizeable by creational methods returning the factory itself which in turn can be used to create another abstract/interface type) javax.xml.parsers.DocumentBuilderFactory#newInstance() javax.xml.transform.

NoSQL databases have been getting lot of attention over the last few years for their performance, scalability, schema flexibility and analytics capabilities.

1

I came across this framework  called  'lambdaj' when I was looking for ways to manipulate a collection without writing loops. lambdaj is a library that makes easier to address this issue by allowing to manipulate collections in a pseudo-functional and statically typed way.

It's been a week with some serious learning stuff. I stumbled upon this technique called 'Collaborative Filtering' and found it very interesting. Though the concept is been there for ages, time and again there has been new implementations around it.

1

I just kept getting the below exception while trying to run a simple map reduce program on windows(XP). java.io.IOException: Failed to set permissions of path: \tmp\dinesh\mapred\staging\dinesh-1143336710\.staging to 0700 Nothing worked till I saw a simple workaround for the problem.

Say, we are trying to implement a new behavior 'whistle', to a group of unrelated things. For e.g.) Assume we are trying to add whistling behavior to parrots, humans, aliens, cookers and a steam engine.

This week was all about Jquery...! Though I've been using it in bits and pieces, did not get a chance to do something so exhaustive in jquery till now.  So here are few things, which I learned this week..I'll keep updating this post every now and then..

SOAP SOAP is a simple XML-based protocol to let applications exchange information over HTTP. Specification for exchanging structured information in the implementation of Web Services in computer networks.

I was working on a personal project for creating an online post-it like application using Jquery, JSF and google Apps.. The idea was to have a text area where user can type and notes will be saved automatically through ajax calls..

Let me talk about Concurrent.Thread, a library that allows JavaScript to use multiple threads, since this greatly eases the difficulty associated with asynchronous communication in the AJAX development mentioned above.

4

The ProblemWeb applications often require a large amount of data to be stored to maintain the session state of the clients, spanning multiple requests.

The basic idea was that the current Java Runtime Environment is simply too big, and most programs require only a small subset of the functionality. From Ethan Nicholas's Blog Building a minimal JREThe first thing I have to do is establish that this project is feasible.

The Java revolution, which started more than a decade ago, gains even more momentum with today's announcement of JavaFX, a new Java innovation targeted at the billions of consumer devices and computers powered by Java technology.

The aim of this open source project is to provide a simple standalone application for composing music and generating MIDI files. The underlying functionality provided by this application comes from its reliance on the JFugue API.

1

In Object Oriented Programming, inheritance is a commonly used mechanism to model the relationship between two types. However, modelling such relationship without realizing the impact on the overall application may result in unexpected problems.

1

Java HotSpot VM OptionsStandard options recognized by the Java HotSpot VM are described on the Java Application Launcher reference pages for Windows, Solaris and Linux.

1

Quench your thirst for knowledge.At Google our mission is to organize the world's information and make it useful and accessible to our users. But any piece of information's usefulness derives, to a depressing degree, from the cognitive ability of the user who's using it.

By convention, the first part of the package name is the Internet domain name of the class creator, reversed. And thatz why we see many packages starting with com and org...!Since the Internet domain names are unigue you should follow this agreement.

I'am sure that in my program I create 100 new threads and when I use isAlive method it shows often less than 100 threads... I have not killed even one of them!Good, short and clear explanation I found in Java tutorial on SUN's site:"The API for the Thread class includes a method called isAlive.

I have written lines of code with mathematical operators...but i always wonder about shiFters (Shift Operators...Bingo!)...Why do we need it...? watz the use...? Read on...1.

Which4J is a simple utility app that helps you determine where classes are being loaded from. This can be especially helpful in debugging classpath and classloader problems.

2

Are these self explanatory to someone whoz new to computers?if no read on...We understand what 404 means: Page Not Found. But the average internet user has no idea what 404 means or what to do about it. To them, it's yet another unintelligible error message from the computer.

Prior to Java 5, isAlive() was commonly used to test a threads state. If isAlive() returned false the thread was either new or terminated but there was simply no way to differentiate between the two.

JPC is a pure Java emulation of an x86 PC with fully virtual peripherals. It runs anywhere you have a JVM, whether x86, RISC, mobile phone, set-top box, possibly even your refrigerator! All this, with the bulletproof security and stability of Java technology.

Faster Deep Copies of Java Objects The java.lang.Object root superclass defines a clone() method that will, assuming the subclass implements the java.lang.Cloneable interface, return a copy of the object.

1

Generally when we tend to use either Arryalist/ Vector based on the basic requirement if that has to be synchronized or not. Other than that we minimally consider the responsiveness of the algorithmic implementation for each at the requirements.

1

Here is how you can connect to the database: try { //Load the DB2 JDBC Type 2 Driver with DriverManager Class.forName("COM.ibm.db2.jdbc.app.DB2Driver"); }catch (ClassNotFoundException e) { e.printStackTrace(); }Getting connection:connection = DriverManager.getConnection(url, user, pass);the prepare

2

DWR is a Java open source library which allows you to write Ajax web sites.It allows code in a browser to use Java functions running on a web server just as if it was in the browser.DWR consists of two main parts:A Java Servlet running on the server that processes requests and sends responses back t

Know more about Generics....You have a good article that explains generics on a case to case basis Generics FAQ ...

Couple of differences between Tomcat and Oracle Application Server (OC4J)...There could be more...org.w3c.dom.Document:getElementsByTagName() Tomcat (Xerces): doc.getElementsByTagName("SOAP-ENV:Envelope") is valid. It treats the namespace as if it were just part of the tag name.

Consider the snippet,Vector <String>strObject = new Vector <String>(); strObject.add("STR1");strObject.add("STR2"); Now adding an int or any other type of object into this collection would throw a compile time error, which sounds good...!//strObject.add(12) -- Compilation error On the other hand,Vec

Popular Posts
Popular Posts
Contributors
Posts
Labels
Total Pageviews
Total Pageviews
5 3 2 0 0
Loading
Dynamic Views theme. Powered by Blogger. Report Abuse.