This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of Darcy DeClute's Scrum Master Certification Guide: The Definitive Resource for Passing the CSM and PSM Exams and have Darcy DeClute on-line!
See this thread for details.

Bhaskar Mukhejee

Greenhorn
+ Follow
since Sep 16, 2008
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 Bhaskar Mukhejee

Thanks to all of you for this help.

Regards,
Bhaskar
14 years ago
Hi All,

I have started java recently. Got a snippet of a code. can anybody please explain this inheritance?
I have got 2 classes Test1 and Test2. Test1 inherits Test2.



The output is :
20
Executing method of Test1

but when I am replacing Test1 with Test2 The output is :
40
Executing method of Test1

It is showing accessing the instance variable of Test2 class but method of Test1 class why?

Please help. Thank you.

Regards,
Bhaskar
14 years ago
Hi,

Is Pane a good idea to implement in this case? I took strategy where each line of the file read sequentially and print it using System.out.println() there by applying the encoding explicitly as suggested,



Set the encoding with a particular value. It worked.

Thanks to all of you spending time and reading this post.

Regards,
Bhaskar
14 years ago
Hi,

well i have tried

in order to explicitly change the encoding, but this is also not working on solaris and printing same "?" instead of

Can you suggest me how to encode programmatically in java instead of specifying option -Dfile.encoding=ISO-8859-1 from unix.
14 years ago
Hi,

I am working on Solaris and facing a problem. I have a .DAT file which simply contains some data in particular format which includes £ symbol. The fomat looks like

001|£30VB | | |T+T250|£30 Value Bundle |1|1|1 |0 |0|0 | |0|1010906 |93731 |TREVORJ |CRBCE1P |1090713 |134739 |JAMESMAT |CRBCE1P |9 |1|PRE-REPORT | | |

The requirement is a java program will be reading the file and printing the same file as it is. But when my program is reading the file and printing everthing is perfectly printed except "£" symbol (read as pound). It is printing "?" instead.

Observations :
  • 1. When I am doing "cat Myfile.DAT" every thing getting displayed perfectly including £ symbol.
    2. When I am opening the same file in vi editor it is displaying ASCII value for £ symbol. (/243).
    3. I tried to change the encoding from java level by setting the property (in the program Myprog.java) like this




  • It is reading the .DAT file properly and printing properly. But the bottleneck is , we can not execute the java program from command line as a matter of fact, I tried to set the property(file.encoding) in code level by writing this:


    but this does not work. From java level I am checking, it is showing that property has been set but actually the program is not working if I do it from code level.

    How to proceed? Any ideas? Hopefully this has to be handled in java level not in Unix level (not sure).
    Just to read a dat file and print the file output using java.
    Mods, forgive me if I have posted in wrong place.
    Thanks in advance.

    Regards,
    Bhaskar
    14 years ago
    Hi David,

    Thanks for the reply. Google shown me links of tutorials most of them I encountered was not full I am looking for a complete "general" tutorial for JUnit on purely learning basis, If you could provide. Thanks for giving the 2nd option.

    Regards,
    Bhaskar
    14 years ago
    Hi,

    I am newbie to a JUnit testing. I require to know to it for some testing activities which is part of build procedure. Presently I have no knowledge of JUnit. Could you please guide me for any good tutorial/documentation/source of e-books covering the basics of JUnit? I did a Google but was not worth in that aspect?
    One more addition could you please tell me how ANT (I know basics of it) and JUnit are releated? Thanks to all in advance. Waiting for an aspiring response from your side.

    Regards,
    Bhaskar
    14 years ago
    Hi All,
    I am having a problem with tomcat in VISTA. I found this is the best place to share it. I have already gone through the
    steps mentioned in different threads and posts but all were in vain.
    I have installed Tomcat 5.0.28 in my Vista system in path "C:\Program Files\Apacahe Software Foundation\Tomcat 5.0" with a default port 8080. When I started the service using "Monitor Tomcat" from Start->All Programs->Apache it displayed an error message like "ACCESS ID DENIED CAN NOT OPEN SERVICE MANAGER."
    I, then deactivated the UAC of VISTA as prescribed in Previous threads. Then "Monitor Tomcat" was able start the service successfully without any Access Denial. I changed the service type as MANUAL from AUTOMATIC from Service Configuration Manager Window.
    Eventhough the service got started I found Tomcat was not running fully because when I made "netstat -a" in Command Promt, I found only Server Port = 8005 is listening rest of the two Connector Port was not listening. So each time I start the service only server port starts listening but not the rest of the two connector ports. As a matter of fact, when I tried to open "http://localhost:8080"; it did not work.
    I adopted some measures posted in previous threads,
    A. Opened the tomcat/bin/tomcat5w.exe ran it as an administrator did not work , problem remains same.
    B. Right Clicked on the tomcat home directory , gave Full Control permission to User(Me) No change again.
    C. Changed the port numbers in different configurations(Tomcat/conf/server.xml) to ensure not to have port conflicts but it remained same ONLY SERVER PORT(8005) LISTENING CONNECTOR PORTS (8080 and 8009) NOT LISTENING when I start the service.
    D. To avoid the authentication issues I changed the default installation path of TOMCAT and changed to something like "C:\Users\USERNAME\Apache\Tomcat" like this , it was also in vein.
    I went with all possibilities mentioned herein the previous threads and finally nothing worked. I am totally stucked. Is there any way to proceed? I am stucked. Please help Thanks in advance.
    FYI, My JAVA_HOME is set to "C:\Program Files\Java\jdk_1.6.0_03\bin"
    14 years ago
    Thanks Peter for your nice and lucid explanations for this context I really had a problem at the first time learning ANT , but after your explanation it seems much clear to me. I will be getting the copy as soon as possible. Thanks once again for your kind explanation.
    15 years ago
    Hello Everybody,
    As I am a novice o the ANT tool. I am not able to understand the PATH LIKE STRUCTURE in ANT what is it and why is used for..I am also stuck with this snippet and not able understand fully here it is :
    <classpath>
    <pathelement path="${classpath}" />
    <fileset dir="lib">
    <include name="**/*.jar" />
    </fileset;>
    <pathelement location="classes" />
    </classpath>

    I did a lot of google but it is not clear so. Somebody please help. Waiting for an aspiring reponse from your side, Thanks in advance.
    15 years ago
    Hello All,
    As I was working with ANT faced a problem which is as follows :
    My build.xml look like this :
    <project name = "Hello" default = "init.release">
    <target name ="init.release" if="release">
    <loadproperties srcFile = "release.txt" />
    <mkdir dir = "${release.dir}" />
    </target>
    <target name ="init.build" unless="release">
    <loadproperties srcFile = "build.txt" />
    <mkdir dir = "${build.dir}" />
    </target>
    </project>
    This means : I have two targets init.build and init.release. From Command Promt if I give "ant init.release -Drelease=true" this will load the property from sourcefile "release.txt" and create a directory with name of "release" as mentioned in the property.Content of "release.txt" is like :
    <property name="release.dir" value = "release" />

    When I am running ANT it is creatting the directory name as "${release.dir}" instead of "release" ..what may be cause of this ? kindly help . Waiting for an aspiring response from your side. Thank you.
    15 years ago
    Thanks Peter,

    You exactly gave the answer that I wanted. Now the doubt is clear to me. Thank you very much.

    Regards,
    bhaskar
    15 years ago
    Hello, I am new to the j2ee and code builing. In a typical build.xml file(required by ANT utility) I can not understand in the properties tag what is the necessity of value attribute?
    and
    why we keep the value (of property tag )under somethink like this "${}" i.e value = "${build.dir}" (for example).
    I have gone through several sites but the concept is not clear to me. please help me. Awaiting for an aspiring reponse from your side. Thanks in advance.
    [ September 16, 2008: Message edited by: Bear Bibeault ]
    15 years ago