Natraj Gudla

Ranch Hand
+ Follow
since Feb 09, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Natraj Gudla

Hi,
I am working for a client, which uses its own well defined architecture, defining some set of strong base components,services..which help us to develop our applications faster.
This architecture...using a lot of J2EE standards, design patterns and aims at bringing a common practice and way of developing enterprise apps among all projects..
One of the introductory documents to the architecture, says "J2EE does not enforce robust application architecture, and it remains possible to to develop dirty and poorly structured applications using J2EE"..
i wanted to know ,is it true...
can i get some help....
Hi,
I have a double value which prints a lot of digits after the decimal.
how do i control the number of digits after the decimal.
regards
21 years ago
When you say "java t2" to execute the java code, the class file needs to contain a class by name "t2" with the the proper main method declared.
As you have renamed the file name , but did not change the class name, it gives a RuntimeException.
Hope this explanation helps.
21 years ago
One simple way would be, to use the toCharArray() method in the String class , to get the string content to be represented as a character array and then the rest is simple to access the array memebers.
The other way could be to use the substring() method to get single character at a time, serially.
Hope this helps you.
regards
21 years ago
Methods are chosen to be declared as static when they perform some tasks,which are not specific to any particular object of the class.
as static methods belong to the class, they can be accessed by more than one thread at a time.and one has to be careful in programming. There is every chance that what ever content on which this methods works may be inconsistant.
21 years ago
sorry..a correction...it is a null not a string "null".
21 years ago
When ever a "null" is used when an object is required, a NullPointerException is thrown.
To avoid this we need to be careful while assiging object references and creating structures.Explicit check on the null references before they are used can avoid such exceptions.
21 years ago
Hi,
I have a Jtree , which maintains the status of all of its tree nodes whether they are collapsed or expanded...
Now...from this tree , when the user renames one of the tree node..
how do i change the node name in the Jtree and its representation in the tree..
In the sense i want to know how can i edit the Nodes in a Tree..
In my implementation , I use a TreePath to represent a node.
can any one help me?...
regards
21 years ago
Hi,
I tried starting the setup.exe of mysql installation from a Java program using the Process class.
like Runtime.getRuntime().exec("setup.exe",null,new File(directory path of mysql setup files));
when i execute the program it gives me an error saying..
"please go to the control panel to install and configure system components"..
what is the problem?..
can i get some help?.
21 years ago
I want to maintain a time count on several objects of the same class, to proceed for further actions on the object when it reaches its time,
now can i do something like the object on its own starts off its action calls when it reaches the time set...periodically..without that object being a thread..
also i can maintain a for loop to run thru checking for the time of each object , but in that way it will be serial execution and i may not be exact in executing some actions when it is needed for an object..as i am in one iteration ,i may be missing the time for some other object somewhere to come after some more iterations...
that is the reason can i have some thing in a way that each object can check its own time and call the actions , without them being threads...

can anyone help me?..
21 years ago
ya, sorry that i did not give the details
I am using the "org.gjt.mm.mysql.Driver" class as the driver
and my application requires to connect to the "mysql" database,
create a new database as given by the user
and create a new user , grant privileges to the user on the new database,
and then exit the application.
here i am working on the "user" and the "db" tables of the mysql database , connecting to it using the "root" and with no password.
regards
Hi,
I am unable to switch off the autocommit mode thru my code in java , while connecting to mysql.
here, it commits all the queries which i execute immediately..
and the version of mysql which i am using is 3.23.53 ,
can anyone help me...
Hi,
I want to use the JDBC drivers and connect to oracle and SQL Server databases , requirement is that i have to connect to them , create a database , create a user who has full rights on that database and then exit...
Is there any default password in oracle that i can use to log in and start my operations , or is it that i need a DBA to assign me a user name and password .
What is the scenario with SQL Server?.
Hi Dav,
Got it...the URL which you gave helped me..that was a good one indeed.
a nice little conceptual things..
thanks for all your help,
Bye
21 years ago
Hi Dave,
You are exactly right....I was actually looking into the code
of java.sql.DriverManager since yesterday , even i figured out the same
thing as you have stated..
In this case what is that i can do to solve the problem...
can you help me?..I have an urgent assignment...
I am also giving my code...

URL driverUrl = new URL("file:"+driverJarPath);
URL[] urlArray = new URL[] {driverUrl};
ClassLoader driverLoader = new URLClassLoader(urlArray);
Class driverClass = driverLoader.loadClass(dbDriver);
DriverManager.registerDriver((Driver)driverClass.newInstance());

regards
Natraj
21 years ago