Johnson David

Greenhorn
+ Follow
since May 22, 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 Johnson David

Hi , This is JOhnson.

We have our code in CVS. I have an Ant script which generate
reports.It simply reports all the checkins made by the developers after a
particular date . You can see the Ant script below.

<target name="cvslog" depends="init">
<cvspass
cvsRoot=" server:{cvsuser}@CVS Host:CVS path"
password="${cvspwd}" />
<cvs
cvsRoot=" server:${cvsuser}:${cvspwd}@CVS Host:CVS path"
command="log -N -d now>${previousBuildDate}"
output="webappDiff.log">
</cvs>
</target>


Now my problem is, we are promoting our code from CVS to IBM Rational ClearCase . Now i need to change this script to work with clearcase.


My question is, <cvspass ,<cvs are CVS specific tasks and i want
to find ClearCase specific counter parts for these in Ant ?

Can someone please help me out in this problem. ?

Thanks in Advance.
16 years ago
Hi All,

We all know that validation_rules.xml file contains all the validation functions like date,credit card,email etc.

My question is , Can we add our own functions to that file ?

If so, what is the procedure ?

thanks in advance,

Johnson
16 years ago
Hi Jeanne Boyarsky,

Thanks for your answer. As you said i have JUnit 4.1 on the classpath, which is not supporting awtui and swingui.

It will be nice if you can tell me the version which supports it.

cheers,

Johnson
16 years ago
Hi Guys,

I am new to JUnit. I am able to run the test code successfully through the textui but i am unable to run the test code using awtui or swingui . Please somebody suggest me how to use awtui or swingui .

Below is my java class which needs testing

public class Math
{
static public int add(int a, int b)
{
return a + b;
}
}

Below is my test class

import junit.framework.*;

public class TestMath extends TestCase
{
public void testAdd()
{
int num1 = 3;
int num2 = 2;
int total = 5;
int sum = 0;
sum = Math.add(num1, num2);
assertEquals("Problem with addition",sum, total);
}
}

I have downloaded the JUnit from the internet and kept it on the classpath.

Now i have used the following option

prompt> java junit.textui.TestRunner TestMath

its working

but the following things are not working why ???

prompt> java junit.awtui.TestRunner TestMath
prompt> java junit.swingui.TestRunner TestMath

The error it showing is

Exception is thread main java.lang.NoClassDefFoundError: junit/awtui/TestRunner

Exception is thread main java.lang.NoClassDefFoundError: junit/swingui/TestRunner

Please somebody help me in this . ............

regards

Johnson
16 years ago
thanks Jeroen and marc ,


They try to explain their "logic" in Version 1.5.0 or 5.0? Although this might be a continuation of their effort to confuse.



As marc said abow link also confusing.

Johnson
17 years ago
Hi,

Its a very basic questions,

I am really confused about jdk and j2se

what is the difference between JDK 1.5 and J2SE 5.0 ?

thanks in advance,

Johnson
17 years ago
HI,

I have the fallowing doubt

what is the difference between a Monitor and a Semaphore ?

thanks in advanced,

Johnson
Hi All,

Its a basic question on jsp.We know that all servlets require web.xml , but a jsp does'nt.

i just want to know why does'nt a jsp requires a web.xml.

correct me if i am wrong

thanks in advnace

Johnson
17 years ago
JSP
Hi All,

I know that SQLWarnings are not exceptions, and they have to be explicitly retrieved . But i dont know when does they occure.

Has anybody received an SQLWarning, please tell me when and where they occure.


thanks in advance

johnson
Hi all,

I think this is one of the common questions in servlets.

What is the difference between a RequestDispatcher object obtained from the Request object and the RequestDispatcher object obtained from the ServletContext ?


thanks in advance

Johnson
17 years ago
Hi All

I have read an article that says , Specifying the constant
TYPE_FORWARD_ONLY creates a nonscrollable result set, that
is, one in which the cursor moves only forward. If you do not
specify any constants for the type and updatability, you will
automatically get the default, which is a ResultSet object that is
TYPE_FORWARD_ONLY and CONCUR_READ_ONLY

In my program i have'nt specified any constants , it
means i have created nonscrollable result set, which moves the
cursor in the forward direction only, but in my program i can able to
move the cursor in the backword direction also using previous()
method . can anybody tell me why ,.. here is the code

import java.sql.*;
public class ResultSetTypeDemo
{
public static void main(String ar[])
{
try{
Class.forName("com.mysql.jdbc.Driver");

Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/d
ataserver","root","password");Statement stmt=con.createStatement(ResultSet.TYPE_FORWARD_ONLY,ResultSet.CONCUR_READ_ONLY);
ResultSet rs=stmt.executeQuery("select * from mytable2");
System.out.println(rs.getType());
//it prints 1003 ie type forward only
//but previous() method in the next step should not
// work , but it is working ,

rs.afterLast();
while(rs.previous())
{
String str=rs.getString("name");
int age=rs.getInt("age");
System.out.println(str + " " +age);
}
con.close();
stmt.close();
}catch(ClassNotFoundException e)
{
System.out.println( e.getMessage() );
}
catch(SQLException e1)
{
System.out.println( e1.getMessage());
}
}
}


Here i am using MySql database 4.1 version and jdk 1.5, mysql

driver mysql-connector-java-3.1.10-bin.jar

thax in advance.
Hi friends ,

I spent so much of time on SSI includes , but i am unable to execute it . ...i am getting the same problem as . .milind .. . can somebody help us to get out of this problem , by giving an example or providing an URL

how to work with SSI includes in weblogic or tomcat ?


thanx in advance
18 years ago
Hi friends ,

I have a question regarding "shift operators", can somebody tell me , where exactly we use shift operators in the real world java programs, by giving some practical example.

thanx in advance
Hi friends ,

How many ways are there to stop a thread ?

what are they ?

thanx in advance

regards

johnson
thanx jeak nice explenation ,

but what is non-JDK compliant JVM ???


regards

johnson