keshav reddy

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

Recent posts by keshav reddy

Hi,

In a project I have a requirement of writing into ini (windows specific) files. Can you please give me some details how i can write the new "sectionname", "key","value" into an ini file.
I think by using setproperty method we can update the value of existing key, but how can I write the new key- value in an ini file.


Thanks,
Keshav
15 years ago
Hi Henry,

Thanks for the reply.
For the first requirement, I tried to split by using split method as below, but not giving exact result:

StaticString string : "1a23MyFunc(ab)0123MyFunc(1234)000"
String[]Key = StaticString.split("MyFunc*");

output is : abc , (a)xyz, (1234)000
But I need: abc, xyz, 000

I tried to split with MyFunc(*), but it giving runtime error: Dangling meta character '*'

Can you please give me some assistance in solving this.

Thanks,
Keshav
Hi Ranchers,

Can you please help me in writting the regular expressions for the following requirements:

1. Input string : "1a23MyFunc(ab)0123MyFunc(1234)000"

Need to split the string with: MyFunc(anyvalue)

Required output is (string array): 1a23,0123,000


2. InputString : "abcMyFunc(ab)xyzMyFunc(1234)000"

Required output is (value passed to MyFunc method) : ab, 1234

Thanks,
Keshav
Hi Ranchers,

Can you please help me in writting the regular expressions for the following requirements:

1. Input string : "1a23MyFunc(ab)0123MyFunc(1234)000"

Need to split the string with: MyFunc(anyvalue)

Required output is (string array): 1a23,0123,000


2. InputString : "abcMyFunc(ab)xyzMyFunc(1234)000"

Required output is (value passed to MyFunc method) : ab, 1234


let me know if anything is not clear.

thanks for your help,
Keshav

15 years ago
Hi Kunal,

Congrats for cleared SCJP exam with a good score.
I would like to take the exam in a couple of weeks. I have read the K&B book for scjp one time. I want to give a second try in this week.

I need some help regarding wizlabs exams. Did you try with trail version or full version. Will trail version is sufficient for practice?
From which areas you got the most questions ?

-Keshav
17 years ago
I got the solution for my problem.
Now I am using jdk1.5 and I came to know that IDS (type 3)willn't work on JDK1.5. It will work on JDK1.4

Thanks again for all your responses.
Hi Sathish,
The class path also updated properly.
echo %CLASSPATH%
C:\Program Files\classes\jdk14drv.jar.

I think there may be problem with my jdbc-odbc driver(used by type 3 driver).
Can you guide me how to map type1 driver to database name.
I included CLASSPATH variable too
C:\Program Files\classes\jdk14drv.jar. This is also not helped me..
Thanks Sathish for quick response..
Ids is installed in my machine under C:\Program Files\classes\ids. I included this path in system PATH variable. but, still I am getting same error.
This is the program:
-------------------------------------------
import java.sql.*;

public class DbConnetIds
{
public static void main (String [] rags)throws Exception
{
Class.forName("ids.sql.IDSDriver");

Connection con = DriverManager.getConnection("jdbc:ids://localhost:12/conn?dsn='oracle_odbc'","bstest02/pin2","pin2");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT aac_package FROM account_t WHERE aac_promo_code LIKE 'voip_slp_transitions_09%'");

System.out.print("rs.getInt(1)");
}

}
----------------------------------
I am getting following error during run time:
Exception in thread "main" java.lang.ClassNotFoundException: ids.sql.IDSDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at DbConnetIds.main(DbConnetIds.java:7)

-------------------------------------------------
Note : I installed IDS server on my my machine,updated the sytem PATH variable.
I am getting similar error with type1 driver.
This is the program:
-------------------------------------------
import java.sql.*;

public class DbConnetIds
{
public static void main (String [] rags)throws Exception
{
Class.forName("ids.sql.IDSDriver");

Connection con = DriverManager.getConnection("jdbc:ids://localhost:12/conn?dsn='oracle_odbc'","bstest02/pin2","pin2");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT aac_package FROM account_t WHERE aac_promo_code LIKE 'voip_slp_transitions_09%'");

System.out.print("rs.getInt(1)");
}

}
----------------------------------
I am getting following error during run time:
Exception in thread "main" java.lang.ClassNotFoundException: ids.sql.IDSDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at DbConnetIds.main(DbConnetIds.java:7)

-------------------------------------------------
Note : I installed IDS server on my my machine,updated the sytem PATH variable.
I am getting similar error with type1 driver.
This is the program:
-------------------------------------------
import java.sql.*;

public class DbConnetIds
{
public static void main (String [] rags)throws Exception
{
Class.forName("ids.sql.IDSDriver");

Connection con = DriverManager.getConnection("jdbc:ids://localhost:12/conn?dsn='oracle_odbc'","bstest02/pin2","pin2");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT aac_package FROM account_t WHERE aac_promo_code LIKE 'voip_slp_transitions_09%'");

System.out.print("rs.getInt(1)");
}

}
----------------------------------
I am getting following error during run time:
Exception in thread "main" java.lang.ClassNotFoundException: ids.sql.IDSDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at DbConnetIds.main(DbConnetIds.java:7)

-------------------------------------------------
Note : I installed IDS server on my my machine,updated the sytem PATH variable.
I am getting similar error with type1 driver.