4,084 Posted Topics
Re: why would you run a jar within an ide? you should run your classes from your ide. | |
Re: you shouldn't have any java code in your jsp, not just jdbc connectivity code. this might be a good time to start reading up on servlets, the whole 'MVC' story and the possibilities it gives. since we don't know what it is you're trying to generate (you could always run … | |
Re: InsaneComputer: not only is this a bit a waste of effort (considering the original post is over 6 years old), it's also not the point of the forum to spoon-feed code. by copy pasting some code, they won't learn, it's better to help them understand what to do, so they … | |
Re: you mean in a Swing application? just load the appropriate image using the actionPerformed method(s) | |
Re: shela: this thread is 4 years old. no point in reviving it. also: the code to run is in the original post. so what 'basic code' are you looking for? if you don't understand that code, or don't agree with how it was written, do what anyone else would do: … | |
Re: saying "it should do so and so" without mentioning what it is doing currently (does it run? does it return a (wrong) value? is an exception thrown? .... " is a bit pointless. we don't have your setup (config, db, ... ) so we can't just copy paste your code … | |
Re: I do question the use of this a bit: ` (java.lang.String[])null` | |
Re: a beginner? what do you mean, a beginner? just beginning with Java Swing, just beginning with Java itself? ... you can add a changelistener to your textfield. keep the possible values in a list, on each change of the textfield check whether it's empty, if not: build a new list … | |
Re: what RoutingPacket class are you using? it looks like it hasn't got a setDestid method which takes a single int as a parameter. | |
Re: MyThread t = new MyThread(); t.start(); MyThread t2 = new MyThread(); t2.start(); could be a good start. | |
Re: if it updates no matter what pass/user you provide, my guess: you did something wrong during the configuration. | |
Re: I doubt forums like this one (technical, resources, ... ) will die out in favour of social media/networks. those fora that are just about "hey, let's catch up" ... well, I've noticed a huge decline in some I used to visit, ever since Facebook came into the field: real time … | |
Re: import statements rock when running into exceptions like that. | |
| |
Re: google to the rescue: http://www.massimilianomarini.com/04/07/2011/how-solve-jvm-creation-failed-error-when-starting-netbeans | |
Re: HappyGeek told you what to do: start a NEW THREAD in the CORRECT FORUM. provide detailed information, and turn off the CAPS-LOCK. | |
Re: dany: J2EE became out of date in 2006, J6EE doesn't exist. after J2EE it became Java EE <version>. depending on what you call Java web frameworks ... there are tthe basics, jsp and servlets, then again, you can implement Spring MVC, Struts, and there's GWT. in GWT, you hardly use … | |
Re: the jsp is the front-end, which should not be aware of the database. what exactly is the question? | |
Re: can't say I ever heard of that book ... does this mean you're only available to help with issues from this particular book? | |
Re: it's a bit little code to be definitive. what you also can do, is add them both, just toggle between visible and invisible. | |
Re: have you tried making your LinesProject class Serializable? | |
Re: no, we can't, since we don't know what (type of) variables you 'll need to use. | |
Re: [QUOTE=jwenting;1192765] Which of the two applies to you?[/QUOTE] could be both | |
Re: actually, they are updated for modern systems, and can, like tons of other older games, be bought for a small fee on [GOG.com](http://www.gog.com). I bought mine there a few weeks back (along with the original Carmageddon) and I can assure you, they work pretty well, but of course the graphics … | |
Re: JavaScript and Java are not related. perhaps [this link](http://www.daniweb.com/web-development/javascript-dhtml-ajax/117) is more suited for your question. | |
Re: so ... you don't know how to calculate the percentage? in your normalize method, maxScore is 100%. use that to find the percentage. | |
Re: you understand that mentioning what the parts are you are struggling with would make it easier for us to help you, right? | |
Re: can you be a bit more clear on what it is you try to do, give for instance an example of 'input= ... , expected output = ... ' | |
Re: you do add an awfull lot of try-catch blocks, without checking whether a previous (required one) is completed without exception. you may want to re-think that. also: are you working on a local server? otherwise you might get a lot of exceptions, but you just don't see them. debugging might … | |
Re: you only wrote code to display one single image, what did you think would happen? Image img = Toolkit.getDefaultToolkit().createImage(image); img = img.getScaledInstance(100, 200, Image.SCALE_SMOOTH); ImageIcon icon = new ImageIcon(img); JLabel lPhoto = new JLabel(); lPhoto.setIcon(icon); you only get the last image, because you read them all, override each previous value, … | |
Re: developing something and 'getting the code' is not the same thing. your question isn't very clear, can you specify? also, we don't just 'hand out' custom made code. we help you improve your own. so you'll have to show us exactly what it is you've done so far, and what … | |
Re: that is not related to Exception handling. it's also not really different. in the first statement, you initialize the BufferendReader the very moment you declare it. in the second, you declare the BufferedReader, but instantiate it later. | |
Re: your fault is that you store a reference to the vector in the other vector. since you overwrite the values in that subvector, it changes in the result as well. | |
Re: ehm .. ok. you do understand we have no idea what tabs you are talking about, right? | |
Re: if you have to take into account other actions (+, -, :? *) and or brackets, split might not be the easiest way to go. | |
Re: decent specs ... specs for what? what will you use them for? gaming? video editing? use of office tools and writing mails? budget limits ... well, since we don't know what your budget is, we can't really take it into account. for you, budgetted might be 100, but it might … | |
Re: if you already have the code that retrieves it 1 time ... run that code several times. or, replace your query statement = connection .prepareStatement("select image from image where id = 1"); with something like: statement = connection .prepareStatement("select * from image"); then later on, based on the id, you … | |
Re: so you have code that inserts one image into your db? how about calling that code repeatedly? | |
Re: apparently there is an error while instantiating that class. http://www.checkupdown.com/status/E500.html | |
Re: start with a index.jsp page, instead of a .html page. html is static, not dynamic. then, in the servlet of your action, choose, based on the conditions you pass, what url to go to. | |
Re: if you are new to Java, don't just copy paste some code you've "found [a program] on the web" write your own. a sorting algorithm is pretty basic and very easy. go step by step. write a small piece of pseudo code and implement that. Start4Me: never just provide custom … | |
Re: try a ping before you do anything else. ping for one or more very reliable sources (www.google.com, www.facebook.com, www.microsoft.com, ... ) chances of those going offline are pretty slim. ping fails? (especially for all of them?) it's pretty sure you're not connected. | |
Re: why exactly would you want to 'shorten' that? there's not really anything in it. you would do wise as to add a few methods, for instance, overriding the equals method and maybe the toString method, of course depending on what you need to do with the class. I'm not sure … | |
Re: even more important: since I assume DVDTitle and the return type of getDVDTitle() are both String instances, for (int i = 0; i < movieArray.length; i++) { if (searchDVDTitle == movieArray[i].getDVDTitle()) { is not the right way to compare them. do realize, that while == MIGHT return the correct result, … | |
Re: editing posts can in some cases also misunderstandings, comparable to the diamond of death person: let's say the OP asks a question that can be solved in two ways, say approach one and approach two. a first person replies, explaining the first approach. now, he posts his reply, and a … | |
Re: I don't get your code to work at all. why do you even need that while or if statement? there's no need for it. just replace it with `String phrase = input.nextLine();` actually, with this: public static final char[] alphabet = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', … | |
Re: not so sure. can you add a print statement of total after this line: `total += rand.nextInt(11)+1;` it's better to declare hit outside the while though. |
The End.