1078 byte By
xyoon at 2007-9-30 5:54:17
Hi,I hope someone could explain the following problem.class Outer{class Inner extends Thread{ public void run() {}} public void man(String[] args){ new Inner().start();}} The above code returned compilation error. I fixed it by moving the new Inner().start()into the constructor of Outer ...
300 byte By
gopal_mk at 2007-9-30 5:57:28
What happens to the thread (if JVM is enabled for using green threads) executing IO block? Does it block the whole process? if, it doesn't block the process, how does it let the O/S know that the calling thread should not be blocked? Please help me understand the concept. ...
Hello! I loaded j2sdk_1.4.2_04 onto may machine and I wanted to test a simple hello program below.// Hello Pogrampublic class app{public static void main(String[] args){System.out.println("Hello from Java!");}}// End of Hello ProgramWhen I run it by typeing java app (note the file name is ...
Hello! Can anyone explain this message in beginners terms on what I need to do to resolve this problem? I am recompiling these java programs with jsdk1.4.2_04. Thanks for any help you can provide.defishjdbcConnection.java:45: org.peerdb.jdbcConnection is not abstract and does not override ...
Hello friends!I use InputStream and OutputStream for sockets to transfer bytes. I try to detect the length of array bybyte[] b = new byte[in.available()];From client socket I send byte array with 3 bytes like:byte[] b = {100,101,102};out.write(b);out.flush();but in the server's socket I got ...
i am a student and i am now working on a project. The project is to find out the identifier in a java file. I want to ask that, is there anyway useful API for searching the identifier or actually return the identifier name? thanks alot
658 byte By
manojwww at 2007-9-30 6:06:16
I have a text file in multiple line format and also in paragraph format. I need to read all lines till that paragraph ends. Here is the example ... One two three four fiveSix seven eight ninetenOne two three fourfiveOne two threeOne two threefour five sixseven eight ninetenSo... I need to read ...
274 byte By
vsandor at 2007-9-30 6:08:06
java.util.zip.Inflater.getTotalOut() method returns a negative integer for files larger than 0x7FFFFFFF bytes, which throws a ZipException. It should be corrected to return an unsigned long. Since posting a bug never works, I post it in the Developer's Forum.
325 byte By
rajveera at 2007-9-30 6:09:32
Hey, Can anyone help me regarding the source of tools.jar file. It was missing in the src zip file. So where can I find the source of tools.jar. I am particularly interested in the source of sun.tools.java.Constants Can anyone let me know where I can find that source file..-rajveera ...
Hello!I cant send byte data through sockets. Here is two classes:Socket Server:import java.io.*;import java.net.*;public class Server { public static final int PORT = 8080;public static void main(String[] args) throws IOException {InputStream in;ServerSocket s = new ServerSocket(PORT);try ...
270 byte By
lmarisa at 2007-9-30 6:11:45
Hello,I am hesitating between using the JExcel API and the Jakarta POI API to manipulate (rather simply) excel files with java.Has anyone experimented both? What are the drawbacks and the advantages of both?Thanks a lot,Laetitia
Hi, Can anyone tell me how to create Native printer font (ex: courier) in java under windows 98 operating system?Thanks
536 byte By
konio at 2007-9-30 6:16:55
I have a problem, with getting value of a variable that is set in thread. I start the Thread in a main class, thread gets the value from server and sets it as static variable. After starting the thread I try to print the value of" threadObjetc.staticvariable " but every time it has a null ...
Hi all,I'm using String.replaceAll() method to replace "(AAAA)" to "(0000AAAA)";The problem is the replaceAll() method can't recognise brace in the first parameter.That is,temp = "(AAAA), AAAA";temp = temp.replaceAll("(AAAA)", "(0000AAAA)");--> temp is "((0000AAAA)), (0000AAAA)"--> I ...
407 byte By
peddip at 2007-9-30 6:21:25
Hi,Is there any place which officially lists valid protocols when we create a java.net.URL?I have a url like "mms.://myserver.com/image.asf". I am unable to create a URL. It throws a MalformedURLException saying that "mms" is an unknown protocol.Is there any way I can make the java.net.URL ...
143 byte By
rajveera at 2007-9-30 6:21:42
Hey I am trying to write an editor for my own keywords and operators.Does java provide any framework for that?-raja
Hello all,I'm using HashMap to save key and object.The problem that I have is two of the key and value pairs are saved into same bucket. I tried same code with Hashtable, but same thing is happened.Why this thing is happened?
351 byte By
has_star at 2007-9-30 6:22:18
i have created a loop which is running from 1 - 10000.i that loop i am creating new thread and starting it. i don't what my program to run thousands of thread at a time . i want only 10 threads to run at a time, and new threads should be created only when one of the 10 thread completes.Please ...
hello, how are we? ^_^ i am trying ot place string on and image, i have converted the image into graphics object,and i have used drawString to draw the Text on the graphics object. but how do i convert the graphics object back to image object? or how should i go about it?thank youjason ...
505 byte By
love123 at 2007-9-30 6:29:01
hi i ma new to java language i have the following problem,supose we have two packages p1 and p2 .in which p1 contain class c1 and p2 contain the class c2.we put the class c1 and c2 in folder p1 and p2 respectively. if we import package p2 in class c1and compile the class c1 "c:\p1>javac ...
305 byte By
cone.cn at 2007-9-30 6:29:12
see the expressions (sorry, I'm a Chinese. I can a little English)boolean bl;if ( bl = false){// "="not "=="...}it has problems. but I compiled it ,and run. of course, the result has problems.I don't know why it can run. I use JDK 1.5 bete; ...
Hi I have a some that is running differently on two servers.I am trying to replace the charater that represents a non-breakingspace with &160; the HTML equivalent.The following code gives two diffrent results:java.util.regex.Pattern pattern =java.util.regex.Pattern.compile("\\u00C2\\u00A0"); if ...
I recently graduated and all searches for work ended without any success. I never got reply to my CV. Not even a single time. It is very upsetting and I start to think that I picked a wrong industry. If I post my CV here will anyone have a look and tells me what is wrong?
107 byte By
nasch_ at 2007-9-30 6:38:28
This seems to be the closest thing to a general-purpose forum after the latest "improvement."
317 byte By
Freddef at 2007-9-30 6:38:33
Hello, I am working on a program that has become very large... and apparently it is too large now...When I try to compile the program it generates an error, "code too large", the code has exceeded 10000 lines and now I dont know what to do. Anyone that has any ideas? Thankful for any ...
552 byte By
bolala at 2007-9-30 6:38:37
Do you think this whole forum sucks now that every good aspect of it is gone? If you were asked to pay a monthly subscription so as to gain access to all those areas, would? I think Sun wants to introduce a subscription based forum. This is due to students coming in here to get their home work ...
Hi just a quick question. I have been programming in java at least 4, 5 year by now and I feel rather comfortable with programming in java. However, just other day I hit problem with java which I was hoping someone on this forum can fill in for me.Now please consider following simple ...
1326 byte By
chred123 at 2007-9-30 6:41:18
Hi guys,I am having a conflict in the versions of the java, C:\>java -versionjava version "1.3.1_01"Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01)Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)C:\WINNT\system32>java -versionjava version "1.4.2_04"Java(TM) 2 ...
468 byte By
teka at 2007-9-30 6:42:18
Is there anything more than performance reasons to always implement hashCode when you implement equals? If I understand correctly, when you put items in a hashtable it chooses the bucket by the hashcode and checks there is no equal item with the equals method. So it should still work if you ...
I have a Pentium 3 PC with 512 MB ram. I installed Jdk 1.4 and have set the path to point to lib and bin.I am able to successfully execute javac, java commands.however, when i try to run a java application, it says 'ClassDefNotFoundException'.I could resolve this error by giving the path in ...
hello.i require a textfield and i want that it have speciall format in inputs data .for example it accept only in formatYear / Mounth / Day or yyyy/mm/dd or .....please help me thanks
i want to know if there is a syntax error than the j2sdk compiler(1.4.2) dont recognize it, for example, if i write :Sistem.out.print(.....), the compiler accept it and make the .class file.thanks
Hi, I want to sort an array which contains Strings (sort according to alphabetical order...)after i sort the array...i want to read it at it's original order too...that mean's i want to have 2 set of array.....1 with the original order...1 with the sorted order..how do i do that?let's say i ...
HI:I'm developing a project using java, but we need to launch Microsoft Word into java based GUI(like Jpanel, or Frame, things like that), could anyone be so kind that give some hints on how to do it?thanks!
601 byte By
hrsat110 at 2007-9-30 6:50:47
usually u can cast asinstance=(classTypeOf Instance)Object I want to cast the result of initCtx.lookup(String jndiName) to a class CustomerLocalHome = sampleMethode(String CustomerLocalHomeClassName) initCtx.lookup(String jndiName)so sampleMethod return must be type of CustomerLocalHomeIn JDK ...
I have several java.io.File objects displayed in my swing application. When the user double clicks any of these objects, I want to launch the external application associated with the file type. For eg. if the user double clicks on "one.pdf", I want to launch Adobe Acrobat to view that file. I ...
Hi,we are receiving the following error from the BEA server during the production time:# LOCAL TIME = THU APR 15 02:37:24 2004# ELAPSED TIME =137625# HOTSPOT VIRTUAL MACHINE ERROR :11# ERROR ID :4F530E43505002C4 01# HTTP://JAVA.SUN.COM.CGI-BIN/BUGREPORT.CGI# JAVA VM:JAVA HOTSPOT(TM) CLIENT ...
Dear Java developers,We recently develop a new java IDE - SyncJEdit.It is totally different with other IDEs.SyncJEdit can be installed on Windows95 and above.Please visit our web for free downloading http://www.syncedit.comPlease give us a feedback here, We appreciate your opinions about the ...
Hello! I am recompiling code from java 1.2 to java 1.4 and getting a message to compile with the -deprecation option. I did this and get errors like the following: MaskEngine.java:745: warning: KeyEvent(java.awt.Component,int,long,int,int) in java.awt.event.KeyEvent has been deprecatedKeyEvente ...
Dear Sir,I am totally stuck with converting String to float value.I need following output.Ex : Input (String) : "123.450"Output (float) : 123.450I am using Float.parseFloat(String) function but this way I am losing '0's at end of String. I don't want to loss zero's from String.I am ...
Hi ,I am designing a Web Crawler, i want to put up a filter for "Content Seen" verification. I know it has something to do with "document fingerprint set" or "copy catch" concepts. Can anyone help me find one or any API which deals with these concepts.Thanks in advanceRegards,Nawaz Ahmed R ...
121 byte By
NenadDj at 2007-9-30 7:08:16
HiI wonder hot to make my app to do not allow more then one instance to run at the same time.
111 byte By
NenadDj at 2007-9-30 7:09:02
HiDoes anyone know how to set and get env variables from Java app. on Linux.Thunks.
1605 byte By
rrade at 2007-9-30 7:17:37
Hi, what I want to do is to change the content of a file without changing the last modified date.But either the content changes or the timestamp is set right. But never both.Any help is appreciated!Greetings RolandHere is the code snippet for details:File[] arrFiles=oDir.listFiles();//get the ...
Hi,How difficult is it to write a JDBC driver ?I was curious to write one for processing MS Excel files. I know there is a POI project but it looks a bit complex to me, so I wanted to have my own.Can someone guide me?Thanks in advance
I want to run python command within java. Not sure how to do this. Seems like runtime.getRuntime.exec() is something that i can use. but all the examples were for unix platform and not any other. Can i run python command using getRuntime().. please let me knowThanx ...
151 byte By
NenadDj at 2007-9-30 7:22:13
Hi all.I would like to create simple MS Excel file from Java. Can someone sugest me some free Java to Excel library.Thunks.
how can we implements more than one interfaces with use of anonymous class ?it is possible or not? take care bye.........
814 byte By
Ranap_EL at 2007-9-30 7:25:10
while working on a software designed for text compression (with a textual output file)i have encountered a problem.....i am trying to generate a char represnted by a certain value (i.e.: 97 represent 'a' , 98 represent 'b' etc...).my values can vary from 0 to any value represented by 16bits ...
Author: BhanuPVaish Apr 29, 2004 10:49 AM Hi All,I am trying to call MS-Word in my own created interface in JAVA but for Macintosh plateform so that i can use the MS-Word application with mine created interface. Also i have to use the functions of word.Means, in my interface exe of word must ...