2,443 Posted Topics

Member Avatar for champion123
Member Avatar for pro_learner

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.

Member Avatar for harinath_2007
0
167
Member Avatar for sidd1994

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 …

Member Avatar for sidd1994
0
101
Member Avatar for arfharwinder

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.

Member Avatar for anand01
0
379
Member Avatar for simplyhuman

set the expires meta-tag and the no-cache pragma (google those terms in combination with HTML/HTTP).

Member Avatar for masijade
0
97
Member Avatar for newbie_jar

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?

Member Avatar for masijade
0
3K
Member Avatar for pawan768

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.

Member Avatar for pawan768
0
439
Member Avatar for innspiron

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 …

Member Avatar for masijade
0
225
Member Avatar for Rzink92
Member Avatar for sike.mausa

Uhm, wrap "file" in New File(file)? If your "Caesar" constructor needs a file as an argument.

Member Avatar for Aviras
0
182
Member Avatar for win10301

[i]What[/i] symbol? Post the entire stacktrace not just an incomplete summary of it.

Member Avatar for hfx642
0
89
Member Avatar for Yaseen16
Member Avatar for Yaseen16
0
216
Member Avatar for biplob29

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.

Member Avatar for masijade
0
128
Member Avatar for pro_learner

[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.

Member Avatar for masijade
0
281
Member Avatar for rahul.ch

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 …

Member Avatar for rahul.ch
0
152
Member Avatar for mehnihma

You would first need to convert your parallel array structure to a map or a single array of objects that contain both values.

Member Avatar for masijade
0
144
Member Avatar for Jessurider

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".

Member Avatar for masijade
0
334
Member Avatar for c.uetn

[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. ;-)

Member Avatar for c.uetn
0
513
Member Avatar for pfm200586
Member Avatar for L7Sqr
0
94
Member Avatar for vinod_javas

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 …

Member Avatar for peter_budo
0
6K
Member Avatar for JessHill19
Member Avatar for TigerTeck
Member Avatar for RohitSahni
Member Avatar for geekman89
Member Avatar for apcxpc
Member Avatar for yapaarachchi

Well, is there a nextCharacter method? No? Then what about simply using next and then toCharArray on the resulting String?

Member Avatar for TheSomalilander
0
226
Member Avatar for jwala
Member Avatar for StephNicolaou

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.

Member Avatar for StephNicolaou
0
156
Member Avatar for drjay1627

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 …

Member Avatar for masijade
0
187
Member Avatar for djmonster

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.

Member Avatar for hiddepolen
0
589
Member Avatar for meme dreame

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?

Member Avatar for meme dreame
0
166
Member Avatar for woodenduck
Member Avatar for friendskhaled

[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 …

Member Avatar for masijade
0
270
Member Avatar for TheComputerGuy

[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]

Member Avatar for masijade
0
197
Member Avatar for Acidburn

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.

Member Avatar for Bens
0
165
Member Avatar for niamul

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.

Member Avatar for jon.kiparsky
0
2K
Member Avatar for sathya88

[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 …

Member Avatar for masijade
0
8K
Member Avatar for inthespotlite82

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 …

Member Avatar for masijade
0
756
Member Avatar for dangari

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.

Member Avatar for masijade
0
628
Member Avatar for ceyezumma

Jasper and JavaMail (both of which would have quickly turned up with a just a little googling).

Member Avatar for masijade
0
84
Member Avatar for ceyezumma

Then you are getting an exception on one of those set lines that you are seemingly ignoring or you would have provided the exeption.

Member Avatar for masijade
0
365
Member Avatar for yapkm01

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 …

Member Avatar for ~s.o.s~
0
182
Member Avatar for babbu

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).

Member Avatar for masijade
0
72
Member Avatar for konradhoppe

Why not just use getDate (for [i]only[/i] a date) or getTimestamp for an actual timestamp?

Member Avatar for ywang
0
344
Member Avatar for MasterOfNothing

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].

Member Avatar for MasterOfNothing
0
330
Member Avatar for superjj

[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. ;-)

Member Avatar for superjj
0
172
Member Avatar for purijatin

They are not eligible for GC, with or without "line 5", as the "Runnables" are still referenced in the queue.

Member Avatar for purijatin
0
131
Member Avatar for anand01

By using the web container's connection pool and JNDI. See your web containers documentation and the JEE Tutorials.

Member Avatar for anand01
0
150
Member Avatar for mozy1691

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.

Member Avatar for masijade
0
86
Member Avatar for mingis

It might help to know exactly what "doesn't work" means. In any case, do [i]not[/i] use scriptlets.

Member Avatar for masijade
0
143

The End.