35,618 Topics

Member Avatar for
Member Avatar for hprem991

Hi All, I am designing a web page using JSP / JDBC / JavaScript and apache tomcat 5.5. There seems to have a major issue after few page request. Initially, all pages respond was excellent but after few ( 10 - 15 ) requests, the respond time drops to minutes …

Member Avatar for harinath_2007
0
102
Member Avatar for Sarama2030

Hi guys Im developing this java application and i have the following hurdles: a) I would like to develop an installer for all platforms(including windows,linux and Mac). b)Can someone please illustrate clearly how to connect to a mysql database in java after having downloaded the driver(connector/j) and having imported all …

Member Avatar for DavidKroukamp
0
236
Member Avatar for ForceStr

Hello, I need help with my app. It works great, but when I build the project, the program doesn't want to connect to database (when Netbeans is off), it writes error: java.net.ConnectException: Error connecting to server localhost on port 1527 with message Connecton refused. I have derbyclient.jar imported to libraries, …

Member Avatar for DavidKroukamp
0
113
Member Avatar for c.pentasuglia

If i have a jar file on a server, and i have a program that needs to use the file as a dependency on the server also. How could i patch up the code to build without the dependecy before i deploy it. I know it can use the dependency …

Member Avatar for DavidKroukamp
0
241
Member Avatar for resiak

i'm an IT student. Our Instructor gave us assignment to edit and delete txt file. how to edit and delete text file in java? can you give me the code ?

Member Avatar for DavidKroukamp
0
227
Member Avatar for rdhiravani

Hi, I have a swing application which works on CSV file. It reads full file line by line, computes some required statistics and shows output. The Upper part of output screen shows each record from file in that order in JTable, whereas lower part shows statistics computed based on that …

Member Avatar for JamesCherrill
0
173
Member Avatar for rajesh1158

public class Twisty { { index = 1; } //need clarification here int index; public static void main(String[] args) { new Twisty().go(); } void go() { int [][] dd = {{9,8,7}, {6,5,4}, {3,2,1,0}}; System.out.println(dd[index++][index++]); } } In the above code, inside the instance initialization code, index is used. But it …

Member Avatar for JamesCherrill
0
148
Member Avatar for Hektik1

Hey guys, I am trying to make a program that allows you to input music artist into an array. The array row length is dependent upon a number entered by the user. There are only three column. I am having trouble with a line inside the for loop printing twice …

Member Avatar for Hektik1
0
177
Member Avatar for baseballer

I am trying to write a program that will allow the user to search for a first or last name within a document full of people's names, and respond with the position of that name within the .txt file. What I have right now keeps returning -1 for the position …

Member Avatar for NormR1
0
222
Member Avatar for ct_hunny
Member Avatar for javaprog200

Hello, The following program has a JFrame which contains an image, JTextArea and and a textfield. How can I display the image inside the text area? I will be grateful for any help! Thank you! import javax.swing.*; import java.awt.*; import javax.imageio.ImageIO; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.awt.event.*; public …

Member Avatar for DavidKroukamp
0
5K
Member Avatar for lj81

Hi I'm currently writing a program which applies collision detection to balls on the screen. My code works to a certain extent (the balls collide however they do not rebound away from each other) but it is not written efficiently. Here is the code that partially works: private void checkForCollision(Ball …

Member Avatar for lj81
0
172
Member Avatar for shandow

I need to calculate the difference between two timestamp or datetime fields (0000-00-00 00:00:00) into hours, any idea or reference can share ?

Member Avatar for shandow
0
72
Member Avatar for <HHH>

I have an ArrayList Contain Strings as follow 1, 200, 2 , 434 , 3 , 400 , 4 , 500 ............................... and so on how i can remove the number 1,2,3,4 i tried the followinh code but its not worrking for (int i=0;i<content.Size();i++){ if(i%2== 0 ) // if the …

Member Avatar for JamesCherrill
0
129
Member Avatar for c.pentasuglia

So i have a java program running as a lib on a server. I need to just simply run a method within that library. In order to do so through J2EE, i need to get a call from a JSP -> EJB ->ResourceAdapter->Method. So i have the Reasource Adapter and …

0
144
Member Avatar for Kitt3nkat

I am trying to create a 2d table that asks for user input to create table size, adds all the numbers across each row, and creates the next row by multiplying by the first row. Here's what I have and it's now giving me an "Exception in thread "main" java.lang.NullPointerException" …

Member Avatar for NormR1
0
887
Member Avatar for robin99

can anyone show me the point to get the tutorial on how to print using shared printer in java (windows os) ? thank you all

Member Avatar for robin99
0
587
Member Avatar for polarbear125

I have the following program, and I want to print the appropriate return statement for the numbers given. I am currently getting the error "cannot find symbol variable result, lines 18 & 19"... how do I get it to work, though? I've tried a few different ways, and this is …

Member Avatar for polarbear125
0
182
Member Avatar for koricha

i get an error "org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 18" i think my exception code is wrong. i don't know how to return an empty string when the user doesn't enter any number and clicks "continue". any suggestions <%@ page import="java.io.*"%><%@ page import="java.util.*"%><?xml version="1.0" encoding="UTF-8"?> …

Member Avatar for thines01
0
188
Member Avatar for sdr001

Hey everyone, I am having some trouble parsing a string in java. I get a string from a databse, then I want to put it into a String Array to access two elements in the array (x and y positions). I think my problem is when I try to split …

Member Avatar for NormR1
0
226
Member Avatar for Sgt. Pepper

Hello, My assignment in class is to write a notepad program in java, using only the .io and .awt extensions (I believe that's what they're called). Now, I've got every part of the program working, except the save and saveAs functions. I've spent roughly 5 hours looking for and trying …

Member Avatar for JamesCherrill
0
783
Member Avatar for sarrrry92

Never mind my last post(I don't know how to detete) How to do the main? Write a program that has an array of 5 Strings, and determines which ones are palindromes (letter-case does not matter) . Your code will be written in one class Palindrome.java and has a main() method. …

Member Avatar for joankim
0
169
Member Avatar for brandon66

Hey guys im new to java in the process of learning how would i go buy adding exceptions to my code with a try/catch when i divide by zero or enter a word instead of and integer. package errorapp; /** * * @author Brandon */ import javax.swing.JOptionPane; import java.util.InputMismatchException; public …

Member Avatar for NormR1
0
211
Member Avatar for ITOzann

Hello guys, I've been trying to finish a project. But I seem to be stuck. I'm suppose to get the following output: [1:18:10, 2:33:10, 3:21:10] Remove customer:1:18:10 Remove customer:2:33:10 Remove customer:3:21:10 [Cashier:1001:0-0:Customer:null, Cashier:1002:0-0:Customer:null, Cashier:1003:0- 0:Customer:null, Cashier:1004:0-0:Customer:null] Remove free cashier:Cashier:1001:0-0:Customer:null Remove free cashier:Cashier:1002:0-0:Customer:null Remove free cashier:Cashier:1003:0-0:Customer:null Remove free cashier:Cashier:1004:0-0:Customer:null [Cashier:1001:13-31:Customer:1:18:10, Cashier:1002:13-46:Customer:2:33:10, …

Member Avatar for ITOzann
0
381
Member Avatar for koricha

i am trying to get the sum of 2 number.. it should give me a message if the sum is correct. i get an error "21 in the jsp file: /index.jsp Incompatible operand types String and int" .any suggestions whats wrong with the program. <%@ page import="java.io.*"%><%@ page import="java.util.*"%><?xml version="1.0" …

Member Avatar for IIM
0
2K
Member Avatar for lena1990

hi i want to move from one applet that is displayed in html to another applet that is also displayed in html how i can do that thanks for help

Member Avatar for NormR1
0
90
Member Avatar for DavidKroukamp

Hmm i really like what applications like Windows Media Player and VLC player can do, and by this i mean: you know when you are watching a movie or listening to music and you minimize the window? Well if you hover the taskbar icon of the minized window with your …

0
191
Member Avatar for Valten1992

I'm currently adding a dashboard-like view to my web project, which polls data from OIDs using SNMP. My current step is to use AJAX to reload the page but I'm running into some design issues on that front. Accessing the servlet class on the server will generate hello.jsp, which displays …

0
138
Member Avatar for Traps

Say I have an image-generating website and every image is unique, and there is no way to know of the images beforehand, and each image has it's own page. On a button-click I would have to generate this unique (.JSP) file/page and then display the image in that one. e.g …

Member Avatar for Philippe.Lahaie
0
129
Member Avatar for tendaimare

I am going through some tutorials in java and I would like to do my first insert into an SQL express database using java .I saw some tutorial recomending jdbc insert. I would like to know which is the best and most reccomended way to carry out an insert into …

Member Avatar for tendaimare
0
161

The End.