2,443 Posted Topics
Re: [url]http://docs.oracle.com/javase/tutorial/[/url] | |
Re: How did printStackTrace "not work". You need to explain that one more. In any case, add a printStackTrace [i]anyway[/i] and post the results of that. | |
Re: Sure print the first array, create a second array, calculate into it, print that, redefine the first array as a the third array (or simply use a "last index" type variable) and calculate the second into that, rinse, lather, repeat. Edit: Better of course, would be to simply recalculate the … | |
Re: Don't place spaces around the & And [i]don't[/i] use scriptlets. Learn how to do it all right. See the JEE 6 tutorials, and read through them completely. | |
Re: set the expires meta-tag and the no-cache pragma (google those terms in combination with HTML/HTTP). | |
Re: Its called security. You would need to get the users to "turn it off". What do you think would happen if browser applications could simply modify/create files anywhere on the file system? Do the terms "trojan" and/or "virus" (whether malicious or not) ring any bells? | |
Re: Because you are using the same statement to open multiple result sets, see the API docs for Statement where it clearly states that opening a second resultset will automatically close the first. | |
Re: It is obviously only needed if you are [i]using[/i] a proxy. You should know whether this is the case or not. If not, ask your network administrators, both for whether or not one is in use, as well as its address. Edit: And the connection refused could just as easily … | |
Re: Uhm, wrap "file" in New File(file)? If your "Caesar" constructor needs a file as an argument. | |
Re: [i]What[/i] symbol? Post the entire stacktrace not just an incomplete summary of it. ![]() | |
Re: Okay? And your question is? As a friendly reminder, this is not a homework service site. | |
Re: Sorry, but I, for one, am [i]not[/i] going to even [i]try[/i] to decipher these scriptlets. You should not be using scriptlets, that is the technology from over a decade ago. Go through the JEE6 tutorials and learn to do this right. | |
Re: [i]What[/i] "error"? Post the complete stacktrace. "It doesn't work" (which is essentially what you have said) is the singularly most useless problem description in the world. | |
Re: Because variables are not overridden, they are hidden. Meaning it will take the instance variable of the [i]Type[/i] that the instance is declared as. Edit: IOW, as you can see, the first part of that String has nothing to do with method overriding, as no method either sets, nor retrieves … | |
![]() | Re: You would first need to convert your parallel array structure to a map or a single array of objects that contain both values. |
Re: post the code for the initial frame creation, the setting of the look and feel (should be the same place, hopefully), as well as the code for the creation and display of the "second form". | |
Re: [QUOTE=leodash;1689158]You can also use JLabel as the button and then add MouseListener to it.[/QUOTE] Yes you can, but, truthfully, I would rather use the method outlined by mKorbel. That is mostly "personal opinion", but not completely, to tell you the truth. ;-) | |
Re: Why must you convert it? If it is for "homework"/"classes", then good luck. | |
Re: Bind a ServerSocket. If it fails to bind then abort the startup. Since a ServerSocket can be bound only once, only single instsances of the program will be able to run. And before you ask, no. Just because you bind a ServerSocket, does not mean you are open to network … | |
Re: And your question is? | |
Re: And your question is? | |
Re: Depends on the editor. | |
Re: It's called reflection. See the tutorials. | |
Re: See the Desktop class. | |
Re: Well, is there a nextCharacter method? No? Then what about simply using next and then toCharArray on the resulting String? | |
Re: Uhm, have that client close its socket? | |
Re: Because the graphics coordinates 00 is the upper right corner. simply subtract the coordinate you want to paint to from the over all height and use that as the y coordinate. | |
Re: create a prepared statement for the insert create a statement (using a different connection) for the select get a result set iterate through the result set for each row from the result set set the parameters on the prepared statement and call addBatch for every 500 rows or so call … | |
Re: Uhm, don't. StringTokenizer is all but deprecated due to a few well known issues. Use a Scanner or a BufferedReader and String's split method. | |
Re: Uhm ... Arrays.sort(arrayVar) and take the first and last? Edit: Nevermind, that's being a bit facetious. ;-) Why don't you try posting your newest code, as well as a cut-n-paste copy of your attempt at running it? | |
Re: Uhm, use a JDialog, in modal mode? | |
Re: [QUOTE=friendskhaled]Please Help me I can't start with this project ! Implement a city 'database' using unordered lists. Each record contains the name of the city (a character string of variable length), the mayor of the city and the co:ordinates of the city as integer x and y, Your system should … | |
Re: [QUOTE=TheComputerGuy]So I tried what you referred to. I get this error now. [CODE]java.lang.NullPointerException at ClientForNoDupCollection.main(ClientForNoDupCollection.java:41)[/CODE] Looked at line 41. [CODE]while (cReader.hasNext())[/CODE] Looks like it's referring back to the top...as being null.[/QUOTE] Uhm ... [QUOTE=TheComputerGuy][CODE]public static void main(String args[]) { File file = new File(args[0]); Scanner cReader = null;[/CODE][/QUOTE] | |
Re: J2ME (Micro/Mobile Edition) is a limited version of the J2SE (Standard Edition) and definately will not have anything that first available in the J2EE (Enterprise Edition). See [url]http://java.sun.com/javame/reference/apis.jsp#api[/url] and select the link for the appropriate version to see the API docs, and find out what is available. | |
Re: Actually if Java 7 [i]ever[/i] comes out, you [i]can[/i] then use Strings in switches. You can, also, ever since they have existed, use Enums in switches. | |
Re: [QUOTE=Taywin]You cannot set a null value to a primitive array. You could initialize an array size 0 instead...[/quote]Uhm, [i]Yes[/i], you can. You cannot assign null to an element of the array but you sure can assign null to the array reference (which is what the OP did). @OP your problem … | |
Re: Sorry, but tomcat does [i]not[/i] [b]need[/b] to "run as root", and anything the tomcat process executes will, of course, be executed with the same user as the tomcat process, [i]so[/i], why not simply run tomcat under a different user? Not that this is the answer to any "ssh" problem, as … | |
Re: The system makes differntiation from an open file handle and an open socket handle. What seems to be happening here is that you are probably making a new socket connection for every communication transaction you are doing and then not closing them properly. | |
Re: Jasper and JavaMail (both of which would have quickly turned up with a just a little googling). | |
Re: Then you are getting an exception on one of those set lines that you are seemingly ignoring or you would have provided the exeption. | |
Re: Because the compiler doesn't [i]care[/i] that it is "the highest upper bound in Java". It sees only that is [i]has[/i] a "restriction" now and that before, it didn't. Also, you do know that interfaces do not extend Object, right? So, if you try to add something where you are only … | |
Re: Why wouldn't it be possible to send one? Of course, you have to "create it" beforehand and then simply send it to the ouput stream after setting the content type. As far as creating it, Google "Apache POI HSSF" (or "Apache POI XSSF" for Office 2007 or later). | |
Re: Why not just use getDate (for [i]only[/i] a date) or getTimestamp for an actual timestamp? | |
Re: What does your HTML look like? Are you using the Applet tag (which you shouldn't), or the Object tag (which is better, but still not right) or JNLP? See [url=http://www.oracle.com/technetwork/java/javase/jnlp-136707.html]this[/url]. | |
Re: [QUOTE=Ezzaral;1636082]Take a look at the [URL="http://download.oracle.com/javase/6/docs/api/java/awt/GridBagConstraints.html#anchor"]anchor[/URL] property. Edit: You'll also need to look at the [URL="http://download.oracle.com/javase/6/docs/api/java/awt/GridBagConstraints.html#weightx"]weightx[/URL] property. You can read about it in the general notes for the [URL="http://download.oracle.com/javase/6/docs/api/java/awt/GridBagLayout.html"]GridBagLayout[/URL] class.[/QUOTE] And [URL="http://download.oracle.com/javase/6/docs/api/java/awt/GridBagConstraints.html#weighty"]weighty[/URL], of course (if he wants the [i]upper[/i]left, otherwise he'll just get the left. ;-) | |
Re: They are not eligible for GC, with or without "line 5", as the "Runnables" are still referenced in the queue. | |
Re: By using the web container's connection pool and JNDI. See your web containers documentation and the JEE Tutorials. | |
Re: See the Swing Tutorials (you can find them at the main java tutorial site which you can find in the sticky thread in the forum). Without [i]much[/i] more information that is all we can say. | |
Re: It might help to know exactly what "doesn't work" means. In any case, do [i]not[/i] use scriptlets. |
The End.