Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~19.6K People Reached
Member Avatar for slasherpunk

I'm trying to run a simple servlet that counts the number of times a user visits the page using cookies but I'm getting the following error. I thought that NullPointerException was because there were no cookies at all in the browser. But after checking I found a couple of cookies …

Member Avatar for NormR1
0
327
Member Avatar for slasherpunk

Even after setting all the paths correctly, I get an error saying the "setclasspath.sh" cannot be found. I checked the directory and it was there. I then changed the permissions using chmod +x setclasspath.sh but to no avail. I've changed the permissions of all the files inside the "bin" directory …

Member Avatar for slasherpunk
0
192
Member Avatar for slasherpunk

System Information: OS: Ubuntu 11.10 Server: Tomcat 7.0 JVM: openjdk 1.6 I have checked if the server is running by going to [url]http://localhost:8080[/url]. It's working fine. I just need to know the directory in which I should save my servlet in order to run it. I think I am supposed …

Member Avatar for peter_budo
0
143
Member Avatar for slasherpunk

So, I wrote the following program to connect to my local mysql server and create a table in the existing "test" database. The program compiled without any errors, but I got the following run-time error: java.sql.SQLException: Cannot connect to MySQL server on localhost:3306. Is there a MySQL server running on …

Member Avatar for slasherpunk
0
15K
Member Avatar for slasherpunk

I have created a window containing only one button(park1). All I need is a new dialog(with "OK" and "Cancel" buttons to open when I click on park1. Thanks in advance. [CODE] import java.awt.*; import java.awt.event.*; import javax.swing.*; class MyWin extends JFrame implements ActionListener { JButton park1; MyWin() { setSize(450, 500); …

Member Avatar for mKorbel
0
3K
Member Avatar for slasherpunk

So I know of two methods of reading or writing files in java. The first is the read(byte[]) method provided by InputStream class. The second is the readLine or write() method provide by the Buffered prototype. Which is the more efficient one out of these? Which one would you recommend?

Member Avatar for JamesCherrill
0
153
Member Avatar for slasherpunk

OpenDNS tracert results: C:\>tracert -d 208.67.222.222 Tracing route to 208.67.222.222 over a maximum of 30 hops 1 <1 ms <1 ms <1 ms 192.168.1.1 2 36 ms 40 ms 39 ms 117.195.32.1 3 35 ms 35 ms 38 ms 218.248.164.38 4 41 ms 39 ms 41 ms 218.248.255.86 5 41 …

Member Avatar for wldake
0
407
Member Avatar for slasherpunk

[CODE]class MyThread1 implements Runnable { Thread t; MyThread1() { t = new Thread(this);//create a Thread t.start();//activate the thread } public void run() //override run() of Runnable { int i; for(i =0; i< 1000; i++) System.out.print("*"); } public static void main(String args[]) { MyThread1 m1 = new MyThread1(); int i; for(i …

Member Avatar for JamesCherrill
0
169
Member Avatar for winecoding

I have a generic text file, which can be composed of text data and numerical values, like an article. It can have multiple paragraphs/lines and have various types of delimiters. My general purpose is to tokenize this text file into a string array. I am quite confusing on how to …

Member Avatar for JamesCherrill
0
244
Member Avatar for chiiqui

I am working on may code and I received a null pointer error , how do I fix this? all I wanted to do was remove the selected array here's my code [CODE] import java.util.Scanner; public class Game { public static void main(String args[]){ Scanner input = new Scanner( System.in …

Member Avatar for Majestics
0
239
Member Avatar for slasherpunk

Isn't it better to use the BufferedReader function readLine() instead of read() or read(byte[])? The reason I ask is because of potential memory wastage by the read() function. If I specify a byte array of size 10, then it will become capable of accepting ten bytes from the transmitter. However, …

Member Avatar for Rameshwar Soni
0
194