satish

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

Recent posts by satish

Java tutorial mentions that one of the uses of Finally section is to close any open IO streams. That's what I did in the following code. However, I get "IoTest2.java [30:1] unreported exception java.io.IOException; must be caught or declared to be thrown" error when I compile the code. How should I hadle exceptions thrown in Finally section?

import java.io.*;
public class IoTest2 {

/** Creates a new instance of IoTest2 */
public IoTest2() {
}

public static void main(String[] args){

File f1 = new File("c:\\testfile");
FileReader in = null;
try {
f1.createNewFile();
in = new FileReader(f1);
} catch(IOException e) {
System.out.println(e.getMessage());
} finally {
in.close();
}
}
}
20 years ago
I should've searched the forum before posting. I found answers by searching in earlier posts...here is a useful link.
http://java.sun.com/products/jfc/tsc/articles/mixing/index.html
20 years ago
I came across the term light weight component while reading about Swing. What does it mean?
20 years ago
I have jdk1.3 installed on my system. So when I run java web server I want to use 1.3 version JVM rather than the older JVM that comes bundled with java web sever. In order to do that I ran java web server in nojre mode (ie httpdnojre) but I got java.lang.AbstractMethodError. Has any one faced a similar problem ? Please let me know how to get around this.
Thank you
24 years ago
Thanks William. I already did what you said.
I haven't done any changes but it is working now. The only difference is that I was connected to my office network earlier and now I am in a stand alone mode. Does it matter ?
24 years ago
Rao,
I seem to be having the same problem. Could you tell me what you did to get rid of it ?
Regards,
Satish
24 years ago
I downloaded tomcat and extracted all the files to my hard disk. I clicked on the startup.bat. Tomcat seems to be up abd running since I haven't got any error messages. I am using Win NT4.0 and netscape browser.
I opened the browser and typed http://localhost:8080/. Netscape comes up with an error window saying that 'the document contained no data. Try again later or contact your sevrer's administrator". When I type http://127.0.0.1:8080/, it take me to a html page that talks about microsoft nt 4.0 option pack where something about internet server samples is mentioned.
Can any one tell me how to run the samplet servlets that come with TomCat? I want to check if installation is perfect and tomcat is running.
Thank you.
[This message has been edited by sat (edited August 10, 2000).]
24 years ago
Monty, I mailed my java files to you. Thanks for helping me
Monty,
Hope you had a nice time at the beach.
I am using JDK1.3 and Netscape 4.73. I am not using any IDEs.
I checked again. My applet works perfectly alright within the browser but while running it using applet viewer throws access control exception.
I read somewhere that appletviewer assumes all applets are trusted ones and hence it does not check for security. In my case, the opposite is happening. As you said this may because my browser doesn't support JDK1.3 related JVM.
I haven't used any jar files. i don't see any problem with class path.
Regards,
Satish
I've gone through the netscape preferences to see if can lower the security guard. I could not find anything related.
All of a sudden my applet started working fine in the browser. I didn't change any code. However if i run the same applet using applet viewer, i still get the access control exception
I am new to jdbc. I got the following error while i was trying to load driver from an applet. I understand that browsers have some security restrictions for accessing the files. Can any one tell me how to get around this problem ?
(my html doc and database are on the local machine)
java.security.AccessControlException:
access denied (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc)
I don't think garbage collection ensures that your program never runs out of memory. You can code in such a way that you leave references to objects but don't use those objects anymore. Garbage collection can act on only objects that do not have any references.
Regarding the finalize method...to my knowledge, finalize method will be called (if it exists) before removing the object. However if you resurrect your object reference in finalize method then the finalize method will not be called again when u remove the reference to the object later. So, finalize method is called only once for an object.
I am really not sure if I would not select answer d. Inspite of the above scenario, my instinct would be to select d. I am also interested in knowing what others think about this.
satish
You don't need the voucher in physical form. All you need is the voucher number. If you buy through your credit card, you can call Sun and get the voucher number instantly. You may schedule your appointment by calling up Sylvan and quoting your voucher number.
satish
1 gets printed...Do you see anything fishy here ?
Tony,
I, having been a frequent visitor to java ranch, would be a fool if I failed to notice that you were the one who was interviewed.
Good Show !!
Satish