gul khan

Greenhorn
+ Follow
since Feb 14, 2001
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 gul khan

can any body throw lights on the scope of java in pakistan as one of my friend is an scjp (ocp developer ) and no Ms and Bs and still jobless so do any body have something to say
i m also having problem with connecting oraclc 7.2 personal do i have to go to oracle 8i.
import java.io.*;
class Characters {
public static void main(String [] args) throws IOException{
char vChar;
PrintWriter out= new PrintWriter(new BufferedWriter(new FileWriter("Characters.txt")));
for (int i=33;i<255;i++) {
vChar=(char) i;
System.out.println("");
String vString = Integer.toString(i);
out.write(vString);
}
}
this file produces output to consele and also creates file "Character.txt" but file is empty
i m unable to figure out why?
any comment.

19 years ago
dear fellows i know it is very basic thing to u but plz help
me
as
downloaded tomcat and i have created JAVA_HOME AND ITS VALUE IS
THEN TOMCAT HOME
AND WROTE
http://localhost:8080
then a page comes and i click examples link and
it showed me a page with check boxes i select them and click submit
and it comes with errors
like
Error: 500
Location:/examples/jsp/checkbox/checkresult.jsp
Internal Servlet Error:
avax.servlet.ServletException: sun/tools/javac/Main
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:368)
at org.apache.tomcat.core.Handler.service(Handler.java:261)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:356)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:720)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:666)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:194)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:403)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Unknown Source)
Root cause:
java.lang.NoClassDefFoundError: sun/tools/javac/Main
at org.apache.jasper.compiler.SunJavaCompiler.compile(SunJavaCompiler.java:128)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:238)
at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:440)
at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:411)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:152)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:164)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:296)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:369)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:368)
at org.apache.tomcat.core.Handler.service(Handler.java:261)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:356)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:720)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:666)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:194)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:403)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Unknown Source)
any help plz
i am using win nt service pack 6 and iis 3 and jdk 1.1.3
any help
19 years ago
hello that line was mistake
i changed the code
<code>import java.io.*;
class Characters {
public static void main(String [] args) throws IOException{
char vChar;
PrintWriter out= new PrintWriter(new BufferedWriter(new FileWriter("Characters.txt")));
for (int i=33;i<255;i++) {
vChar=(char) i;
System.out.println("<Number :"+i+" In Character is: "+vChar+">");
String vString= "<Number :"+i+" In Character is: "+vChar+">";
out.write(vString);
}
}
this file produces output to consele and also creates file "Character.txt" but file is empty
i m unable to figure out why?
any comment.
see io it doent print anyway
i also used
String vString = Integer.toString(i);
file is created but nothing in it
</code>
any help

[This message has been edited by gul khan (edited March 03, 2001).]
dear fellows can any body tell me what is best ide for building java , jbuilder,visual age or some more cool
thanx
can any body explain(more elaborately) why that code did not work
19 years ago
i wish to make exe (though platform specific ) file of java in windows .
any help in doing this( actually don't know what utility can do this)
thanx in advance
19 years ago
can some body clerify me what is meant actually by line feed and carriage return.
thanx
mport java.io.*;
class Characters {
public static void main(String [] args) throws IOException{
char vChar;
PrintWriter out= new PrintWriter(new BufferedWriter(new FileWriter("Characters.txt")));
for (int i=33;i<255;i++) {
vChar=(char) i;
System.out.println("<Number :"+i+" In Character is: "+vChar+">");
String vString= "<Number :"+i+" In Character is: "+vChar+">";
out.write(vString);
}
}
this file produces output to consele and also creates file "Character.txt" but file is empty
i m unable to figure out why?
any comment.

import java.io.*;
public class Type2
{
public static void main(
String args[]) throws Exception
{
BufferedInputStream bis= new BufferedInputStream(System.in);
int read = 0;
while ((read= (char) bis.read()) != 'q')
{
System.out.println("in");
}
System.out.println("out");
}
}
Strange results if type 1 and then eter result is in 3 times why?

Strange results if type 1 and then eter result is in 3 times why?

[This message has been edited by Peter Tran (edited February 21, 2001).]
19 years ago

i have tried to wrote a class in which i tried to get input from user to populate an array but it results strange
class is
import java.io.*;
class arrayByConsole {
public static void main(String[] args) throws IOException {
BufferedInputStream bis =new BufferedInputStream(System.in);
int myValue=0;
byte[] Array =new byte[8];
System.out.println("Enter number and '10' to exit:");
do
{
Array[myValue]=(byte)bis.read();
myValue=myValue+1;
if (myValue>Array.length)
break;
}
while (Array[myValue-1]!=10);
for (int i=0;i<Array.length;i++){>
System.out.println(Array[i]);
}
}
}
Result is
Enter number and '10' to exit:
233410
50
51
51
52
49
48
13
10
Press any key to continue . . .
any comments and help will be appriciated
dear fellows i wisht to take scjd but before this i wish to see the asignment.
can any body tell me can any body give me a copy of this (uncomplete as if it seems ok i will get myself registered)
if possible plz tell me
hello fellows in
print stream api it is written that
PrintWriter
public PrintWriter(OutputStream out,
boolean autoFlush)
Create a new PrintWriter from an existing OutputStream. This convenience constructor creates the necessary intermediate OutputStreamWriter, which will convert characters into bytes using the default character encoding.
Parameters:
out - An output stream
autoFlush - A boolean; if true, the println() methods will flush the output buffer

i m not sure what this autoflush true does , what i think is it reads line and when new line character is found it flushes
is it?