Vijayakumar Arya

Ranch Hand
+ Follow
since Jan 27, 2003
Merit badge: grant badges
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 Vijayakumar Arya

Hi David,
You have to make the RMI registry as an NT Service,
have a look at this place,
http://www.codeguru.com/java/articles/354.shtml
Also do a google with "RMI Registry as NT Service"
Hope this helps.
19 years ago
RMI
Hi,
Just have a look at this place in your Java documentation, it answers what you are looking for,
File:///<JAVADOCS_HOME>/docs/guide/rmi/codebase.html
Hope this helps
19 years ago
Hi,
I hope this is a classpath problem, the jar package is available in <JAVA_HOME>\jre\lib\rt.jar and please ensure that this is available in the class path.
Hope this helps
[ March 05, 2003: Message edited by: Vijayakumar Arya ]
19 years ago
Hi Renu,
Just the JRE is enough to run the Java applications. For Installers, have a look at this url
http://www.codework.com/installanywhere/product.html
Hope this helps
19 years ago
Hi,
Please compile your code with -g option so that you can know at which line of your code has thrown the exception, after doing this we have to trace the root cause of the exception.
Also use
Hi,
Creating a File object neither opens the file nor the contents are loaded into the memory. The GC will take care of the unreferenced object and will garbage collect them as and when required.
In case if you are shuting down the JVM, then at the time the JVM will release all the resources and will free the memory allocated for each resources. By resources I mean, the File opened, Socket connections, etc...
There is no method called close() in File class so that you can close an opened file. A file is not opened from a File object, rather an Input/ Output stream is associated with this file and using them we will be reading or writing data into the file.
Memory leak need not be worried in case of Java as, when JVM exits(normally) it releases all the memory allocated with in the process. You have to be careful in creating the objects and making the reference of unused instance variables to null, making the objects eligible for garbage collection. Any unreferenced objects will be garbage collected and the memory will be released. Referenced objects will not be finalised whether it is been used or not. So you have to make the unused reference variables to null.
Bipin, if you are coming from C/C++ background to Java then the point is that here in java you need not worry about malloc or free. The entire memory management is done by the JVM
Hope this helps.
[ February 27, 2003: Message edited by: Vijayakumar Arya ]
19 years ago
Hi bipin,
When opening a file, the OS will lock the file and will associate with the process that had opened the file for File IO. No other process can open the file unless the file is closed by the opened process(except in the case of sharing).
The entire file is not read and stored at the time of opening, only a handle or reference is returned to the process that opened the file, with the help of the handle you can request File IO, if you are using a native application.
In case of Java, java.io.File is an abstract representation of file and directory pathnames. This does not represent the content of the file.
You have to pass a reference of this File object to FileInputStream for reading data from the file or FileOutputStream for writing data into the file. When you ope the file the file pointer will be positioned at the start of the file. The file pointer position will be updated whenever you,
* read some data from the file
* move the pointer to some other location using seek operation.
The application will allocate the memory for the file and whenever a read operation is done it is actually read from the hard disk or from where it is originally stored.
Hope this helps....
19 years ago
I also think Willims is right...
19 years ago
Hi Neal,
You need to refer the JVM specification regarding the implementation of the array objects.
Please refer this page for more info
http://java.sun.com/docs/books/vmspec/2nd-edition/html/Concepts.doc.html#16446
[ February 21, 2003: Message edited by: Vijayakumar Arya ]
19 years ago
Hi Michael,
There is no direct way of invoking a remotely located native code, JNI does not support this. Alternatively you have 2 choices,
1. Create a Remote object and let that run in the windows box. When any client wishes to get the functionality let it contact the Remote server using RMI and let the Remote server invoke the dll locally and return the response.
2. The same functionality mentioned in the above case can be implemented in native also. Using sockets for instance.
Hope this helps
19 years ago
Hi,
Is the do this and do that same across all the places or different.
If it is same try to put that as a separate method in the same class and you can invoke the method at appropriate place based on the flag. This will ultimately reduce the size of your class.
Alternatively you can re-structure your class as

Ofcourse, invoking a method in an object is time consuming than the if condition.
If you are definitely looking for performance you can go on with if checks rather than going for seperate class.
The class will be loaded only once per JVM session, i.e still the java process is running and it will not be loaded everything a method is invoked. Invoking a method is quite expensive than if condition.
Hope this helps
[ February 21, 2003: Message edited by: Vijayakumar Arya ]
19 years ago
Hi Manesh,
I did not get one thing, where are you instantiating the IPDetails object? Whether the instance of IPDetails is passed as a parameter in the native method.
I guess that you are trying to access the fields of the IPDetails instance,
For accessing the field of any instance you have to use

Some examples:

you have to pass the field id returned by the GetFieldId function. Also you can refer to the JNI documentation available within the Java API Documentation.
Hope this helps
[ February 21, 2003: Message edited by: Vijayakumar Arya ]
19 years ago
Hi Vidya,
I am not getting any hint on where could be the problem. The problem might the size that is not taken into account in any of the process. Since I am not aware of the encoding and decoding part, I suggest to try it out,
Without sending the XML you can decode and write that to a file and verify that whether this part works well. Absolutely the sockets are fool-proof, as you are able to send and receive data and there is no restriction of the size of data that has been sent.
Just verify the encoding and decoding part, that could be the culprit. Hope this helps
19 years ago
Hi Vivek,
I have seen your private message, I feel you post your message so that many people can address. Also I don't prefer private messages.
If you want faster response post it in the forum, I am keeping track of the forums I am answering.
Please help me to help you....
Also our number of posts gets incremented everytime we post here . This would not be the case otherwise.
The main intension is that my answers are watched by many eyes, a security check whether I am right
Regarding the JDBC persistence of Messages, You have to check the BEA documentation and since configuring a Messaging Service Provider is not under the scope of J2EE, that will not be available in JMS.
I didnot get your point what do you mean by environment, the fat client? Choosing between a fat and thin client depends on the nature of the application and it is recommended if the application needs to accessed from any where in the world then a brower based (thin client) application should be used.
Hope this helps.
Hi Neeraj,
I have seen your private message, I feel you post your message so that many people can address. Also I don't prefer private messages.
If you want faster response post it in the forum, I am keeping track of the forums I am answering.
Please help me to help you....
Also our number of posts gets incremented everytime we post here . This would not be the case otherwise.
The main intension is that my answers are watched by many eyes, a security check whether I am right
As far as Filechooser, you just check with the Java site. Please post the exception here so that we can trace out where could be the problem.
I have not tried using File chooser in applets.
[ February 21, 2003: Message edited by: Vijayakumar Arya ]
19 years ago