Help coderanch get a
new server
by contributing to the fundraiser

Anuj Troy

Ranch Hand
+ Follow
since Apr 07, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Anuj Troy

hi

java has a tool jmap which is used to investigate various memory state of JVM. what i want to learn is how exactly this tool works? Can i get a source code for it?

i am assuming that implementation of jmap is dependent on the system it runs on. i am running a mac os X.

can someone guide me how can i learn this?Can someone point me to the right direction?

why i want to learn this? just curious ...

thanks in advance
15 years ago
no not JMX. maybe what i am looking for is how can i use JVM TI? i want to access the JVM (Java Virtual Machine) and just display its memory state. for that i need to be able to locate the JVM first and then i need some way to talk to jvm so that i can get how much heap is allocated to it, how much is being used and how much is free..
15 years ago
honestly i dont have much knowledge about how to access jvm and how to get the heap size and other details programatically , so have just searched google.

i understand i may not be asking the right questions...

i am looking for some direction here so that i can understand this concept of accessing jvm and get some information from the jvm (just like some profiler)
15 years ago
hi

i wish i had a board to express my thoughts but i will try to do the same with words..

imagine the div to be a rectangular box of 300px width. now you want to place two more smaller boxes inside (you used spans, but i would recommend divs). lets call the boxes as A and B. width of box A=B=150px.(this could vary according to your need)

inside box A you want to write FirstName and inside box B you want to write LastName. Put the first and last name in spans.

Divs are Block element that is they have a new line before them and after them by defualt. so if you put two divs together they will lie on top of each other. but if you change the display style to inline then they behave as inline element and will be next to each other.

What i would do is :



do let me know if it worked for you.
need to write a command line java program to list all the available jvm's and list out their allocated heap memory and used heap memory. can someone give me a sample code.
15 years ago
hii

i want to use ant to create a project in eclipse or netwever!! does anyone know how to do that?

thanks
anuj
17 years ago
hii can some one tell me where to find the question banks?

and from where can i get question papers online..

thanks
regards
anuj
hii

this is the code for the same

function moveToSelectedProjects()
{
domSwap(document.getElementById('projectList'), document.getElementById('selectedProjectList'));

}
function moveFromSelectedProjects()
{
domSwap(document.getElementById('selectedProjectList'), document.getElementById('projectList'));
}

// call the above two functions from your html page to move the item in the list

function domSwap(fromList, toList) {
// If nothing is selected then return
var selIndex = fromList.selectedIndex;
if(selIndex < 0) { return; }

// Prepare variables
var arrLookup = new Array(); // To quickly find the index of the text
var arrToList = new Array(); // To use JavaScripts builtin sort
var newToList = toList.cloneNode(false); // Only clone the parent

// Decrement to keep the changing index from affecting the moves
for(var i = fromList.length - 1; i >= 0; i--) {
arrLookup[fromList.options.item(i).text] = i;
if(fromList.options.item(i).selected) {
// Append to the toList unsorted initially
toList.appendChild(fromList.options.item(i));
}
}

}

18 years ago
hii Arulanand

thanks a lot. we are able to find the code for pick list and were able to implement what we wanted. actually we did not know its called pick list..



thanks a tonn
regards
anuj
18 years ago
We are moving selected list of items from one <html:select> to another when the user clicks on button. For eg:

We have list of items in one list box

Test1
Testt2
Test3

When the user selects Test1 and clicks on a button with label >, then Test1 should be shown in the second list box.For eg:

ListBox1 ListBox2
Testt2 Test1
Test3

Please let us know how to go about.
18 years ago
hii all

can someone tell me how does this integration of business rules with j2ee application works.

what is the atchitecture ? how the j2ee application reads and inteprets the business rules? how is the coding done for this

thanks a lot
anuj
19 years ago
hii

when i tried logging into javaranch.com i gave extra spaces after my name
and i was not able to log in.

i think the spaces before and after the login name should be ignored while doing the authentication

i hope my feedback was useful

thanks
regards
anuj
19 years ago
hii

i am trying to integrate apache 2.x with weblogic 8.1 .
i followed the directions given at :
http://e-docs.bea.com/wls/docs81/plugins/apache.html

but i am not able to integrate it.
Any pointers on this would be of great help.

Thanks
Ravi / anuj
19 years ago
hi pally

every method in an interface is abstract by default. just like every variable in interface is "public static final" whether you declare it or not.. every method has to be "public abstract ". you cannot have static or final methods in interface. you cannot have protected abstract method in interface

but in abstract class ... you can have a abstract method which can be protected, default or public.

i hope this answers your doubt
regards
anuj
Suppose we have the following:
class A {
void aMethod(){
...
}
}

class B extends A{
void aMethod(){
... //overriding aMethod from A
}
}

class C extends B{
void aMethod(){
... //overriding aMethod from B
}
}

from class C you can call class B's aMethod by using super.aMethod...
similarly you can call from class B you can call class A's aMethod using super.aMethod... but you cannot call(in this case) from class C , the aMethos of class A directly!!like super.super.aMethod!!WRONG!!

thus in case of overriding, you can call only to one level up.... directly by using super.<method name>