736 Posted Topics
Re: [QUOTE]I created the package and I am able to run it on Windows environment but I have now shifted to Ubuntu Linux, and unable to run on that and of the most unable to set the class path...................plz help me out!!!!!!![/QUOTE] I have been using Linux with Java for a … | |
Re: [QUOTE]kindly discuss about the scanner class and its importance [/QUOTE] Looks like a homework assignment question to me. Anyway you are in luck, I found the answer you are looking for [URL="http://lmgtfy.com/?q=Scanner+Java"]here[/URL] | |
Re: A Quote from the announcement section:- [QUOTE]Also, to keep DaniWeb a student-friendly place to learn, don't expect quick solutions to your homework. We'll help you get started and exchange algorithm ideas, but only if you show that you're willing to put in effort as well.[/QUOTE] So ... where is your … | |
Re: [QUOTE]it says that the amount variable has not been initialized[/QUOTE] Thats cause in the futureInvestmentValue() method if for some reason you 'while' condition is never satisfied, then the amount variable would contain just garbage, hence the compiler is pointing it out to you beforehand by giving that error, just initialise … | |
Re: [QUOTE]Just to complicate it some of the books have more than one author[/QUOTE] No offence meant here, but problem seems like an outcome of bad table design. There are are currently two entities which I can see in your data model: Author and Title. Now one Author can have multiple … | |
Re: Well you have not mentioned the problem and just visually going through the code, I am guessing its a compile error caused by a missing double quote on line 47: [CODE]System.out.println(execeed 100 = "+ sum +" )");[/CODE] Should be:- [CODE]System.out.println("execeed 100 = "+ sum +" )");[/CODE] | |
Re: [QUOTE]Yes I do use open source software. My own computer (not work pc) uses linux and a whole suit of open source software. [/QUOTE] Well if you are on linux, the office suite that you are using will be OpenOffice, which is one of the largest Open Source Java efforts. | |
Re: Post the contents of your web.xml file, since the problem appears to be there. Also I hope you have placed your class file (of the Servlet class), at the correct location (WEB-INF/classes or WEB-INF/lib[for jars]). Another thing is remember to close your PrintWriter once you are done using it, like … | |
Re: [QUOTE=jon.kiparsky;1283037]Wow, a perfect zero of a post. Can we make this a sticky, under the heading "how not to ask for help"?[/QUOTE] It is not correct to rebuke new members jon. @anju_soosan [URL="http://lmgtfy.com/?q=java+mini+project+topics"]Here[/URL] is a comprehensive list of mini projects you can do in Java | |
Re: Quote from the Announcement at the top of the Java forum:- [QUOTE]..., to keep DaniWeb a student-friendly place to learn, don't expect quick solutions to your homework. We'll help you get started and exchange algorithm ideas, but only if you show that you're willing to put in effort as well.[/QUOTE] | |
Re: [QUOTE]u could hv used code tags to post d code here n plz also post wht errors u r getting [/QUOTE] Since you are reminding each other of the rules, here is one for both of you:- [QUOTE]Keep It Clean We strive to be a community geared towards the professional. … | |
Re: [QUOTE=har58;1282404]i tried using it without package without package its working fine plz help[/QUOTE] Try running it is [code] java -cp . admins.admins [/code] '-cp', abbreviation for ClassPath tells the JVM where to look for your class files (or libraries or the top level package folder in this case) The '.' … | |
Re: [QUOTE]do you have sample code please do the needful.[/QUOTE] Ehhh . . . . .Why ? | |
Re: Use Regular Expressions for Pattern Matching. Tutorial for Regular Expressions:- [url]http://java.sun.com/docs/books/tutorial/essential/regex/[/url] | |
Re: [QUOTE=staneja;432741]You do one thing before craeting a war file you remove Source folder from src directory and let it have only complied classes In this way when you will paste it in the webapps folder it wont be having SRC folder only classes will be there Well about the desktop … | |
Re: [QUOTE]m doing project on tracking keyboard,mouse & URL activity. which programming language is much easier to implement this project? Is Java better or VC++ is more better option?[/QUOTE] Seems like an academic project, so normally the language you know best is the easiest option. | |
Re: Sorry don't have crystal ball so can't predict the future !!! | |
Re: [CODE=C]#include "Helloworld.h" JNIEXPORT void JNICALL Java_helloworld_hello (JNIEnv *, jobject) { printf("Hello world!\n"); return; }[/CODE] Now I am curious, how did that compile, if I haven't completely forgotten my C++, shouldn't there be a name given to the parameters of the function in the definition like this:- [code=C] JNIEXPORT void JNICALL … | |
Re: I do not think you have yet compiled the code, else you should get an error at the following line in aMethod() method:- [CODE=java] names.add(name2[i]);[/CODE] The error should be 'Cannot refer non-static variable from static context.'. The names variable should also be declared static to be accessible from a static … | |
Re: Create an HTML form with a hidden field containing the value of the variable and the action attribute pointing to the servlet you want to call Finally On click of the Hyperlink, use javascript to perform a post action on the form. A few references:- [URL="http://www.java2s.com/Tutorial/JavaScript/0140__Function/Callafunctioninhyperlink.htm"]Calling a javascript function in … | |
Re: Now if I use the correct wordings, a ThreadSafe class basically guarantees that any operations performed on it would not cause the data in it to get corrupted. This is what the ConcurrentHashMap guarantees, but the situation you are talking about is performing two separate operations atomically on a ConcurrentHashMap, … | |
Re: [QUOTE]It probably doesn't because it extends AbstractMap which already defines equals to perform content based comparison, not reference based.[/QUOTE] AbstractMap defines the equals method based on which Maps, extending it can be compared. It seems to me that you are confusing it with the equals() method of the 'keys' which … | |
Re: [QUOTE]hi taywin so I can assign firstword = ATOM and lastword != H? is it possible for me to do that? and I have a question, how do i show the output? System.out.println(linString.split); [/QUOTE] @yap_1991 Instead of reading the first and last word, read the entire line and match it … | |
Re: @NewOrder [URL="http://www.daniweb.com/forums/misc-explaincode.html"]Use Code Tags the next time you post code.[/URL] Now when it comes to your program, [URL="http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html"]first store all the numbers entered by the user in an Array[/URL]. So you can perform processing on them later. Calculating the Average is simple, just sum up all the numbers The following … | |
Re: Ehhh... We knows you have problem, but [I]What is the problem[/I] doc ? [code=java] Double.valueOf(args[0]).doubleValue() [/code] Extracts a [B]double[/B] value from the given [B]String[/B] object (args[0]). Same can be achieved a bit more easily by just [icode]Double.parseDouble(args[0])[/icode] | |
Re: [QUOTE]-Xbootclasspath/p:'D:\Document's\Downloads\wiiuse\SampleAppWiiuseJ\${endorsed.classpath}'[/QUOTE] Checkout line 199 in your build-impl.xml, and see if the extra quote in [icode]Document's[/icode] is valid, if you have no such folder, then delete the quote. | |
![]() | Re: lets first clear our concepts here first, Netbeans is an IDE, not your implementation language (unless you meant Netbeans RCP), what you are coding in is Java. [QUOTE]Any ideas???? [/QUOTE] You told us what you are planning on doing, so I am a little blank here on what ideas you … |
Re: The API says:- [QUOTE]BlockingQueue implementations are thread-safe. All queuing methods achieve their effects atomically using internal locks or other forms of concurrency control. However, the bulk Collection operations addAll, containsAll, retainAll and removeAll are not necessarily performed atomically unless specified otherwise in an implementation[/QUOTE] It says specifically [B]"bulk Collection operations … | |
Re: [QUOTE]it tells me that there is an else with no if.. why is that? [/QUOTE] [B]Always[/B] use braces ({}) with your if,else, while, for ... statements as mentioned by the [URL="http://java.sun.com/docs/codeconv/"]Sun Java coding conventions[/URL] and you will be able to spot your error. | |
Re: Well your IDE has already suggested four possible reasons for the problem as mentioned below :- [QUOTE]Possible reasons include: - IDE timeout: refresh the server node to see if it's running now. - Port conflicts. (use netstat -a to detect possible port numbers already used by the operating system.) - … | |
Re: [QUOTE]What would be the best database option available for such software. We are looking for databases which have decent functionality and not royalty based distribution costs associated with it. e.g Mysql has licensing costs associated with commercial distribution of software. Should postgresql be used as its free to redistribute with … | |
Re: Have you tried [icode]response.sendError(HttpServletResponse.SC_NOT_FOUND)[/icode] | |
Re: [QUOTE]but dont have much idea abt JNI[/QUOTE] [URL="http://java.sun.com/docs/books/jni/"]Here is a nice place to start out with JNI[/URL] | |
Re: Are you sure you haven't by any chance mixed up the "eclipse" version, like 32 bit Eclipse on a 64bit JVM or vice versa ??? BTW which distro of Linux are you on ? I've had nightmares trying to get my Eclipse run on Ubuntu 7.10 and 8.04, however since … | |
Re: [QUOTE]Hi, Im trying to match patterns to get A-F and number range 0-9 So like 9D 4EEE Not 15d [/QUOTE] I cannot make any reasonable guess from that on what sort of string should be accepted and what not !!! But in either case your regular expression (regex) is incorrect, … | |
Re: You could take a look at the following:- [URL="http://www.javaworld.com/javaworld/jw-10-2000/jw-1020-print.html"] Printing in Java[/URL] (Very old article so information could be obsolete) Java Print Service ([URL="http://java.sun.com/javase/6/docs/technotes/guides/jps/spec/JPSTOC.fm.html"]1[/URL],[URL="http://java.sun.com/products/java-media/2D/learning/tutorial/index.html"]2[/URL],[URL="http://java.sun.com/javase/6/docs/technotes/guides/jps/index.html"]3[/URL]) | |
Re: The [icode]System.out.println[/icode] is run on the server side when the Web Server detects that someone has requested for your JSP page. Following is in brief the lifecycle of a JSP page:- [QUOTE]When a request is mapped to a JSP page, it is handled by a special servlet that first checks … | |
Re: We need to see your JSP or servlet code to be able to pin point anything. Also you have edited out the part of the exception stack trace which would have pointed to the exact line on which the servlet for your JSP encountered the error. My [I]blind[/I] guess is … | |
Re: Take a look at [URL="http://oreilly.com/java/archive/tomcat.html"]this article on deploying web applications in Tomcat[/URL]. | |
Re: Well you could write a program to convert the column delimiters to 'commas' and row delimiter to line feed i.e. convert the file to a CSV format, which Excel can read. However if you want to convert the file to the Excel Proprietary format (XLS) take a look at [URL="http://poi.apache.org/"]Apache … | |
Re: The erroneous line is Line 49 in the post, Your "slots" variable inside the main() method is an ArrayList of integers. So [icode]slots.get(i)[/icode] returns an Integer object, and last I checked the [URL="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Integer.html"]javadocs of Integer class[/URL] did not have any such method. | |
Re: If you plan on using the [URL="http://joda-time.sourceforge.net/"]Joda Time API[/URL], it is as simple as:- [QUOTE] [COLOR="Green"]How do I calculate the difference between two dates?[/COLOR] This question has more than one answer! If you just want the number of whole days between two dates, then you can use the new Days … | |
Re: We may be able to help, but need to know exactly how are you sending those messages ?? Do you have an account with a Sms service provider or you used a GSM Modem, If it is the former then what type of connectivity have you used to send the … | |
Re: The data download for your newfile.csv, doesn't fail, it is downloaded, try opening that file via notepad or some other text editor and you should get have all the data in it (even if the file has more than 65535 rows), the problem is with 'MS Excel', it cannot handle … | |
Re: Your code in the InheritanceExample class needs to be inside [I]the[/I] main method for it to run as you want it. Wrap up all the code inside the InheritanceExample class inside a main as shown below:- [code=java] public class InheritanceExample { public static void main(String[] args) { //-> My Addition … | |
Re: That is because the [URL="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html#charAt%28int%29"]charAt() [/URL] method of the String class returns a "char" and you are assigning it to a String type. Use the[URL="http://java.sun.com/javase/6/docs/api/java/lang/Character.html#toString%28char%29"] Charater.toString(char)[/URL], to convert you 'char' to a String type. Or alternatively you could make your "sample" variable from a String array to a 'char' array. | |
Re: Lets take a look at your actionPerformed() method:- [code=java] public void actionPerformed(ActionEvent e){ if(e.getSource().equals(exit)){ System.exit(0); } String text=((JButton)e.getSource()).getText(); System.out.println("Value of text " + text); try{ z=Integer.parseInt(text); if(z==1) System.out.println("Its Working"); try{ // YIKES, why are you creating your buttons all over again !!! ImageIcon icon[]=new ImageIcon[52]; JButton b1[]=new JButton[52]; //for(int i=0;i<b1.length;i++){ … | |
Re: sciprog1 use the "codebase" attribute of the "applet" tag, since I am guessing from the mention of the public_html directory, you are viewing your html page via a web server. You can find out how to use the codebase attribute here: [url]http://java.sun.com/j2se/1.4.2/docs/guide/misc/applet.html[/url] | |
The End.