3,892 Posted Topics

Member Avatar for LianaN

[quote]How could I solve this problem?[/quote] By using a high resolution image? If you would try to zoom in on a 128 * 128 image, it would obviously look bad. Two options AFAICT: * Use a new image as the image source every time a zoom is done instead of …

Member Avatar for LianaN
0
196
Member Avatar for davetheant

Do you have the [URL="http://nlp.stanford.edu/nlp/javadoc/gnu-regexp-docs/"]GNU Regex Java library[/URL] jars in your runtime class-path? It seems that the JAR which you got in turn depends on GNU regex library so having a JAR for the same in your classpath is a requirement.

Member Avatar for ~s.o.s~
0
406
Member Avatar for ajijacobm

You can't directly execute a Java file i.e. pass it to the 'java' process and execute it. You need to first compile it to a class file which is in turn passed to the 'java' command. Also, read [URL="http://www.javaworld.com/jw-12-2000/jw-1229-traps.html"]this article[/URL] which lists the pitfalls when using Runtime.exec.

Member Avatar for ~s.o.s~
0
167
Member Avatar for ~s.o.s~

Here is wishing all the members of Daniweb (spammers included) a Happy New Year! :-)

Member Avatar for Shinedevil
3
222
Member Avatar for ~s.o.s~

Not sure if any of you have [URL="http://gizmodo.com/5726667/the-agonizing-last-words-of-bill-zeller"]read this[/URL], but heavy stuff there. It's so sad that someone had to go through so much his entire life. The note, yet again, shows us an unseen facet of this world we live in. RIP Bill Zeller :`( [B]PS:[/B] For those who …

Member Avatar for MosaicFuneral
0
106
Member Avatar for gunbuster363

By statements do you mean "code"? If yes, then JProfiler which is included with JDK 6 can be used for CPU profiling and at the end of the run gives the total time taken by each method till now. Search around for CPU profiling JProfiler.

Member Avatar for gunbuster363
0
92
Member Avatar for Shanti C

Is it required that the user uses your web application for downloading files? If yes, then in that case, your web application would have to act as a "man in the middle" and stream data from the FTP server to the client. For each client request: * Retrieve the FTP …

Member Avatar for Shanti C
0
281
Member Avatar for fredrickme

> I tried manipulating the blob datatype by setting.. The way you are going about to do this won't work. You can't render an image on your markup without using the IMG tag just by grabbing the binary content. You'd need to create a separate servlet mapping which would read …

Member Avatar for Shanti C
0
6K
Member Avatar for Alex_

SerializedThread is an inner class i.e. a class which depends on some outer parent class i.e. there is an association between your class Main and SerializedThread. When you try to serialize SerializedThread, it also tries to serialize Main class (which doesn't implement Serializable) hence the error. A couple of solutions: …

Member Avatar for Alex_
0
2K
Member Avatar for siva ganesh
Re: JSP

> how to store an image from one directory to another directory using jsp? Can you explain a bit more on what exactly are you trying to do here? > MoveTo or CopyTo method of java.nio.file.Path class. AFAICT, Path class is JDK7 only which is still in its "preview release" …

Member Avatar for Shanti C
0
79
Member Avatar for SeanC

[quote]My main concern is that like this, the harddisk is constantly being accessed for every single character - I'm sure it's highly inefficient.[/quote] Yes, it sure is. [quote]Please note that when I used 'readLine()' instead of 'read()', i got the java heap error, so im guessing i have to read …

Member Avatar for SeanC
0
462
Member Avatar for Coyboss
Member Avatar for ~s.o.s~
0
164
Member Avatar for siva ganesh

[URL="http://download.oracle.com/javase/6/docs/api/java/io/File.html#renameTo%28java.io.File%29"]File#renameTo[/URL] method

Member Avatar for ~s.o.s~
0
35
Member Avatar for PythonNewbie2

[quote]Users log in with their username and password (maybe I can somehow incorporate google OPENID)?[/quote] [URL="http://code.google.com/p/openid4java/"]OpenId4Java[/URL] (though I haven't used it personally) [quote]What I'm not sure is if JSP/JSF gives the ability to parse HTML at a certain URL to see if it contains words[/quote] I think [URL="http://hc.apache.org/httpclient-3.x/"]Apache HTTPClient[/URL] should …

Member Avatar for ~s.o.s~
0
93
Member Avatar for lse123

As far as wrapping in an executable is concerned, I've heard good things about [URL="http://jsmooth.sourceforge.net/features.php"]JSmooth[/URL]. If that doesn't suit your needs, there is always [URL="http://launch4j.sourceforge.net/"]Launch4J[/URL]. Of course, this assumes that you already have *everything* bundled up in a JAR file for which you can use Eclipse or Netbeans as already …

Member Avatar for ~s.o.s~
0
296
Member Avatar for daudiam

[quote]Why do local inner classes not allow static variables ? The static fields of the classes could at least have been allowed access from the local method ?[/quote] Because static members make little sense when it comes to "local inner classes" since these classes belong to a scope as opposed …

Member Avatar for ~s.o.s~
0
164
Member Avatar for Jemo2008

The proper way to go about the task would have been to use JSTL or JSF instead of scriptlets. The official [URL="http://java.sun.com/javaee/reference/"]J2EE tutorial[/URL] would be a good starting point. Plus what you posted was far from useful; you need to post the entire relevant code instead of just the line …

Member Avatar for ~s.o.s~
0
502
Member Avatar for jaycastr

Some universities make students code in Notepad/Wordpad. Asking students to use an editor which doesn't go syntax highlighting is a sure shot way of "frustrating" the hell out of students and making them hate the course. I personally use Eclipse (work) / gvim (home). BTW, it's not "JAVA" but Java.

Member Avatar for Akill10
1
460
Member Avatar for arshi9464

Think of the JVM as a universal VM. JVM byte code is to JVM what x86 assembly is to x86 family of processors (sort of) with the difference being that this byte-code is not aimed at any specific processor architecture but rather a VM which runs on a variety of …

Member Avatar for ~s.o.s~
0
169
Member Avatar for MooGeek

No more than 30 mins without a break. If the entire premise is clear in my mind, it doesn't take a lot of time to churn out sizable amount of code. Plus given my short attention span, 30 minutes is a good enough time to keep me motivated. Oh, but …

Member Avatar for ajst
0
170
Member Avatar for daudiam

[URL="http://www.xyzws.com/Javafaq/why-a-protected-member-of-a-superclass-cant-be-accessed-from-a-subclass-by-using-a-superclass-reference/109"]Why a protected member of a superclass can't be accessed from a subclass by using a superclass' reference?[/URL]

Member Avatar for daudiam
0
209
Member Avatar for daudiam

Because: [quote][URL="http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.3.1.2"]A blank final instance variable must be definitely assigned at the end of every constructor of the class in which it is declared; otherwise a compile-time error occurs.[/URL][/quote]

Member Avatar for daudiam
0
162
Member Avatar for WolfShield

Looping over the array and comparing values would be the simplest solution. If it is an array of primitive values, use the comparison operator [icode]==[/icode]. If it is an array of reference types, use the [icode]equals[/icode] method (or [icode]compareTo[/icode] if the reference type implements natural ordering). Another simple way would …

Member Avatar for ~s.o.s~
0
92
Member Avatar for daudiam

[quote]How does the element type being available at runtime have anything to do with that ? [/quote] Because it enables fail fast behaviour. Array operations are checked at runtime since the type information is available to the JVM. [code]class Test { public static void main(final String[] args) { Object[] arr …

Member Avatar for daudiam
0
171
Member Avatar for prem2

> j2se vs j2ee vs j2me . Simply put: J2SE - Standard edition; standalone applications J2EE (is actually called Java EE) - Enterprise edition of Java; built on top of Java SE and adds enterprise capabilities (read specifications) like web applications, business components etc. J2ME - Java for mobile platform; …

Member Avatar for ~s.o.s~
0
1K
Member Avatar for Me-Mo

Regarding bad titles: just report the first post of the thread and someone from the mod forums might fix that. Plus, let's not go too off-topic here; how about wait for the OP to explain his/her situation (though I doubt it would happen).

Member Avatar for Tellalca
-3
149
Member Avatar for rakesh4java

Do you have a package declaration at the top of your servlet? Does the "classes" directory contain the file "getname.class" placed in the folder hierarchy com/mmfsl/web ?

Member Avatar for rakesh4java
0
25K
Member Avatar for bleedi

There is no Math.random method which takes a seed. Simply use the Random class and its nextInt(upperBound) method and you should be good to go. Also, before lighting up the buttons, make sure the previous state of all the remaining buttons is reset.

Member Avatar for ~s.o.s~
0
2K
Member Avatar for daudiam

The wildcard [icode]<?>[/icode] is a shorthand notation for [icode]<? extends Object>[/icode] hence the normal rules apply.[code] private void traverse(final List<?> lst) { final Object o = lst.get(0); lst.add(new Object()); // compile time error }[/code] This is the same reason why you can do a "get" but not a "set". The …

Member Avatar for daudiam
0
167
Member Avatar for vjcagay

[URL="http://download.oracle.com/javase/tutorial/java/package/packages.html"]The simplest explanation related to packages.[/URL]

Member Avatar for ~s.o.s~
0
102
Member Avatar for Tango2010

[quote]Does anyone know how to make the program wait for this command to complete before it moves onto the next lines of code?[/quote] Try removing the first two arguments from your string array i.e. [code]final String[] args = { "sudo cp", "/source/*", "/target" };[/code] And preferably use ProcessBuilder class for …

Member Avatar for ~s.o.s~
0
504
Member Avatar for daudiam

[quote]What is E once the program has been compiled ? [/quote] There is no type "E" after the class has been compiled. Generics in Java are based on type erasure and are compile time constructs i.e. your code is as safe as you want it to be. Deep down inside, …

Member Avatar for daudiam
0
205
Member Avatar for prem2

You have posted the [icode]javac[/icode] command which you are using to compile your code. What is the [icode]java[/icode] command you are using to execute your code? Are you properly setting the classpath when spawning your Java process? Also, as already mentioned, move that mysqlconnection jar out of the JDK lib …

Member Avatar for prem2
0
689
Member Avatar for vinithktp

If you are working exclusively wrt manipulating strings, use StringBuilder class for appending operations rather than concatenation for strings. If you still face memory issues, then they might just be valid reasons and would require you to set the heap size accordingly. What is your current heap size?

Member Avatar for ~s.o.s~
0
108
Member Avatar for misszeze

[quote]You can't send a ref between different JVMs[/quote] Yes you can (at least for custom classes) using RMI; moving refs between JVMs is the entire premise of the "distributed objects" theme. :-)

Member Avatar for JamesCherrill
0
90
Member Avatar for daudiam

[URL="http://www.javamex.com/tutorials/threads/thread_scheduling_2.shtml"]The explanation[/URL] is on the same site.

Member Avatar for ~s.o.s~
0
692
Member Avatar for newbie14

What operating system are you running on? Do you have the entire stack trace? This error normally comes up when you end up depleting your quota of the maximum acceptable file handles which can be open at a given time which in turn happens if you don't close file/socket streams …

Member Avatar for newbie14
1
4K
Member Avatar for gedas

Which tool are you specifically referring to here for creating web services? What kind of web service (JAX-RPC, JAX-WS, JAX-RS)?

Member Avatar for gedas
0
245
Member Avatar for musikluver4

[quote]If you ask really really nice you might ask one of the mods to remove the code you posted, leaving the rest of the post.[/quote] That would be a wrong thing since removing content from posts which don't violate any rules would be against the rules. I do admit that …

Member Avatar for Dani
0
187
Member Avatar for neemo6

If nothing, these certifications force you to have a closer look at the language in general, which you probably don't bother with unless you are studying for a certification. Certifications have got a pretty bad rap due to the plethora of Software Engineers with certifications who can't do a hoot …

Member Avatar for ~s.o.s~
0
87
Member Avatar for eyndyel

> Can anyone tell me or give me a hint as to how am i going to sort the words > in alphabetical order. Look into the [URL="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collections.html#sort(java.util.List,%20java.util.Comparator)"]Collections#sort[/URL] method which takes a [icode]Comparator[/icode] instance to facilitate custom sorting.

Member Avatar for jon.kiparsky
0
177
Member Avatar for I<LateNupurGuha

Your question isn't very clear; when you say JDK tool, which tool are you referring to? Also, if you are talking of "java", it doesn't know the "fully qualified class name", you have to specify it. When you write:[code] java -cp . net.sanjayts.Main[/code] the executable searches for the directory structure …

Member Avatar for ~s.o.s~
0
94
Member Avatar for Akill10

Use the [icode]getResource()[/icode] method of the ClassLoader class for loading resources in a location-independent manner relative to your classloader path. This path is normally the classpath which you set (-cp) when spawning the Java process. This method is capable of loading any classpath resource, not just packaged resources. Hence you …

Member Avatar for ~s.o.s~
0
100
Member Avatar for IsharaComix

AFAIK, "the same" is a common way of referring to a previously explained/mentioned context. For e.g. compare and contrast the following two sentences:[code] I've upped the servers on the production box; please monitor the same for at least two days. v/s I've upped the severs on the production box; please …

Member Avatar for WaltP
0
277
Member Avatar for bob24bob

AFAIK, [URL="http://docs.python.org/library/socket.html#socket.socket.bind"]`bind` accepts a tuple[/URL]; just wrap those HOST and PORT in another pair of parentheses and you should be good to go.

Member Avatar for bob24bob
0
804
Member Avatar for ~s.o.s~

A new anime season is just around the corner; [URL="http://moetron.com/uploads/20101204_winterlistv3.jpg"]preview here[/URL]! Kimi No Todoke 2nd season and Mitsudomoe 2nd season are on my must watch list but all in all this new season looks depressing. :-(

Member Avatar for ~s.o.s~
0
196
Member Avatar for abc.forforum

AFAIK, no, not possible since a JAR file is just a zip file and is not capable of containing that sort of meta-data. This is the reason you'll notice that applications which rely on running a JAR also supply a shell script for that given platform which fires the JAR …

Member Avatar for ~s.o.s~
0
163
Member Avatar for nitins60

[quote]I can't understand why s1,s2,s3 are having same hashcode although i created as strings and objects as shown[/quote] As already mentioned hashCode depends on the value of the object. Plus, when you override equals() you need to provide a logical implementation of the hashCode() method which [URL="http://www.xyzws.com/javafaq/why-always-override-hashcode-if-overriding-equals/20"]adheres to the equals-hashcode …

Member Avatar for ~s.o.s~
0
144
Member Avatar for daviddoria

If memory serves me right, this is due to the "conversion view" setting of gmail. For changing it, log in to Gmail -> Settings -> General Tab -> Conversation view -> conversation view off should go the trick.

Member Avatar for webstax
0
182
Member Avatar for oggiemc

Which browser do you use? What kind of privacy settings do you have for that browser? Are you using Firewall? If yes, have you added Daniweb to the list of trusted sites(if there is one)? AFAIK, Daniweb solely relies on cookies for session tracking, so anything which messes with that …

Member Avatar for Dani
0
161

The End.