2,443 Posted Topics

Member Avatar for ranu jain
Member Avatar for Jessurider
Member Avatar for masijade
0
61
Member Avatar for sarathsshanker
Member Avatar for masijade
0
62
Member Avatar for madhub2v
Member Avatar for masijade
0
199
Member Avatar for iamcreasy
Member Avatar for iamcreasy
0
360
Member Avatar for rotten69

Well, if Eclipse "shows that there are errors and warnings" then that class is probably not being compiled and so the project does [i]not[/i] contain an executable main class. Fix the "errors and warnings", [i]first[/i].

Member Avatar for rotten69
0
10K
Member Avatar for ThirstyCrow
Member Avatar for sj5536

A daemon thread is a thread that does not need to be explicitly ended in order to end the program and it gets started like any other thread, by calling start(). See the Java Concurrency tutorials, there is a sticky thread at the beginning of this forum.

Member Avatar for masijade
0
124
Member Avatar for gingerfish

Well, where is your catch block for this, as any number of exceptions can be thrown by this code, and I have the sneaking suspiscion that you are ignoring them.

Member Avatar for masijade
0
160
Member Avatar for Majestics

Of course, that raises the question of why you are using threads. I mean, if all the main program (or the thread that started that other thread) is going to do is wait until the other thread is finished, then the thread is nothing but extra overhead.

Member Avatar for Majestics
0
115
Member Avatar for Majestics

[url=http://java.sun.com/docs/books/tutorial/uiswing/components/tooltip.html]A ToolTip?[/url]

Member Avatar for mKorbel
0
101
Member Avatar for cse.avinash

Your first mistake is making this a scriptlet in a jsp. At the very least use either a Servlet or the sql JSTL tags, better would be to use some application beans. The actual error, however, means that you have an empty field in that row that you are retreiving …

Member Avatar for masijade
0
189
Member Avatar for nsyncpilu

loop backwards, currently once you do removeRow(0) the former row 1 becomes row 0, then when you doe removeRow(1) (really row 2 now) the original row 3 becomes row 1, etc, etc.

Member Avatar for nsyncpilu
0
2K
Member Avatar for sathyanshan
Member Avatar for dangari

A long idle time between uses of the statement maybe? If that's case check out the session/connection timeout settings and the like for your db. Otherwise, simply catch the exception, check for this message (or, actually, the error code) and recreate the PreparedStatement.

Member Avatar for dangari
0
3K
Member Avatar for mith_cool

Throw away the scriplet and read the JEE6 tutorials and learn how to do this stuff right.

Member Avatar for masijade
0
119
Member Avatar for anand01

You need to add it to the classpath in the run configurations, or as a library in the project properties. The "build path" is only for compiling, and for that you don't the MySQL driver.

Member Avatar for anand01
0
154
Member Avatar for softswing

By simply catching IOException and using the getMessage method on the exception and the contains method on that String. You can not catch [i]only[/i] that exception, though. If you want to make sure that the rest of the method will still continue if the exception is anything but that, then …

Member Avatar for masijade
0
104
Member Avatar for dharma117
Member Avatar for Ezzaral
0
104
Member Avatar for mattyg1192003

I don't see (off hand) your problem, but I do have a suggestion, if you turn your if statement around, then you only have to check one condition each time (rather than two), i.e. [code]if (whatever >= 90) { // A } else if (whatever >= 80) { // B …

Member Avatar for AhmedGhazey
0
3K
Member Avatar for newcoder310
Member Avatar for masijade
0
78
Member Avatar for abery

JSP only has an effect [i]after[/i] the submit, of course. JavaScript is your [i]only[/i] choice.

Member Avatar for masijade
0
211
Member Avatar for itsmeisuru

Emp is probably a reserved word. Try surrounding the name in quotes or brackets (since this is an MS produced DB it [i]might[/i] use the Access quoting process, hence the brackets). I.E. [code]"SELECT * FROM \"Emp\"" // or "SELECT * FROM [Emp]"[/code]

Member Avatar for masijade
0
2K
Member Avatar for Jessurider

check the mysql "current working directoy" (although I don't believe it will be there) and try printing the Java program "current working directory" and check there. [code]System.out.println(System.getProperty("user.dir"));[/code] Edit: And I have no idea what this has to do with "making a connection permananet".

Member Avatar for masijade
0
149
Member Avatar for katharnakh

Because a number, typed directly into the code (i.e a = 15), is an integer. If you want a short, or a byte, or a char you need to cast it. Edit. Also, the "character" for long is L not l.

Member Avatar for naveenreddygine
0
165
Member Avatar for SkyCool
Member Avatar for iwannalearn

registerDriver is the "old" form. The driver classes are to do that themselves when loaded (the reason for the Class.forName() call). In fact, in Java 6 and later, if the driver implements the Services interface (which it must do to qualify as a valid Java 6 JDBC driver (JDBC version …

Member Avatar for NormR1
0
603
Member Avatar for IIM

Then you have [i]not[/i] "included it on your classpath" [i]properly[/i]. [i]How[/i] did you "include it on your classpath" and how, [i]exactly[/i] are you executing this code.

Member Avatar for IIM
0
124
Member Avatar for Riteman
Member Avatar for madhub2v

If you are working with relatively small amounts of records (in the low thousands in one hit) with a single transaction, use hibernate or some other object representation framework, if you are working in bulk (hundreds of thousands of records or more in one hit), use straight JDBC (or maybe …

Member Avatar for masijade
0
129
Member Avatar for kwins

[QUOTE=jon.kiparsky;1582065]Um, yeah. Brain fail - I was thinking "instance variable" for some reason. Okay, yes, I'm wrong on that one. Thanks.[/QUOTE] It [i]is[/i] still false, however, as it should be "all objects/instances created from the same classloader". Instances created from one classloader [i]will not[/i] have the same reference value as …

Member Avatar for masijade
-1
206
Member Avatar for Arthi Raman

And the problem would be? BTW, we are [i]not[/i] going to do your (home)work for you. This is your assignment, not ours. We are [i]more[/i] than happy to help [i]you[/i] fix [i]your[/i] problem but we are [i]not[/i] going "to provide the solution ASAP". For that see [url=http://www.rent-a-coder.com/]this[/url].

Member Avatar for masijade
-1
54
Member Avatar for smoothe19

Are you new to JEE or new to to Java in general. If the first, then, as long as you are capable in core Java the official [url=http://download.oracle.com/javaee/6/tutorial/doc/]JEE6[/url] or [url=http://download.oracle.com/javaee/5/tutorial/doc/]JEE5[/url] or [url=http://download.oracle.com/javaee/1.4/tutorial/doc/]J2EE 1.4[/url] tutorials should be [i]more[/i] than enough to get started. Use the one that is applicable to the …

Member Avatar for masijade
0
69
Member Avatar for rizana

You create three inputs of type submit but with different values, then, in the jsp/servlet that is the target of the action field of the form, you simply look at the value of the submit parameter to decide what to display.

Member Avatar for masijade
0
113
Member Avatar for JavaBean

Oh man, the deaf leading the blind. I have no idea where this "save it to the bin folder" stuff got started, but here ye, what rubbish. I know, I know, now you're going to come back with, but it works and its better than nothing, so whats wrong with …

Member Avatar for stultuske
0
513
Member Avatar for Knoxx

I'm sorry, but your question is? Is it producing any exceptions? Are there compiler messages? Or is it producing something you didn't expect, in which case, exactly how does the actual result differ from the expected result? And, when you post code, use code tags.

Member Avatar for JamesCherrill
0
3K
Member Avatar for deecoup

Why are only two fields getting inserted into the db? Uhm, bad code? We have no idea what is going wrong as we have no idea what the form (the HTML of the form, not a screenshot) looks like, nor do we know how that is being read and processed …

Member Avatar for peter_budo
0
174
Member Avatar for mith_cool

What database are you using? If it is [i]not[/i] Access then use the JDBC Driver meant for that DB, not the JDBC-ODBC bridge, and if you [i]are[/i] using Access, then use a different db. And, if you want to know what the problem is, then don't hide it behind your …

Member Avatar for mith_cool
0
131
Member Avatar for stevanity

Because you cannot call non-static methods from a static context without using an instance of the class containing those methods. i.e. [code]Whatever variable = new Whatever(); variable.someMethod();[/code]

Member Avatar for masijade
0
28K
Member Avatar for mastr924
Member Avatar for vextorspace

Edit: Nevermind. I completely misread. Edit Again: Include a read me in your distribution giving instructions to the user in case of problems. I.E. this is a user problem and you should provide [i]support[/i], but don't expect to be able to solve every environment related issue programatically.

Member Avatar for vextorspace
0
141
Member Avatar for sasidharnet

Google for a third party program for doing this, but it is not recommended. Why take a language meant for creating cross-platform software, and take that exact advantage away by turing the product into a native executable which can then only be run on one platform?

Member Avatar for masijade
0
490
Member Avatar for crystality

HttpURLConnection. Use one to get the listing (you will, of course, also need an HTMLParser for parsing that content), then another connect call with a new URL per file. Google HttpURLConnection and HTMLParser and try a few things out. And, P.S., hopefully the directory is "listable" and the files "retreivable" …

Member Avatar for masijade
0
262
Member Avatar for josiefrut

Don't do this with a JSP, do [i]not[/i] use scriptlets, at all, in a JSP when it can be avoided, which it almost [i]always[/i] can be, use a Servlet. You can use a JSP to create the form, but the post request should be going to a servlet (the servlet …

Member Avatar for josiefrut
-2
478
Member Avatar for thjchhu0ngthu

If you mean whether or not an email [I]address[/I] exists, then send it a mail with a "verification" link inside and wait on the answer.

Member Avatar for jwenting
0
136
Member Avatar for winecoding

Post the actual stack trace. And I hope the class containing this call does not import a class named "File" (or that its package does not contain a class named "File") that is different from the "File" imported in DirLocator (or from a class named File in its package).

Member Avatar for winecoding
0
8K
Member Avatar for arshi9464

No it is not. You should read the mysql user manual (and pay close attention to the part about grants) and give the root login a password (or restrict it to only the unix socket connection), delete the "blank" user account, and create an application user for your application.

Member Avatar for masijade
0
81
Member Avatar for solomon_13000

Because both threads are using the same instance of r1, and so the same "x" variable, but since nothing there is synchronized (except the println which is synched internally) the 22 came out later than you might have expected (and it might not have come out at all since you …

Member Avatar for masijade
0
127
Member Avatar for s.w.a

[QUOTE=s.w.a] it must be [inlinecode]if (th<T1 && sw1==true)[/inlinecode] [/QUOTE] Actually, it [i]should[/i] be [code]if (th<T1 && sw1)[/code] IMHO I find that "boolean==true" or "boolean==false" completely assinine. Some say it helps "readability". BS, complete BS. If any programmer cannot read "boolean" or "!boolean" there's a problem, and not with the code. …

Member Avatar for s.w.a
0
199
Member Avatar for amithlaxman

The End.