Sanjib Talukdar

Greenhorn
+ Follow
since Dec 18, 2000
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Sanjib Talukdar

Shankar,
Which version of Rational Rose are you using?
Why are you trying to use Rational Rose to reverse engineer Java code? In my experience Rational Rose 98i is not very good at this. It gives a lot of errors. May be you should try some other tool.
To reverse engineer Java code, you should also add the JRE directories to CLASSPATH in addtion to installdir\Rational\Java directory. Also, you should have the intalldir\Rational\Java, installdir\Rational\common directories in your PATH variable.
I think that will work.
Sanjib.
Catalin,
I am assuming a few things regarding the basic design of the classes here:
1. The Group class will have an aggregation of User class.
2. The Application class will have an aggregation of Group class.
That is the hierarchy I think you have. Please correct me if I am wrong.
Going by the above assumption, my design will have a mix of both your techniques. The actual statements to save the object information in the database will be in add, update, delete methods of the individual classes. Each of these methods will have all the required information passed as parameters.
I will use the ApplicationList, GroupList and UserList collections to save multiple instances of the respective objects. The add, update, delete methods in the list objects will iterate through all the elements in the list and call the respective add, update, delete methods of each idividual objects.
Please consider that the add, update, delete methods of the any Application object will have to iterate through the Group objects that are part of that Application object and call the add, update, delete methods of the respective Group objects. Smilary the methods for any Group object will have to iterate through the User objects that are part of that Group object and call the respective methods.
I hope that this helps.
Thanks.
Sanjib.
Prasad,
I can provide with you some code samples if you want. I used C++/Win32 APIs and JNI to do this. I am not putting the code here as it might be a lot of clutter and may need some explaining.
Please e-mail me at [email protected] if you are interested.
Thank You.
Sanjib.
24 years ago
Keyur,
/* Create the Java VM */
res = JNI_CreateJavaVM(&jvm, &env, &vm_args);
In the above method call, you need to pass a void ** as the second parameter.
After the method returns successfully, you will have to cast the void ** argument variable to jenv ** variable.
That should work.
Sanjib.
24 years ago
Tom,
I am assuming here that you are using some sort of IDE (C++/C) to write the JNI code. I am further assuming that you have a C++/C project to generate the DLL.
The IDE you are using should have a menu labeled Project. In the menu there should be a menu option called Property or Options. This will allow you to set the various properties for the project. Please find a tab pane labeled Directories/Conditionals (or something similar) which will allow you to specifiy the include files/directories, library files/directories. In the box for include files you will have to specify the directory where the jni.h file is. It does not matter which directory, as long as you specify the correct directory name here.
I don't know whether its required for JDK 1.3 or not, but in JDK 1.2.2 there is another directory root\JDK1.2.2\inlcude\win32 that also needs to be included in the C++/C project.
I hope this answers your question.
24 years ago
Hi Deekasha,
I did some more digging on your lines and found the following.
The calling stack for PrintStream.println(char []buf) will look something like this.
BufferedWriter.write(char []buf)
...
PrintStream.write(char []buf)
...
PrintStream.print(char []buf)
...
PrintStream.println(char []buf)
In BufferedWriter.write(char []buf) call, the length of the array is checked which will throw NullPointerException for null arrays.
For all other arrays the calling stack will be like this:
PrintStream.write(String.valueOf(Object o))
...
PrintStream.print(Object o)
...
PrintStream.println(Object o)
The String.valueOf(Object o) call will return the String literal "null" for all null objects which will be output to the out stream.
Thank You all.
Sanjib.
[This message has been edited by Sanjib Talukdar (edited December 19, 2000).]
[This message has been edited by Sanjib Talukdar (edited December 19, 2000).]
24 years ago