significant digits

296 byte By Dcaptain at 2007-9-30 14:36:22
double has a range of 1.79769313486231570e+308,and with 14 to 15 significant digits of accuracy.if it has only 14-15 digits of accuracy, does this mean that the 16th digit in a decimal number of a double value is not accurate or is negligible?thanks in advance.

Java Applet and IIS

731 byte By Roda_Aing at 2007-9-30 14:36:27
Hi,I have created an applet code. The code is normally working fine without IIS.I have IIS 5.0 installed on my Windows 2000 Server. My web site home directory is "C:\Inetpub\wwwroot". I already coppied the files to the correct folder. In the address box of Internet Explorer, I typed ...

set copyright and version information on .class and .jar files

351 byte By fafra333 at 2007-9-30 14:36:31
Hi all,i'm developing java applications on windows platforms. Is it possible to add a stamp on .class and .jar files (i.e. with copyright and product version informations) i want to distribute, in a way they're visible in the windows explorer?i know that is possible on .exe files .thanks in ...

throws vs throw new Exception !!!!!

659 byte By warx_sg at 2007-9-30 14:36:34
Hi,i have to write an application and manage some excpetions.I ha to choices to write my methods : First :public void init() throws SQLExcpetion {// do a connection to a DB and other stuff}Second:public void init() throws SQLException {try { } catch ( Exception e ) {throw new ...

variables

569 byte By bigandyt at 2007-9-30 14:36:35
i want a way of setting certain varibales without a user having to open the java file, maybe just opening a text file.for example i have the followingstring server = "andrews";string folder = "andrewsfiles"String file = "andrew.doc";i want the user to be able to configure this as the server ...

Need help build binary tree from array

1722 byte By OaaO at 2007-9-30 14:36:46
Hello!My first post here so forgive me if i post in the wrong forum...I have search on google and in here but i can't find any good explanation (at least for me to understand) how to build a balanced binary tree from a sorted array.Let say i have a array like:1,3,5,7,10,12,14,16,18Now i want ...

TableSorter and related issues

1420 byte By Kevin-Pors at 2007-9-30 14:36:54
Hi guys,On some memorizer application I'm working on, notes are displayed via a JTable. These notes are added to the table's model through a method, addNote(Noteable note). This method extracts some information out of these Noteable objects and adds them as a row of 4 columns to the table. ...

Splitting problem

3015 byte By _aalleexx_ at 2007-9-30 14:37:04
why does this not work?public String getOnlyFileName(String nameWithPath){String[] parts = nameWithPath.split("\\");return parts[parts.length - 1];}if have the following error if i use this Exception in thread "AWT-EventQueue-0" java.util.regex.PatternSyntaxException: Unexpected internal error ...

Vector class, insertElementAt() method and JComboBox

1504 byte By Peter@Smith at 2007-9-30 14:37:15
Hi guys,I am using a vector called vectorSquare. I have an (Square)object in each component. When I run the program, depending on how many squares the user chooses, the combobox size will be vectorSquare.size(). Everything is all right. But if the user reenter data for one of the square, I ...

Best Way to encrypt passwords using JSP and MySQL?

517 byte By seanogflynn at 2007-9-30 14:37:24
What is the best way to encrypt passwords using JSP and MySQL?I have a login page and need to enhance the security aspect by encrypting passwords.I have been thinking of using MD5,but i dont' know how to interact this JAVA code with the JSP code as well as writing it to the database?Is there ...

Cannot import javax.servlet onto classpath

295 byte By simon622 at 2007-9-30 14:37:25
Hi guys, newbie question.Im using jedit on linux; compiling with j2sdk1.4.2_04 but it will not pick up the javax.serletclasses!! Is there an add on I need to download to develop j2ee stuff, as I thought j2sdk1.4.2_04 was all that was required.Thanks in advance

weblogic restart when java files compiled

238 byte By veerendrakumar at 2007-9-30 14:37:27
when ever i compile java filesi need to restart my weblogic server to effect the compiled classfiles.to avoid this what i need to do?Do we need to change any properties in xml files or in weblogic administrator

WANTED: java.io.IOException: Cannot allocate memory

462 byte By clayuser at 2007-9-30 14:37:31
hi all!anybody seen/knows about this stacktrace:java.io.IOException: Cannot allocate memory atjava.net.PlainDatagramSocketImpl.send(Native Method) atjava.net.DatagramSocket.send(DatagramSocket.java:581) atI have search the corr. PlainDatagramSocketImpl.c impl and didnt find anything about this ...

page size of Browser

240 byte By pulvat at 2007-9-30 14:37:39
HiI am sending a fax using rfax in java. I can not understand how can i set the size of fax page. Because i am sending a string which has html page but i cant understand that page is how much long.Please help me.

Is the net slow today or is it just me?

241 byte By MichaelCouck at 2007-9-30 14:37:46
Hi,Completely off the topic, however today even Google home page takes 10 - 30 seconds to load on a cable connection(normally about 500 kb/sec). Is anyone else having this trouble, and does anyone know why?Michael

need help with ArrayList or Vector

171 byte By 1-2004587 at 2007-9-30 14:37:48
Anyone know how to make a search in the ArrayList or Vector? i have tried several method available in API ducumentation but it didn't work.Many thank

letting tomcat start a class

332 byte By gimbal2 at 2007-9-30 14:37:49
I have a class which runs as a daemon thread. I want this class to start right after tomcat boots. Is there a way to make Tomcat execute a class on startup? The only way I can think of is creating a simple class which fetches a JSP that starts the thread. If anyone knows a better solution, I ...

Problems with a thread that records dvd on suse linux

1454 byte By trcsilva at 2007-9-30 14:37:50
PLEASE HELPI am using SuSE linux, and I record dvd+/- RW with the program growisofs. By command line on the linux shell, growisofs records normally, but when I try to use the same line cone that I use in the shell in a java thread, it never stops recording, I mean, it records all data, but it ...

Reflection and RTTI

1389 byte By SPrabhakar at 2007-9-30 14:37:52
I need to create references to new objects of leaf classes from the root class in a class hierarchy. I am not sure how to do this. I have considered reflection and RTTI, but with no success.I have a hierarchy of classes with several levels. Each class has methods that overrides the methods it ...

Force a ToolTip to show itself?

917 byte By RiOrius at 2007-9-30 14:37:56
Greetings, all.I'd like to allow a user to right-click on certain areas of my Applet, and, upon right-clicking, have a ToolTip display until they move their mouse, at which point it disappears. I've been searching through the JToolTip and ToolTipManager API's, but haven't been able to find ...

unrecgnized ActionEvent

2685 byte By agriv8 at 2007-9-30 14:38:02
I have been programming in ANSI/ISO C++ for a while, and just started to learn Java so that I could write a GUI to a set of tools that currently only has a command line interface. I got the GUI designed OK, and am now adding ActionListeners and such to it. I have an action listener on the Save ...

Sending xml file through Http post

346 byte By chenlongtai at 2007-9-30 14:38:03
Hi,I like to send a xml file using Http post in java but I am not so sure how to do it.Can anyone give me a sample code on how to achieve this?Since xml file is a text file, I will be sending over as string right?Do I need to worry about encoding issues?Please advice.Thanks.Regards. ...

provider issue

1338 byte By ravikommuri at 2007-9-30 14:38:05
I am writing a custom provider, It is based on a URLScraperProvider.That being said, here isthe general logic of the my customer provider that makes itdifferent. The custom provider has a relative URI that loads static pages underthe local web server and displays it in the channel.The URL or ...

connect oracle:jdbc

180 byte By charly10000 at 2007-9-30 14:38:10
hello how can i connect to oracle using jdbc?con=java.sql.DriverManager.getConnection("jdbc:oracle:thin@xxxx.es","yy","xxxxx");how can i know the port?

Row distance, JTextPane

323 byte By Freddef at 2007-9-30 14:38:13
Does anyone know if it is possible to specify a certain distance between rows in a JTextPane? I would like to be able to increase the distance between rows in my JTextPane... I have been reading the API on TextComponents but not being able to find anything about this...Thankful for responseFred ...

Is the Class thread safe?

1202 byte By fai-chun at 2007-9-30 14:38:18
Hi, I have the following code and would like to know if [b]Class3[/b] is actually thread safe. [code]public class Class1{public Class1(){}public createThread(){Class3 c3 = new Class3();new Class2(c3, 0, 1).start();new Class2(c3, 2, 3).start();}}public class Class2 extends Thread{private Class3 ...

Unparseable date Error

669 byte By jfreebsd at 2007-9-30 14:38:28
I'm getting java.text.ParseException: Unparseable date: "2004-07-05 11:45:49.0" "2004-07-05 11:45:49.0" is what I'm getting from Oracle. I'm getting the field as a String since resultSet.getDate() returns null despite the field in Oracle is implemented as a DATE. So when I get the String I ...

question about read(byte[] b)

1225 byte By pnandrus at 2007-9-30 14:38:30
just a pretty simple question really, i just really need to get this straight. I just want to confirm this hunch. So, using the read function from FileInputStream or ZipInputStream, this function will not return -1 unless ALL bytes have been read from the stream, right? So, say i have thisbyte ...

property file

1373 byte By Web-net at 2007-9-30 14:38:54
I want to read properties from a flat file and I have the following code. It is throwing NullPointerExceptioncan any one please tell me why? Properties p = new Properties();InputStream is =ClassLoader.getSystemClassLoader().getResourceAsStream("c:\\test\\prop.txt"); try ...

Add a class into LinkedList

356 byte By PeaceGod at 2007-9-30 14:39:02
when i want to add object to linkedlist i useLinkList.add(MyObject)its succed but when i want to get it by use this fuctionpublic MyObject GetIt ( ) {return this.removeFirst();}its give me uncompataple format;how i can get this object after i insert it in linked ist by using function ; ...

Multimedia formats supported

362 byte By Simone123 at 2007-9-30 14:39:03
Hello! What are the multimedia formats supported by java, also with JMF ?Is it possible to read Real Player formats just like rm and ram and mp3 located in the net, for example http:\\www.mediastore.com\ThisSong.mp3How can i read Windows Media Player wma and wmv formats ?Thanks in advance ...

JFileChooser Question

302 byte By Ryltar at 2007-9-30 14:39:05
Hi, I have a question about JFileChooser.How do I set it so you can only access files in the starting directory?I tried the option the default option and it did not work...Also, is there a way to check to see if a folder contains any files?Thanks,Ryltar ...

one line if statement

1379 byte By megabyte214 at 2007-9-30 14:39:13
I am trying to use the one line if statement but I am not doing it correctly (it is not compiling). Here is the code:String record = "Bob", "32", "Dog"; StringTokenizer tokenizer = new StringTokenizer(record, ","); list.add(new Person(tokenizer.nextToken(), tokenizer.nextToken(), ...

I really need ur help!!

695 byte By pre_pra at 2007-9-30 14:39:18
Hi, my question is how to get the version number of a jar file from cvs in java code. I understand that we can use $Revision$ variables in our java code inorder to get the latest version generated by the CVS. But where should i put the $Revision$ tag such that this tag is replaced by the ...

Casting costs in JDK 1.4 + Nil?

756 byte By sfotex at 2007-9-30 14:39:33
Ok, I've read the articles on the costs of casting for JDK 1.2.2, etc. on the javaworld site., but was wondering, what's the cost in newer JDK's - so I downloaded the test that the javaworld article used ( http://www.sosnoski.com/Performance/Casting.html) and ran it with JDK 1.4.1_02 It looks ...

Client-to-Client chat via connection to Server

1020 byte By kl365a at 2007-9-30 14:39:39
Hi,I'm looking for links that might help me better understand the communication process between multi-threaded servers and the connected clients.What I have right now is a server that allows multiple clients to connect, but all communication takes place between the client and the ...

ClassCastException and I don't know why

3419 byte By Romaniuz at 2007-9-30 14:39:43
I have a program to which I can add different components and/or a complete PC to a linkedlist. When I add a component such as CPU, it has four attributes, maker, model, speed, price. It works fine, i can show the components in my list, i can remove a component and even search after a specific ...

question about classpath and jar file

226 byte By perksanders at 2007-9-30 14:39:44
I have a jar file (actually jhall.jar, the java help jar file). How do I uses its classes if I don't want to add it to the classpath. Currently, I have the jar file in the same directory as all my other classes.

Create an invisible special character...

462 byte By yosep at 2007-9-30 14:39:46
Hello...I need to add a special character to a string as follows..String ok = "I am the man"+specialChar;However, when I print "ok" later, I just want to see"I am the man"without the special character.The reason I want to do this is because I want to distinguish the regular strings with the ...

package com.bruceeckel.simpletest does not exist.import com.bruceeckel.simp

710 byte By baxxterhp at 2007-9-30 14:39:49
Sorry that I write again about this problem, but I can't manage with it.When I'm trying to compile the program (Assigment.java) from book code appears an error:D:\Java\Code\c03\Assignment.java:5: package com.bruceeckel.simpletest does not existimport com.bruceeckel.simpletest.*;It's not ...

How to use HTTP GET to receive XML file?

325 byte By chenlongtai at 2007-9-30 14:39:52
Hi,I like to know how to constantly use servlet to monitor for incoming xml file for processiing?I know it should use http get, so should I use the doGet method in servlet?How do I handle multiple request in the doGet method?Can give me some samples?Thanks and regards. ...

Problem with Runtime.exec() ... bug?

3375 byte By unsavory at 2007-9-30 14:40:01
I am using the following code to try and execute an .exe.String cmdString = ("CMD /C \"C:\\temp\\psexec \\\\AUNTDB01 -u peoplesoft\\d_user -p Beagle11 -d -c C:\\temp\\InstallJarwin.bat\"");try{//The .exec syntax: (Command string, env, run directory)System.out.println("Executing: " + ...

Applet ActionListener Help needed

1221 byte By priyankaswings at 2007-9-30 14:40:09
This code below//ADD ACTION LISTENER TO BUTTONclass NewGame implements java.awt.event.ActionListener { //where initialization occurs: newGame.addActionListener(this);public void actionPerformed(ActionEvent e) {............} } Gives this error:MyApplet.java:115: cannot resolve symbolsymbol : ...

Generate random number from set array

228 byte By notniuq at 2007-9-30 14:40:12
Hi,How could you best write a single statement that will print a number at random from the set:a ){2,4,6,8,10};b){3,5,7,9,11};c){6,10,14,18,22};Thanks for the help!Quinton.

Runtime rt = Runtime.getRuntime();

1015 byte By gtata at 2007-9-30 14:40:23
The following should kick off the script my_script.sh in /var/a/db directory. I have a bunch of echo commands in the script but looks like the echo commands are not working because when the script is kicked off, I don't see any of the echo messages in standard output. Any ideas why? try ...

Help! How can I make two scroll panes moving together?

222 byte By chengtie at 2007-9-30 14:40:25
I mean, when I see the contenent in one scroll pane by moving its bar, the other one's bar can move together and in the same way. The purpose is to compare their contenents easily.Hope you can help me

teach me thread programming

255 byte By nepal_100 at 2007-9-30 14:40:28
How the following can be achieved?//Thread t1 is running.//Start Thread t2 from t1.//Halt t1 for a few seconds while t2 runs.//Wake t1, stop (destroy) t2Would someone give the code snippet?Thank you.

Pull a filename out of an image

221 byte By exodist at 2007-9-30 14:40:43
say I use the toolkit to load an image from a local file. how can I retrieve the filename from the image afterwords?toolkit, image and ImageObserver don't seem to have any useful meathods to do this.

Data being overwritten in my LinkedList

685 byte By Romaniuz at 2007-9-30 14:40:45
I have a linkedlist, called myHardware, consisting of different objects and linkedlist. I can add numerous objects, which is of type Component, and every time I add a new one no problem. It does no longer overwrite the old objects, which it did in the beginning. Now I add a LinkedList, ...

Borders library?

93 byte By virgiliovv at 2007-9-30 14:40:50
Does anyone know some library of borders, that is, other than BorderFactory's?