Quick quesion about threads...

2013 byte By jim_1_a at 2007-9-29 0:03:26
I know that when Thread.start creates the new Thread, there is usually a delay before the new thread is created, and Thread.run is called.What I want to do is overide start() so that it does not return until the new thread has actualy started in it's run method.Can anyone think of a good way ...

Problem creating an ImageMap

1404 byte By rahman5000a at 2007-9-29 0:18:03
I've got to draw a ImageMap that changes during run time. Thats why I have to draw the extra Images ontop of the background image and they also have to be put in varying places and sizes. I need to make these extra images to trigger another method when they are clicked. The MapFrame class ...

error?

1036 byte By J12345678Ta at 2007-9-29 0:28:25
in new and have got this error that i can't solve in my program.. any tips to solve it?Thanks ERROR:int expected but not found in file- exiting program reordering.openFile("reorder.txt",'w');stocky2.openFile("stock2.txt",'a');stocky.openFile("stock.txt",'r'); ...

finding a class instance.

281 byte By sngollaa at 2007-9-29 0:55:55
how to control a class that should not create a more than one instance and if user trying to create more than a instance then user should get the message that class is already instantiaed.what is a single ton pattern and how the java is related to single ton pattern.

Block some keys in a JEditorPane

224 byte By HenrySmith2002a at 2007-9-29 0:58:24
I have a JEditorPane and i need to block the keyboard, when an user digits 255 or more characters, but some keys ,( like : "ENTER", "arrows" or "BACKSPACE") must continue unblocked.Thanks for your help.... (Y)

HotJava...

1120 byte By Allopza at 2007-9-29 1:07:25
i have j2sdk1.4.1_02 in my pc. i have made an applet using the sdk. i works fine by using appletviewer but i can't load it in Hotjava 3.0 ,when i click at the 'broken' picture (where the applet suppose to have), an exception notice appeared:_HelloWorldApplet: class not loaded: ...

Implementing set interface

637 byte By AngeloCaesara at 2007-9-29 1:11:17
hi.i have to implement a set interface in such a way that when the markers mark the code, they can call DSASet xyz = new DSASet()we have to make any data structures ourslves, as per any university assignment. i basically understand how sets work to a degree, and using them, but im not sure how ...

tftp/ftp server and client

172 byte By knoowmeea at 2007-9-29 1:23:33
hi everybodyif any one of you can tell me where i could get source code of tftp/ftp server and client in java. i need it very urgent.thanks and regards

Java multiple class file

5856 byte By whasian85a at 2007-9-29 1:50:53
I just started learning JAVA a couple of days ago and the first program I wrote had two classes in one file. here is the program :class fib_num {public int value;public boolean is_even;} class Fibonacci {/** Print the Fibonacci sequence for values < MAX and mark even numbers with an asterick ...

How to edit JTree in Sun One Studio?

178 byte By dljfslkjfslkfjlsfja at 2007-9-29 1:58:19
How do you edit JTree in Sun One Studio. I have clicked around the properties for the celleditor, but I can't figure out how to do it. Can anyone explain please, thanks.

jvm memory

566 byte By ISDavisa at 2007-9-29 1:58:44
I'm having problems with out of memory areas in a big simulation.When I look at Runtime.getFreeMemory() this always indicates there is plenty of memory leftI know that Runtime.getTotalMemory() returns the total size of all 3 heaps (Young, Old, Perm), but what exactly is getFreeMemory() ...

who called System.exit()?

485 byte By asjfa at 2007-9-29 2:06:08
hi, is there a way to find out where System.exit is being called from? I have a program that stops abruptly for no reason, and am guessing that System.exit is being called from some of the third party code somewhere.what would be ideal is if I could get a full stack trace whenever System.exit ...

reload class

818 byte By fbaldasseronia at 2007-9-29 2:07:38
I have wrote a container for servlet, now I need to reload a servlet from a my container. to do this, I define:String nameSrv = "myservlet";URL[] urlsToLoadFrom = new URL[]{new URL("file:"+ System.getProperty("user.dir") + System.getProperty("file.separator") + ...

Whiteboard TEXT

699 byte By kalyan_bha at 2007-9-29 2:07:48
I developed a whiteboard . To add minimum features to it I have come up on an idea of having a text tool . The tool should be in such a way that the user can type his text onto the canvas directly without disturbing its behind graphics . Is there a solution for this . I tried adding a JTextPane ...

Universal Browser Launch

721 byte By pilaftanka at 2007-9-29 2:11:11
If for nothing else besides directing users to your home page or support page on the web, almost all applications need (or could use) the ability to open a web page. Unfortunately, this currently requires a fair amount of platform specific code to implement in Java. It would be great if Java ...

JDK 1.4.2 NTLM Support?Problems with IIS

250 byte By colinabirda at 2007-9-29 2:11:49
Has anyone got the NTLM support in java 1.4.2 to work with MS Internet Information Server (IIS)? I can get the Apache group's httpclient to work, but using the java 1.4.2 authenticator stuff always gives me a status code 500 from the server.

Can Thread Reference be stored anywhere ?

616 byte By kumarnaresha at 2007-9-29 2:22:38
Hi All,I need to write an java class which would monitor a directory for new files and process the file if one arrives.I am planning to write this as a Thread. Is it possible to start and stop this Thread using a start and stop script ? I know starting should be straight forward. But for ...

Sun certification informations wanted

167 byte By Anurag_Shindea at 2007-9-29 2:29:04
hi this is anurag from india would like to know aboutsun certification ,its steps paper wise,fees (indian currency)and centers( mumbai,maharshtra)

Logger of the java.util.Logging

2344 byte By jiapei_jena at 2007-9-29 2:32:43
Hi, I am learning to use logger. I have a code snippet below:code:import java.util.Properties;import java.util.logging.logger;import java.io.FileInputStream;import java.io.IOException;public class className {private static Logger logger = Logger.getLogger( "com.wombat.nose" );private Connection ...

jsp / java read excel

221 byte By Vancia at 2007-9-29 2:38:41
Can anyone tell me that how to read MS excel file in jsp. Also, I need to upload this excel file and display in my web page.Or it can not be done in jsp.Please suggestion me some ideas.Thanks.

Dragging Images

546 byte By combatc2a at 2007-9-29 2:38:49
Hi, I am trying to make a Tic Tac Toe game in java, and one of the things i am trying to do is make it so you drag the X's and O's to their spot as you would a chess game. Ive tried using setLayer but didnt work because it takes a component and not an image for the first argument. I also ...

shell script in linux

1122 byte By flowertanga at 2007-9-29 2:43:07
I want to create a user account in Java in linux platform. This program run on linux.I have tried:<! =========================================================== !>import java.io.IOException;import java.lang.Runtime;try { Process proc = Runtime.getRuntime().exec("adduser " + ...

Does 'this' pointer on call stack represent a reference?

286 byte By StarTurtlea at 2007-9-29 2:45:48
This is a quickie. Does the 'this' pointer on the call stack represent a reference to the Object it points to? I mean it seems obvious that an Object can't be marked for deletion if a call made on an object is still sitting on the stack, but I want to make sure.

GUI

459 byte By prsena at 2007-9-29 2:46:35
im developing a quizzing application to work in a LAN setup (and am new to JAVA). I want to restrict the contestants to access data on the computer..... i think this can be done if my application covers the whole screen and the user has to quit before he tries to access the data. how can i ...

Problem creating package structure and where is my .class file?

1261 byte By needsolutiona at 2007-9-29 2:53:38
Working on Tomcat I have my folder structure like this...webapps->app_root->WEB-INF->classes->src-> .java files->META_INFIn the command prompt i compile using thisc:\Program Files\Apache Tomcat 4.0\webapps\Murthy\WEB-INF\classes>javac -d src\*.java and in my java files I ...

drivers

300 byte By conor_fitzgeralda at 2007-9-29 2:58:23
Can any one help me out with thisI am currently looking for java drivers (or just drivers) for the following protocols OPC,SECSII,Modbus www.ergotech.com seem like to be the only company i can find doing this with a java driver for OPC,SECSIIThanks for any help in ...

JtextFields

844 byte By Zeta31a at 2007-9-29 3:00:46
Hi--I am trying to write a program that takes out every fifth word and puts a blank JTextField there (it is called a clozed test--to test reading comprehension). The thing is, some of the text fields that pop up, will only allow one character to be entered and then immediately jumps to the next ...

ObjectInputStream Memory Leak Problem

264 byte By justingoyanko1a at 2007-9-29 3:11:01
Hi i've been having problems with an object = objectIn.readObject();<...>objectIn.close();apparently in jdk 1.4.0 there's a memory leak as the above statementis enclosed in a while loop. Has anyone solved this yet?

Host bits from subnetmask

182 byte By nilka at 2007-9-29 3:13:38
How would you determine the number of host bits (as an int type) given the subnet mask, and IP address?(Both IP & subnetmask are the type of InetAddress.)nil

Detecting machines on the same network

723 byte By hari52a at 2007-9-29 3:19:50
I have a server machine where I have a java program that listens on a port for incoming connections. Once a connection is made from a machine(HOST), another machine(CLIENT) can connect to the HOST machine thru the java server.The only requirement for the above to work is that both machines must ...

to convert Object to string

87 byte By avinash_gorea at 2007-9-29 3:21:07
Please help me to convert Object to stringor Object array to String array

Tic Tac Toe--need help!

2700 byte By combatc2a at 2007-9-29 3:23:27
Im making a tic tac toe game and everything works fine until you try to click the third set of blocks in order to put your X or Y in it. The program does nothing, it even seems as if the mouseDown function isnt working.......can someone help (Code below)''''''''''''import ...

Stop execution

725 byte By AmenoDeserta at 2007-9-29 3:26:59
Hi all,I'm using a third party tool wich is started using a class containing a main method.I'm calling this main method from within my application (Java). All is working fine!The tool is starting some threads wich are running forever until the application is killed. When starting the tool on ...

** plz solve this networking problem **

1147 byte By Fahad_SSUETa at 2007-9-29 3:27:21
Hi,Whenever I tried to run the following program I got exceptions. Remember I am connected to the internet while running this code.import java.net.*;import java.io.*;class Whois{public static void main(String args[]) throws Exception{int c;Socket s = new Socket("internic.net",43);InputStream in ...

Question on Struts

729 byte By ahsenullaha at 2007-9-29 3:30:07
Hi,I am fairly new to struts and couldn't find the appropriate message board to post the question. I am trying to run the basic register username example. I am using lite WebServer as my server. When i am trying to view my register.jsp page in the browser, i get this error ...

method for a random number generator?

267 byte By huvsa at 2007-9-29 3:37:53
I need a method to generate a random number between zero and X, X being a variable set by my program. The only method I can find is Math.random(), which generates a number between 0.0 and 1.0. (Of course, I can multiply to make it an int). Can you help me out?

Textfield problem

268 byte By j_meena at 2007-9-29 3:50:17
I am working in AWT (JDK 1.4.1).How to disable/enable the textevent so that textvaluechanged method can be prevented from calling.I have already tried with disabling the textevent,removing the textlisteners .Nothing worksIs there a way out?//////

checkWins() not working?

1222 byte By combatc2a at 2007-9-29 3:51:41
Hi again, im still working on the TicTacToe game and its coming along very well thanks to you all. Well, i made a method checkWins() and call it from the mouseReleased method. It checks for wins (of course) in each row column and the diagonals. My method was to make two int array(X and O) and ...

StringBuffer question

536 byte By olaboraa at 2007-9-29 3:55:33
Hello,Inside the append method of StringBuffer, will concatenation using "+" work in the same way as it works for String. ?int count;StringBugger list = new StringBuffer("some string");for(count=0; count < <some value>; count++) {list.append("some string" + count + "some other string" ...

ObjectStream

516 byte By toschenka at 2007-9-29 4:07:44
Hi,I have the following problem:I want to write an application, that communicates bi-directional through the network by sending Objects via ObjectInputStream and ObjectOutputStream. So far, this is no problem.But if I want to send one instance of an Object two or more times, the receiver always ...

importing packages and classes

631 byte By vibhor_1984a at 2007-9-29 4:08:29
hi everybody,i would like to know that when we want to import classes that are not present in the directory that we are currently working in then how do we import them. for example i was working in a directory say "y" that was a subdirectory of "x". in other words "x" is the parent directory. ...

Accessing methods such as System.getProperty() methods from applets

394 byte By vibhor_1984a at 2007-9-29 4:15:08
hi everybody, I have a piece of code that contains lines saying System.getProperty(), that is they call the getProperty() method of the System class. I want to access this code from an applet but the SecurityManager gives an AccessControl exception. I would be very thankful to you if you could ...

NoRouteToHostException

1179 byte By siemens175a at 2007-9-29 4:15:54
i have developed the mail client..but when i click SEND MAIl i get this error msgNoRouteToHostExceptionhow can it be solved?NOTE:develop a mail user agent in Java with the following characteristics:Provides a graphical interface for the sender,with fields for sender's email ...

Alternative to System.getProperties() in applets

444 byte By vibhor_1984a at 2007-9-29 4:16:10
hi everybody,i have a piece of code that contains calls to the getProperties() method of the System class. for example : Properties props = System.getProperties();As expected this method cannot be accessed from applets (AccessControl exception is thrown). I will be very thankful to you if you ...

Java HttpURLConnection & post requests

2251 byte By mrincodia at 2007-9-29 4:16:16
Hi to everyone. I really need your help. Please, please!I am using the following code for HTTP post sendings:String Direccion="https://theaddress.com/theperlcgi.pl";//SSL ConnectionURL url = new URL(Direccion);HttpURLConnection http = (HttpURLConnection)url.openConnection();//Stablish some ...

I want to know at which port the modem comuniacte

186 byte By avinash_gorea at 2007-9-29 4:18:12
I want to know at which port the modem comuniacte for the first time .i want to read the port using socke programming plz help me.How to read the portRegards,

Linux including HotJava Browser

1778 byte By chriscoltena at 2007-9-29 4:23:37
Hi!I've always the same problem with HotJava under Linux (Suse 6.4, Kernel v2.2.14, JDK1.1.6). Sometimes I can start the browser without having troubles but often there appears the following error-message in the console and just the HotJava start Display is "burned" in the Desktop (goto ...

OutOfMemory Error

290 byte By vibhor_1984a at 2007-9-29 4:24:25
hi everybody,i am trying to run a program as an applet and i am getting an outofmemory error. java.lang.OutOfMemoryError<<no stack trace available>>i will be very thankful to you if you could please tell me of a way to get round this problem.

Applet working in netscape but not in internet explorer

373 byte By vibhor_1984a at 2007-9-29 4:33:08
hi everybody,i have an applet that has got buttons on it and as expected an action is performed when they are clicked. the applet opens and functions in netscape but in internet explorer it just opens up but the buttons donot function and no error is thrown as well. i will be very thankful to ...

Loading Classes

394 byte By Jennifer_Leea at 2007-9-29 4:41:42
Hi,Here is my problem. I have a directory with several classes (foo_1, foo_2, ...) which all extend a base class (foo); I want to create a vector with an instance of each class in it. The problem is I dont know what the classes will be called or even how many classes will be in the directory ...