5,031 Posted Topics

Member Avatar for peter_budo

I have directory which is used to temporary store images while working with them. Once all process are done and images are not need it anymore I would like to delete them. I tried following code but it didn't work. Where is problem? [code] Runtime comPrompt = Runtime.getRuntime(); String[] execStr …

Member Avatar for uh63
0
2K
Member Avatar for sushilover25_78

The idea with using String is good [QUOTE=mr.sweetchuck;341970] [code] String mySubString = s.substring(0, 1); int newInt = mySubString; [/code] [/QUOTE] but you forgot to parse Integer [INLINECODE]int newInt = Integer.parseInt(mySubString)[/INLINECODE]. Yes I know this work but it is bad habit. Why did SunMicrosystem made the method parseInt()? Just to have …

Member Avatar for soumyajit
0
117
Member Avatar for NotThereAnymore

[CODE] public static char[] CharacterCheck(char userAnswer, String[] dictionary, String hidden_word) { char[] correctLetters; //int mistakeCounter; String answer_check; answer_check= correctLetters.charAt(); for(int i= 0; i < hidden_word.length[COLOR="Red"]()[/COLOR]; i++) { if(hidden_word.charAt(i)== userAnswer) { correctLetters[i]=userAnswer; } } return correctLetters; } [/CODE] hidden_word is missing bracklets on the method call However I do not know …

Member Avatar for NotThereAnymore
0
130
Member Avatar for ajay_tabbu

You should not make any changes to instalation of your Java! No adding new folders or files. So place your folder MyPack somewhere else on the disk. My only experience with package are that the package have to be in same folder us program with main method and you can …

Member Avatar for ajay_tabbu
-1
155
Member Avatar for Lisi

Your first question is not very clear to me, what I understand is you want to find all even numbers in the array and add them together, plus you wish to keep a track of have many even numbers are in the array [code] int total = 0; int evenCount …

Member Avatar for Lisi
0
68
Member Avatar for omoz4real

Put your images in array, use random generator to get number between 0 to 5 and then display the image which is on position in array of your random generated number

Member Avatar for omoz4real
0
1K
Member Avatar for developer4321

In the case that line is horizontal x1 == x2, if line is vertical y1 ==y2. 1) So what you do collect pointer position(a,b) 2) Find out if your line is horizontal or vertical A) If horizontal a == x1 && ( b >= y1 && b =< y2) B) …

Member Avatar for developer4321
0
95
Member Avatar for Salim_22

As dukane sais it is realy easy. Your assignment actualy point to one. Encryption from Julius Caesar so called Caesar cipher read more [url]http://en.wikipedia.org/wiki/Caesar_cipher[/url] plus here is a presentation on basic encryption randomly found on google [url]http://www.eecg.toronto.edu/~lie/Courses/ECE1776-2005/Lectures/Lecture7.pdf[/url] It is nothing difficulty you just play with letters order

Member Avatar for Salim_22
0
123
Member Avatar for bondo

Welcome bondo, hope you enjoy our huge community and find answer to your questions

Member Avatar for happygeek
0
121
Member Avatar for ram maradola

Instalation will take care of everything, just download the one without JDK as you have one already installed on your system

Member Avatar for peter_budo
0
51
Member Avatar for kapkan

Nicely done, we would be able to help you as that wasn't part of the code and rest which you provided does look fine

Member Avatar for peter_budo
0
85
Member Avatar for asghar_hashmi
Member Avatar for peter_budo
0
98
Member Avatar for bondo

This is not very good practice [INLINECODE]line.charAt(x) == mark[/INLINECODE] you should use Character methods [B]compareTo()[/B] which return integer [QUOTE]the value 0 if the argument Character is equal to this Character; a value less than 0 if this Character is numerically less than the Character argument; and a value greater than …

Member Avatar for iamthwee
0
115
Member Avatar for pavani2006

I would suggest to sort the array first and then it is simple just reguest number on second possition. Also keep in mind that you may have first two number of same value so the second smallest should be on 3rd position(but that is just extra feature of your program)

Member Avatar for ajay_tabbu
0
164
Member Avatar for bkhojo

For such complex idea you provided very short explanation Also what you expect from us? To do all coding for you?

Member Avatar for peter_budo
0
47
Member Avatar for A Yasir

Make shure your MySQL database is runnig ( I sometimes forget I switch it off) I'm using Windows XP and my JDBC connector is in "[I]C:\Program Files\Java\jdk1.6.0\jre\lib\ext[/I]" plus you should place there [I]servlet-api.jar[/I] and [I]jsp-api.jar[/I] which you can find in your Tomcat directory (in my case [I]C:\Tomcat 5.5\common\lib[/I]) This should …

Member Avatar for A Yasir
0
294
Member Avatar for rittik

NEVER try to connect to database from JSP! If you need data from DB use servlet and then pass them to your JSP...

Member Avatar for jwenting
-1
106
Member Avatar for katy238

Is this question related to Java programming or you just want to know how to use some FTP application to upload your file?

Member Avatar for peter_budo
0
40
Member Avatar for sadbhavini

You are trying to run a program without "main" method. Check your class if it has "main", if yes check your spelling. If your class hasn't got "main" method, does this class is called by another class which has "main"? If you think my answer was sufficient post the code …

Member Avatar for masijade
0
82
Member Avatar for avadhut

If you using Apache Tomcat with instalation of examples you can find simple example in one of their examples. This one actualy let you name event and time of event, but if you clever you can make it worj your way

Member Avatar for jwenting
0
131
Member Avatar for anju114

Pet.class is product of Pet.java, that what you get once you compile your source code in java file. Pet class can't be find because you are not calling that class properly, maybe mistake in spelling or your constractor is not right. Can you please post your code, I think we …

Member Avatar for thekashyap
0
147
Member Avatar for ajay_tabbu

I don't see a reason to set the CLASSPATH, JAVA is absolutely happy to run just on PATH setup. Your CLASSPATH seting are strange `.;C:\Program Files\Java\jdk1.6.0\bin;.;C:\World` What is purpose of that extra semicolon and dot which I marked with red? And why did you set this CLASSPATH when after restart …

Member Avatar for jwenting
0
368
Member Avatar for John A

[QUOTE=jbennet;334845]how about programming challenges? whoever makes the program (could be a website too i suppose) that fits the sepcification best gets say, some webspace or some coding tools or a book[/QUOTE] Good idea, but I can spot there some possible problems... Will moderators and admins be allow to enter? If …

Member Avatar for happygeek
0
342
Member Avatar for bhuvan83

It is bad idea to setup conection to DB in JSP. It is all fashioned and left only for back compability from dark age of Java Web Development. You better of using servlets to handle connection and changes to DB

Member Avatar for peter_budo
0
106
Member Avatar for TingTing

I think you come to wrong forum. We do not do others people homework/coursework/assigments, we try to help and solve problems with in code you already writen. So if you did your work and have problem with code, please kindly post your code with problem description and we will try …

Member Avatar for TingTing
0
141
Member Avatar for Cerberus

[QUOTE=iamthwee;333847][url]http://www.particle.kth.se/~lindsey/JavaCourse/Book/Part1/Java/Chapter09/chooser.html[/url] [/QUOTE] very interesting website...

Member Avatar for peter_budo
0
171
Member Avatar for Narue

Isn't this going out of topic???? OK, I have newer edition of narue keybord, its [URL="http://www.logitech.com/lang/images/0/12248.jpg"]Logitech G15[/URL] wouldn't belive it on the begining but it is realy practical keybord Mice, I have another product of Logitech [URL="http://www.logitech.com/lang/images/0/12347.jpg"]MX518[/URL], love the side buttons for moving backward&forward, I always miss them on any …

Member Avatar for Serunson
0
1K
Member Avatar for bluebird

You better to edit your code, or nobody will read this mass of characters to find out what is what

Member Avatar for peter_budo
0
81
Member Avatar for Killswitch
Member Avatar for volscolts16

If you can be specific about confusion on loops, arrays and if/else we can try to help you. Also there is always java tutorial site [URL="http://java.sun.com/docs/books/tutorial/java/nutsandbolts/if.html"]if/else[/URL] [URL="http://java.sun.com/docs/books/tutorial/java/nutsandbolts/switch.html"]switch[/URL] [URL="http://java.sun.com/docs/books/tutorial/java/nutsandbolts/while.html"]do-while/while[/URL] [URL="http://java.sun.com/docs/books/tutorial/java/nutsandbolts/for.html"]for[/URL] [URL="http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html"]array[/URL] and do lot of practice

Member Avatar for blufab
0
173
Member Avatar for Masood Ali

I don't know any free download of Java books and if you get any most likely their are illigal However Sun website hold complite reference for each version of java. You can even download it on your pc if you want to but it is not necessary. Here is link …

Member Avatar for sangramtheroot
0
91
Member Avatar for hlnren

Firstly you need to know the size of array before you create one, so I would suggest to chalenge user to insert first number of values he wants to add to gether Secondly once you get that info create array of that size Third run for loop to get your …

Member Avatar for keya_datta
0
113
Member Avatar for shishir

Try this way ;) [code] public String ins_Deposit(String userid,int amount,String branch,String bank) throws SQLException { Statement ps = null; [COLOR="Red"][B]String output;[/B][/COLOR] try { ps = conn.createStatement(); String query="INSERT INTO BANK_TRANSACT VALUES('"+userid+"',sys_date,"+amount+",'D','"+branch+"','"+bank+"')"; int result = ps.executeUpdate(query); if(result>0) [COLOR="Red"][B]output = [/B][/COLOR]"Transaction successfully completed,amount will be credited to your account within 24hrs. "; …

Member Avatar for peter_budo
0
148
Member Avatar for peter_budo
Member Avatar for peter_budo
0
210
Member Avatar for san_fran_crisko

[QUOTE=san_fran_crisko;329569] [code] if (iInput == 1) { newcd(); } if (iInput == 2) { artistdisplay(); } if (iInput == 3) { genredisplay(); } if (iInput == 4) { yeardisplay(); } if (iInput == 5) { ratingdisplay(); } else { System.out.println("Thank you for using CDSystem"); } } } [/code][/QUOTE] If I …

Member Avatar for san_fran_crisko
0
147
Member Avatar for maui_mallard
Member Avatar for peter_budo
0
72
Member Avatar for Braga_ESI

Is done with use of JavaServerPages(JSP) or PHP? If your answer is PHP, click on Flag Bad Post link and request your post to be moved into PHP section. However if it is to be done in JSP you may need to provide some extra info...

Member Avatar for peter_budo
0
76
Member Avatar for mattyd
Member Avatar for nanasei

[QUOTE=jbennet;329446]Hit f8 repeatedly as soon as the pc starts up and choose safe mode. Wait until it boots into safe mode then log in as administrator go into control panel, select your user and choose to get rid of your password[/QUOTE] That will work only in case if nanasei want …

Member Avatar for DimaYasny
0
82
Member Avatar for Thendral

Well you will have to submit data and let controler(servlet) compare it against DB, if Employee ID already exist you will have to go back and display error message. Otherwise you continue with data processing. Other option is to have this ID's retrived from DB before any page displayed, something …

Member Avatar for masijade
-1
767
Member Avatar for Brent.tc

on each post there is option "flag bad post", in message just write something like "please move to different forum" best give it name of forum. So now you can do it

Member Avatar for Brent.tc
0
121
Member Avatar for talablink

You are mixing AWT with SWING, that is the problem [QUOTE=talablink;328493]i don't know how to add buttons to the code , it already has two buttons on it but i don't know how to add more...i just editted this one i've tried adding one more but it just won't work..it …

Member Avatar for peter_budo
0
95
Member Avatar for tech291083

I would love to contribute, but still didn't develop skills to write a proper tutorials. So at least I try to make a difference by posting on this forum

Member Avatar for ~s.o.s~
0
141
Member Avatar for Pumbaa_hughes75
Member Avatar for Pumbaa_hughes75
0
108
Member Avatar for Anaa

[QUOTE=Anaa;326804]i hav calculated a value(years).Now i want 2 merge it with an attribute of table(ml_y2 wher 2 is year).So i want 2 merge ml_y and 2.then i want 2 find the value of ml_y2 frm a table....plzzzzzzzz help me .can i do somthing like this in MY SQL???[/QUOTE] Try to …

Member Avatar for peter_budo
0
94
Member Avatar for The Dude

[QUOTE=Narue;316474]>so are you normal in real life then? It depends on what you would call normal...[/QUOTE] but we still love you (even then you kicked my butt on C++ forum couple times :cheesy: ) [quote=jbennet]im always "online" thanks to the wonders of a bluetooth conencted phone and my pda (hehehe …

Member Avatar for jbennet
0
138
Member Avatar for peter_budo

How do I call JAR which is in same folder as my java file? BUT I don't want to place this JAR file into JRE>lib>ext and also I don't want to create CLASSPATH for it.

Member Avatar for peter_budo
0
116
Member Avatar for method_man

don't you think is funny you able to do GUI but not simple calculations?? anyway there are some examples of vending machine in Java section posted not long ago plus there is list of similar threads just bellow post

Member Avatar for jwenting
0
102
Member Avatar for peter_budo

I'm trying to display text on GlassPane in front of image which I read in. There is no problem with image which does display but my text doesn't appear. What is wrong???? [code] import java.io.File; import java.io.IOException; import java.awt.*; import java.awt.image.RenderedImage; import javax.swing.*; import javax.media.jai.widget.ScrollingImagePanel; import javax.media.jai.NullOpImage; import javax.media.jai.OpImage; import …

Member Avatar for peter_budo
0
122
Member Avatar for Covinus

If I understand corectly, you try to open html document with Java. If so, you may want to read this [url]http://today.java.net/pub/a/today/2004/10/14/jdic1.html[/url]

Member Avatar for peter_budo
0
85

The End.