Rajkamal Pillai

Ranch Hand
+ Follow
since Mar 02, 2005
Rajkamal likes ...
IntelliJ IDE Spring Java
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rajkamal Pillai


After a bit of research on how various data structures (Map and Set in particular) are implemented I end up slightly confused.

1. In Java, Map is implemented as a Set.
2. Maps store contents as Entry <Key, Value> objects.

So a Map equates to a Set<Entry<Object, Object>...> with the key object implementing Comparable interface.

1. In Java, Set is implemented as a Map.
2. Each Set element is stored as the key with an Object (placeholder) as the value. Map<Entry<Object,  Object>...>

This appears to be cyclic. I would like some clarity on this.

Rajkamal Pillai.
7 months ago
Hello Peter,

The methods get stored in a Method table.
There would not be optimizations involved with the very first compilation so I would think that the complied code would be loaded in its entirety.
With more number of executions (I have read about an arbitrary number 10K) the JIT would kick in for optimizations and the optimized code would be loaded in the method area.

2 years ago

I had started my journey in Java world using Complete Reference as the starting book. Then I felt I should get more information about the inner details and used Professional Java server programming as my Bible.

These two books have helped me immensely with getting the basics of the language. Now I have around 18 years of experience working with a wide range of applicationframeworks and technologies in the Java space.

All said and done I realize now that no particular book or article is good or bad. There's always some bit of useful information to be gathered from each. The journey has been extremely exciting so long. And it goes on ......

Keep going,
2 years ago

class A is visible in package "first" alone as it has default access.
Which means it (class A) would not even be visiblefor class B in package "second".

Doesn't that answer the question?
2 years ago


I propose creation of a forum for discussion on the latest entry in the world of computing ie, Microservices.

I agree Microservices,  is technology neutral but if knowledge available out here could be put to good use, I say, why not?
What is you opinion?

3 years ago

I am an experienced Java professional but new to Groovy.
Trying to execute C:\groovy-2.4.0\bin\groovyConsole and face the below error:

Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
The syntax of the command is incorrect.

The JAVA/GROOVY related settings are -
JAVA_OPTS=-Xms1024M -Xmx2048M -XX:PermSize=256M -XX:MaxPermSize=512M

How can I get around this error?

5 years ago

You would need to use JMF for this.
Google should give you all relevant info.
6 years ago

Thank you Henry Wong, Fred rosenberger and Campbell Ritchie.

Henry: I had missed that the Objects are still accessible via the Collection.

I have read that micro performance management unless working with specific requirements is almost always an overkill and could lead to bad coding styles and less readable code with no real noticeable improvement in performance. Hence the comment.

Thanks again for your replies!

7 years ago

I would think that in the second case "myObject" would be a candidate for GC when the loop exits.
Whereas in the first it would remain 'alive' until after the outer block completes execution.

I would be of the opinion that unless there are really LARGE number of these objects created inside the loop iterations the later versions of Java should be able to optimize the memory/performance effects.

Would anyone like to elaborate, in case I am mistaken?
7 years ago

I am using DNS Java for verifying the domain part in an email address entered by the user.
This was working correctly but now we connect to the internet via a proxy.
Eever since the introduction of the proxy DNS Java fails to connect to the DNS server.
Is there a way to configure DNS Java to use the proxy to connect to the internet?
Logs below:

Class.forName() tries to load the class mentioned as argument.
This ClassNotFoundException states that 'java.sql.driver' could not be loaded, as in the class could not be located from the CLASSPATH.

Looks like a Thread synchronization issue?

What happens when you synchronize access to this variable?
7 years ago

Your query is not clear.

The title says "Automatic Form Submission - without using JavaScript" but the description says "submit automatically without any user intervention".

If you do not want the FORM submission to be user initiated how bout using a JavaScript timer?
Now if you mean you do not want to use any client script then I cant think of any way for doing that (if at all its possible).

7 years ago
I think I was trying to climb up the wrong tree :-D

Using Intellij IDEA I created a new Debug Configuration:
Run/Debug Configurations - + icon - WebLogic Instance
Application Server - I browse to the root folder for the remote WebLogic installation: "Directory '*********/******' is not BEA home"

I am not able to find a BEA_HOME environmental variable on the remote box. Which folder is the root for a WebLogic installation?

7 years ago