Balaji Sadasivam

Greenhorn
+ Follow
since Nov 16, 2000
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 Balaji Sadasivam

Guys-
I am preparing for Developer exam in Atlanta, GA. If anyone is interested in joining with me for the preparation, please send me a reply. If possible, we can form a team.
Thanks
Regds
Balaji
Thanks for your reply.

I made several attempts to fix the problems with Tomcat 4.0. All my efforts are ended in vain. Finally, I tried with Tomcat 3.2.1, it is working perfect and I am able to run Servlets examples.!!!
I will take a look at the user guide to find out where I made a mistake with 4.0
Thanks guys for your help.
Regds
Balaji

23 years ago
I tried that also. If I try to run in the same window, I am getting set od errors, Which I listed in one of my previous postings (Scroll up)
If I run in the same window - set of errors
If I run in different window - set of errors and the window closes automatically.
Any comments???
-Balaji
23 years ago
This is related to my previous posting...
If I use startup without any parameters, I am getting the following error message.
--------------------------------------------------------------
Using CLASSPATH: ..\bin\bootstrap.jar;c:\jdk1.2.2\lib\tools.jar
Bad command or file name
Runs a Windows program or an MS-DOS program.
START [options] program [arg...]
START [options] document.ext
/m[inimized] Run the new program minimized (in the background).
/max[imized] Run the new program maximized (in the foreground).
/r[estored] Run the new program restored (in the foreground). [default]
/w[ait] Does not return until the other program exits.
Bad command or file name
Commands:
env - Set up environment variables that Catalina would use
run - Start Catalina in the current window
start - Start Catalina in a separate window
stop - Stop Catalina
--------------------------------------------------------------
Can someone help me to fix these problems???
Thanks
Regds
Balaji
23 years ago
No. It is not working. I made the following the change to startup.bat file to find out the problem. (to prevent the execution of second DOS window, I commented out the 'start' in startup.bat file)
rem "%CATALINA_HOME%\bin\catalina" start %1 %2 %3 %4 %5 %6 %7 %8 %9
"%CATALINA_HOME%\bin\catalina" %1 %2 %3 %4 %5 %6 %7 %8 %9
Then I realized that it is expecting some parameters and I tried the follwoing one.
C:\tomcat\jakarta-tomcat-4.0-m5\bin>startup run
After trying with the above command, I am getting bunch of errors. I am reaaaaaally going mad about this tomcat setup.
Can someone help me to fix this problem.
-Balaji
The following are SOME of the errors.
--------------------------------------------------------------
at org.apache.crimson.parser.Parser2.parse(Parser2.java:304)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:300)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:245)
at org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:228)
at org.apache.catalina.startup.Catalina.start(Catalina.java:648)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:618)
at org.apache.catalina.startup.Catalina.process(Catalina.java:175)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:134)
23 years ago
Thanks for your reply.
It worked!! But, I have another issue.
After the startup, the second window pops-up and after few seconds it closes automatically.
What can I do now??
Thanks
Balaji
23 years ago

I am getting the following error message, when I start Tomcat 4.0 server from Tomcat's bin directory.
---------------------------------------------------
C:\tomcat\jakarta-tomcat-4.0-m5\bin>startup
Using CLASSPATH: ..\bin\bootstrap.jar;c:\jdk1.2.2\bin;\lib\tools.jar
Cannot find file 'c:\jdk1.2.2\bin;\bin\java' (or one of its
components). Check to ensure the path and filename are correct
and that all required libraries are available.
----------------------------------------------------
It looks like the error is related to JDK1.2.2 But I could't find out the problem.
The following is my autoexec.bat file
----------------------------------------------------
C:\PROGRA~1\NETWOR~1\MCAFEE~1\SCAN.EXE C:\
@IF ERRORLEVEL 1 PAUSE
@echo off

REM To make a DOS Boot Diskette; See the file C:\DOSBOOT\DOSBOOT.TXT
path C:\WINDOWS;C:\WINDOWS\COMMAND;c:\jdk1.2.2\bin;
set JAVA_HOME=c:\jdk1.2.2\bin;
set CLASSPATH=c:\jdk1.2.2\lib\tools.jar;
set TOMCAT_HOME=c:\tomcat;
doskey/insert
@REM SetPower.exe will initialize the USB Keyboard.
@c:\windows\system\setpower.exe
-----------------------------------------------------
Please help me
Thanks
Balaji








23 years ago

I am planning to use RMI in my assignment.
I have both volume 1 and 2 of Core Java. I can refer the rest at Borders.
Thank you very much for your suggestions.!
Regards
Balaji

Originally posted by balaji sambandam:
You can read the following books and may serve as a
reference guide while you are doing the assignment.
Core Java volume 1 and Volume 2
Graphics JAVA Mastering JFC.
Java 2 Exam Guide - Barry Boone/william Stanek
You don't need to read the whole book. Read only chapters
which are needed to compelete assingment such as
RMI
Swing classes
sockets
I/O
LayoutManager
and etc...

And don't forget to read RMI tutorials and archives at
SUN site (if you plan to use RMI in your assingment)


Congratulations Balaji!!
Can you tell me the objectives of this exam?? The objective given in the Sun web-site is not clear. I need some specific topics.
Also can you recommend some study materials??
Is it necessary to study books related to "Object-Oriented Analysis and Design" ??
Please do reply.
Thanks
Regards
Balaji

Yesterday I cleared SCJP2 Exam. This exam is not at all difficult to clear. I didn't do well in Strings/Operators and assignments/Threads. I scored only 57%. I got 100% file IO. Rest of the sections each between 74-77%

Since I studied the JLS thoroughly, I was able to answer 3-5 tricky questions.
As far the practice exams are concerned, Marcus Green and Exam Cram are really good and close to the real exam's complexity.
The time, 90 minutes was tight. I got only 5 minutes to review the questions.
I came to know about the JAVARANCH recently. I learned some of the topics like constructors/GC/Streams/Strings from this site.
At this moment, I would like to thank all the people who helped me directly/indirectly to get this certificate.
Next, I will be moving to Servets/EJB..
Thanks
Regards
Balaji

23 years ago
Local class can only be accessed in the context of the block in which it is defined.
For instance,
class outerClass {
void aMethod(final int i) {
class localClass {
Here, localClass is part of aMethod() rather than being part of outerClass. Therefore localClass can't be accessed outside of aMethod().
Since you want to access localClass in the main(), which is outside of the aMethod(), some instance or handle of localClass must be returned from aMethod to main().
The above condition should be satisfied whether the context of the localClass is static or non-static.(In other words, aMethod is static or non-static)
This is the only possibility I can guess. I could be wrong. I don't know.
Can anyone confirm this..
Thanks
Balaji
shree-
I am impressed with your detailed explanation. Thanks a lot.
I didn't look into the APIs. We have to live with the explanations given in the APIs.
Thanks guys for your time.
Balaji
Thanks for your reply shree.
I personally feel that your reply is just another form of my question.
I would like to discuss your reply in two separate cases.
Case 1: (No String terminator)
-------
According to your statment, there is no string terminator in java. If this is true, both substring() and charAt() should result in RuntimeException. Unfortunately, that is not the case.
Case 2: (With String terminator)
-------
If string terminator is blank (or any other character for this matter), how come one method is showing output(assume it is blank) and the other results in exception FOR THE SAME STRING INDEX VALUE?
I guess something is sneaky here...

Balaji

What is the functional difference between the following three methods in a thread ??
1.yield() 2. sleep() 3.setPriority
(I understand the purpose of wait() method, so I am not considering it here)
To the best of my knowledge, all the three methods can be used to move the currently RUNNING thread to READY-TO-RUN state.
This means, can I use the following???
1. setPriority in place of yield()
2. sleep() in place of yield()
Assume I have two threads. Thread 'T1' with low priority and Thread 'T2' with higher priority and is currently running.
What methods should be used on 'T2' so that 'T1' will get a chance to run.?
Can someone explain in detail where these methods can be used and can't be used..
Thanks
Regards
Balaji
Thanks guys.

Byte and Char streams are clear now.
Balaji
23 years ago