Help - Dialogs

300 byte By chepe0827a at 2007-9-29 15:31:35
Please help me with this.I need to know how do i save a file, i am using FileDialog.LOAD and i need to know how to use FileDialog.SAVE, the thing is, i'm using a TextArea where i write something and i have to save this in a txt file.how do i do that.Tanks for helping ...

please help me

290 byte By IneedHelpPleasea at 2007-9-29 15:34:03
How do u get a decimal to work on java..like for a calculator? I have no idea how to do it because there's no way to do exponents in Java, apparently.public void pressOne () {if (wholeNumber= true)display = ONE + display * 10;elsedisplay =

Where put the JAR File jakarta-regexp-1.3.jar ?

519 byte By vahedasa at 2007-9-29 15:47:32
I'download jakarta-regexp-1.3.jar file from jakarta-apach site for validate a email adress..But i did not find any doc to telle me where put this file..I put it in the jre subdirectory of my sdk directory but the javac compilerdo not recognize this part of my code import org.apache.regexp.* ...

Searching and replacing string

403 byte By shaninaa at 2007-9-29 15:50:55
Friends,I want to replace some values in the property file from my java application.ie my propert file contain a key value pairdefDir=<dir name>I want to set this value from my application.ie I ahve to change the value in the file from my application.I am useing ResouceBundler for reading ...

.currentThread().getContextClassLoader().loadClass(value)

343 byte By himanshu.guptaa at 2007-9-29 15:56:16
HiWhat the difference between Thread.currentThread().getContextClassLoader().loadClass(value) and Class.forname(value)?I'm using property files and storing the name of class file in propert file .I want to use Class.forname(value).In that condition how I'll create the instance of the ...

big String?

213 byte By steppe2a at 2007-9-29 16:02:34
Is there an Object that can contain more text than a String (more than 255 characters)I need an Object to store the text of a message on a forum ...Any idea?thanksgrsteppe

help on Static synchronized methods

208 byte By husanea at 2007-9-29 16:07:27
Hi,When a thread is executing in a static synchronized method on a class, can any other thread execute in a non-static synchronized method of an instance of that class? thanksroger

Please help-- system command

247 byte By newtojava995a at 2007-9-29 16:07:41
Hican someone tell me how to embed a command line in my java code?for example to send email using my java program. The operating system can execute this command line.Is it the system class? Please help.Thank you.

Formatting a string

370 byte By patelk9a at 2007-9-29 16:09:18
Hi,I am trying to format a string e.g. "ou=Applications"to just extract the "Application" part of the string?I think you can use the StringTokenizer class and "=" as a delimeter, but I tried that and it did not work for me!Can someone please tell me how to do this and give me an example piece ...

System call fom Java code

680 byte By udaysasia at 2007-9-29 16:12:41
Hi allI hope someone over here might answer my problem. I need to run a Shell script form my Java code, which does perform some operations like writing/copying files to a specific directory and my Java code then starts reading the files and do necessary stuff like parsing it for some info ...

What Are the Differences Between ...

73 byte By jiapei_jena at 2007-9-29 16:19:02
What are the differences between java.util.date and java.sql.date?

Type casting

341 byte By himanshu.guptaa at 2007-9-29 16:22:59
Hi,1) I want to know is it possible that we can send a class reference in url.2) How to type cast the String into User defined class reference variable.I've written these in my fileObject obj = (Object)req.getParameter("credentials");credentials = ...

StringTokenizer error

5267 byte By patelk9a at 2007-9-29 16:23:38
Hi,I am running a JSP page, which contains two HTML forms. I have given the part of the code which I am having trouble with below. The forms basically submit a field from a drop down list (call it "dropdown list 1" for explaination purposes), which according to what is selected, populates ...

A question of the execution order of Java program

520 byte By elensiaa at 2007-9-29 16:28:50
Hi,all. I'm a fresher of java programming.I want to know the execution order of the follow class:public class example{int aProperty = 10; // No. 1private example(){// No. 2...}public static void main(String args[]){....} // No. 3}Can you help me to ensure the execution steps of No. 1 2 and 3 ...

Reading Keys from Resource Budle

317 byte By sunilhegdea at 2007-9-29 16:31:09
Hi,I am trying to read keys from resource bundle to enumeration object.the code i have written is Enumeration enum = bundle.getKeys();this one adds keys odd number keys first and even number keys later ( i,e 1,3,5,... later 2,4,..) I want keys in order , how can i achive ...

urgent help on reading data into ByteBuffer

1398 byte By Erictoma at 2007-9-29 16:31:38
Hi, I am trying to read data into ByteBuffer using SocketChannel.The following code working fine but the problem is with ByteBuffer size.The data varies from request to request .How do I read data into ByteBuffer with out specifing size .The problem with size is some records has more than 500 ...

How does synchronized work?

242 byte By aliaga at 2007-9-29 16:35:58
Hi, I want to know how does synchronized work. There is one object which has two synchronized methods, if one thread visits one method, other thread can visit another method at the same time?Thank you.Regards,aliag

Serializable Interface or Abstract class?

483 byte By writetoraja at 2007-9-29 16:36:39
If we have to do custom serialization we have to implement private void writeObject(java.io.ObjectOutputStream out)throws IOException private void readObject(java.io.ObjectInputStream in)throws IOException, ClassNotFoundExceptionWhere is the default implementation of these methods? if it is ...

How to timeout a blocked InputStream of URLConnection?

4386 byte By java_playera at 2007-9-29 16:38:37
Hi Java Gurus,Similar questions have been asked on this problem. But, I have not come across any feasible solution that works!I have also seen that most of the work arounds given is to use threads.I tried, but not able to interrupt the main thread.Here is a snippet of my code. public MyClass ...

jdbc

900 byte By j2me_raja at 2007-9-29 16:42:49
HiI have written an application which reads records from "transaction" table and inserts in another table ("master") and deletes the record from "transaction" table from where it picked. Later it will process the few columns of the record to some other application and finally some changed ...

need help on jar file

115 byte By deepakkumarvermaa at 2007-9-29 16:48:55
hello sir,i want to know that , how we can create .exe file in java. If yes, then help me in details.

need help for making .exe files in java

115 byte By deepakkumarvermaa at 2007-9-29 16:48:57
hello sir,i want to know that , how we can create .exe file in java. If yes, then help me in details.

java.IO.IOException >connection reset!

2048 byte By abhishekDa at 2007-9-29 16:50:06
hi all,We have this application based on client server architecture.Client and server are more or less symmetrical.Now the problemis code works fine when we run it on same machine but when we runclient and server on two different machines program raises exception.File is transferred without any ...

compareTo and sorting problems.

724 byte By DK21a at 2007-9-29 17:02:23
hi all,and thanks a lot for your help.I have created the following class which as you can see creates an object and can sort an array of such objects with respect to the deadline variable using the compareTo method.import java.util.Date;public class Task {Date deadline;long runtime;public int ...

NullPointer in Listener method

1706 byte By achsasxa at 2007-9-29 17:10:50
Hello!I have a very strange problem with the following piece of code:public class Acquire extends ....{private Panel panelTimer;private JPanel panelMode;public Acquire() {panelTimer = new PanelTimer();panelMode = new PanelMode();panelTimer.doSomething(); // works fine ...

CURSOR

212 byte By chepe0827a at 2007-9-29 17:15:20
I need to know how to make a custom_cursor.The thing is that i need to change the cursor "image" to a gif image.I know that there is a way to do it.Please somebody help me.Tanks

Checking if two instances are of the same type

336 byte By harrypostmaa at 2007-9-29 17:17:55
Hi all,Please, can you advise me?I want to check if two variables are instances of the same class. It can be done by the following line, but is it full proof? Or is there a more elegant way to do this?a.getClass().getName().equals( b.getClass().getName() )Many thanks.Best ...

What is 100% pure java?

56 byte By DPJavaa at 2007-9-29 17:35:22
A philosophy?A style?I dont know...

charts / graphs

155 byte By tarun22_2000a at 2007-9-29 17:40:34
Hi,can anyone suggest some good charting / graphs apis/tools that could be used for browser ( image based or through applets ).Thanks

Applet not opening in netscape 4.8

2373 byte By kamasastrya at 2007-9-29 17:41:33
we are facing different kind of problem in Netscape 4.8.First user will enter number of images to be upload. Once user selects the number of images, click on submit, we will display number of applet that user enters. Its working fine in IE and Netscape 7.x. But we are facing problem in ...

[Help]Open a File

242 byte By hoshawna at 2007-9-29 17:44:53
Hi, Here is what I want. A user clicks a "Help" menu-item, and it opens "Help.pdf" or "Help.doc" automatically on the screen without a JFileChooser. If anyone has an idea, please, help me. Thank you.

position of thumb in a JScrollPane

268 byte By hoshawna at 2007-9-29 17:44:59
I add a JtextArea to a JScrollPane. The JTextArea reads contents from a file, so the thumb of the JScrollPane goes all the way down. After that, how do I make the thumb move up in my code? That is, how do I control the position of thumb?Thank you.

Error is my code please help

3133 byte By lupegara at 2007-9-29 17:47:04
I have created a try-catch statement, I have also created a home made Invalid value exception class. I have also thrown the InvalidValueException in a calculate method in a seperate class. I am getting the error of unreachable catch block. Here is my code for this process. Please Helpprivate ...

Do you know how to extract jar files

71 byte By lupegara at 2007-9-29 17:47:06
Does anyone have code that will extract classes from a jar file?

about socket I/O! Urgent!!!

988 byte By alexela_1999a at 2007-9-29 17:47:33
I encounterd this problem when programming with socket:On my server side, I construct ObjectOutputStream(socket.getOutputStream()) each time when socket is getted by handler from queue, and the client side, use ObjectInputStream(socket.getInputStream()) to accept responses. But the problem is, ...

A problem with JExcel.

208 byte By Palmer_Tsea at 2007-9-29 17:49:12
Hi, all, Have there someone be familiar with JExcel?I have a problem when I try to write some data into a xls file.I want to merge two cells, and how can I do it?Thanks in advance.

FileLock !!

786 byte By dharm0usa at 2007-9-29 17:56:41
when i run following code by $java check3nothing happens, no output comes, neither does the program terminate : import all;public class check3{public static void main(String[] args){ try{ String filename = "receixxveridfdfdf"; RandomAccessFile rf = new RandomAccessFile(filename,"rw"); ...

Referencing a non-static Interface in a static Method

3025 byte By jiapei_jena at 2007-9-29 17:56:53
I have a bean class, which accesses a data access object interface and the concrete class that implements that interface; therefore, I have a statement like:EditorDAO ed = new MySQLEditorDAO();There is a static method in this bean class. I got a compilation saying that the instance with the ...

Help me please

303 byte By matiaslopeza at 2007-9-29 17:58:24
Hello, I need if somebody can help me to find the serial number of the "license enterprise" in this file of javaThis software I need much and the price is much money and I cannot buy itThe java code it can find it in http://www.rpdgratis.com.ar/radius.txtThank you very much ...

sockets

376 byte By j2me_raja at 2007-9-29 18:03:50
HiCan anyone help me out with sockets. I have created a client socket which will continuously listen at a port for data. But there is sever problem that its taking 98% of CPU usage. can any one help me out with better programming techniques.note: my socket should listen continuously as my ...

stop thread - InputStream

375 byte By XavierBugauda at 2007-9-29 18:10:57
Hi,The proper way to stop a thread seems to set up a flag in the thread. The thread just have to check the flag to know if it has to exit.In my case, I have a thread reading a BufferedInputStream.The read() methods of InputStream are blocking, so how the thread can check its flag ?Any idea ...

Problem in Closing ObjectInputStream

717 byte By cvidyawa at 2007-9-29 18:12:23
We have a server talking to client through socket. Server is reading from the socket using ObjectInputStream.readObject().When no messages are sent from the client, say for about 2 minutes, we are closing the ObjectInputStream through another thread spawned from a timer task. In Java 1.3, when ...

Read and write binary from txt file

349 byte By pamoralea at 2007-9-29 18:13:59
Welli need to know how to convert strings to binary data ("Chapter One">100111000011) to compress them using Lempel Ziv compression algorithm, and print a new file with binary codes.I know that i have to use OutputStream and ImputStream classes, but i don know how it works...Please help me ...

Vector from Binary

447 byte By pamoralea at 2007-9-29 18:15:18
how can i convert a binary code like [B@18fe7c3 into a Vector ?first i did this:Vector a= new Vector; // create a vector...//addElements.......String b=a.toString();//(b=[12, 2, 234, 5]) vector to stringbyte [] c=b.getBytes(); //string to bytesString d= c.toString(); //c="[B@18fe7c3" bytes to ...

single-signon in java

76 byte By davesatoa at 2007-9-29 18:21:39
looking for java implementation example of single signon ? thank you.

StreamTokenizer Empty Tokens

1444 byte By punukollusa at 2007-9-29 18:25:28
Hi ,Pls help me to identify the empty tokens.I'm using SteamTokenizer to parse the csv file.I need to treat all characters in the text as word and at the sameI need to identify empty tokens.Below is code that I have written. Right now it is unable to identify Empty tokens.The line to be parsed ...

Datagram Socket send different sizes Buffers ...

518 byte By Dr_Dukea at 2007-9-29 18:25:51
hi,I'm sending different sizes Datagrams from a datagram socket so how can I receive them I've tried to send the packet in two packets the first one is fixed size that carries the size of the real data then create a suitable buffer on the client side to receive the second packet but the ...

How does Thread.start() works ?

183 byte By praveen.ka at 2007-9-29 18:31:21
We use Thread.start() method to start a Thread Process , which internally calls run() method. why don't we call run() method directly? what does start() method do internally?

How to Stop a Thread?

75 byte By praveen.ka at 2007-9-29 18:31:22
How can we stop a Thread without using Thread.stop() method?

How to convert Word Doc to HTML doc using Java

215 byte By srinathreddy_ka at 2007-9-29 18:32:32
Hi friends,I have a situation where I need to convert a word document to html document using java.I dint get any idea about this. Can any one help on thisthanks in advance.Srinath.