Sumit Khurana

Ranch Hand
+ Follow
since Sep 19, 2010
Sumit likes ...
MyEclipse IDE Chrome Java
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sumit Khurana

Hi friends,

I need to connect to a unix server through telnet or SSH using java to automate an application and i don't know how to do this?
Please suggest me a way through which i can do this.

If you have any link of tutorial or any other information. Please share with me.

Thanks in anticipation.

With warm regards
Sumit Khurana
9 years ago
Hi Darryl

Thankyou for replying.
I think swing is the advance version of applet. so, is it better to start from Swing directly???
and please provide some links for swing also.

Sumit Khurana
9 years ago

Please suggest me a tutorial for learning applet and tell me how shall i start?
I have a sound knowledge of core java and J2EE and now I want to learn this also.

Sumit Khurana
9 years ago
Hi friends,

it is showing a compile time here...but i am not able to understand why it is showing an error....

if i remove this line then this code shows the output as:


Hi friends,

I read in sierra bate book that to make java more memory efficient,String uses String constant pool that means it will create a single object for two different
references h1 and h2 . so,h1==h2 should return true. but unexpectedly jvm gives false.......why???

I am also confused about the output of line2 and line3,please explain me this also.
Thanks for reading my post,

Thanks pedro for helping me and giving your precious time

Now,I have understood completely!!
hi friends,

we can see that there is the zero length string array object which is refered by args reference(if do not pass anything) through this program...

public class Practice3 {
public static void main(String[] args){

and its output is:


so,we can say that there are 6 objects...

but you asked a different question that, how many objects are created in this program?

i think its answer is 5 because zero length string object is not created in this program.
Howdy! pedro,

thanks for reading n replying to my post,

Main structure of my web app is:

@@@@| @@ |-MANIFEST.MF
@@@@|@@ |-lib(folder)
@@@@|@@ |-Web.xml

The content of index.jsp is:

<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<base href="<%=basePath%>">

<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" type="text/css" href="styles.css">

This is my first ever JSP page. <br>
<p>This design is basically nothing</p>

The content of web.xml is:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"

n there is nothing in the lib folder..and this is my small helloworld web app
No Darren,My friend suggested me to start with the Eclipse...
n I have just started to read the Head First Servlet and Jsp.

i am confused about how to run the programs of servlet and JSP through Tomcat directly thats why i am using eclipse...
Hi friends,

This is my first web project and first post in this forum.
I am using MyEclipse 6 for my programs.

I opened a new project and tried to run it.
But the tomcat server of MyEclipse was not able to find a library.

This thing i always sees in the console..

12-Feb-2011 20:56:48 org.apache.catalina.core.AprLifecycleListener init
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\MyEclipse 6.0\bin;C:\Program Files\MyEclipse 6.0\myeclipse\eclipse\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_6.0.0.zmyeclipse60020070820\tomcat\bin
12-Feb-2011 20:56:50 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
12-Feb-2011 20:56:50 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 3351 ms
12-Feb-2011 20:56:50 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
12-Feb-2011 20:56:50 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.13
12-Feb-2011 20:56:52 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
12-Feb-2011 20:56:52 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /
12-Feb-2011 20:56:52 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/125 config=null
12-Feb-2011 20:56:53 org.apache.catalina.startup.Catalina start
INFO: Server startup in 2840 ms

I thing the problem is with this bold line....

And now i have 1 index.JSP file and 1 Web.xml which was automatically produced by MyEclipse 6.
so,i don't think that there would be a problem with these files..

I wrote this line on the browser...


i have also run this project on another system but on that it was running fine.

I don't know what to do.
please help!!

Thank you,


the main purpose of next method is to return the current value in the collection and move the internal pointer to the next element in the collection.. Here you are not calling next() that's why iteration never moves to the next element and it.hasNext() always returns true..

The next method returns the next object in the collection,and moves you forward to the element you just returned.

hasNext() method returns true if there is an element present after the current element.

so,in this loop,in each iteration you are checking the same object and not moving to the next object.

and is there a way to know where I went wrong?
I have no idea what were the mistakes i did.

There is no way to know anything about what you did in your exam...

and can we give the SCJD directly? or would we need SCWCD/SCBCD certification as a pre-requisite for that?

Yes my friend,you can go for it directly.

Within 30 days,you will get your certificates at your doorstep as said by oracle.I got my certificate and silver card in 27 days and within 2 or 3 days you will receive a mail from oracle.
Then login to oracle database update your information there and you can also download the oracle logo from site which you can show on your resume.

Next,you can choose the SCWCD or SCJD.