35,618 Topics
![]() | |
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 … | |
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 … | |
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, … | |
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 … | |
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 ? | |
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 … | |
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 … | |
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 … | |
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 … | |
hello im new in java and i have to do simple program and can read from txt file ![]() | |
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 … | |
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 … | |
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 ? | |
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 … | |
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 … | |
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" … | |
can anyone show me the point to get the tutorial on how to print using shared printer in java (windows os) ? thank you all | |
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 … | |
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"?> … | |
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 … | |
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 … | |
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. … ![]() | |
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 … | |
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, … | |
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" … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … |
The End.