36,051 Topics

Member Avatar for
Member Avatar for mydreamgirl

I installed Apache Tomcat 7.0.28 in my JBuilder6. I use JDK 1.6.0_32 (jre6). I can get http://localhost:8080/ page. However, when I tried to run my JSP file, I encountered following error: org.apache.catalina.startup.Bootstrap start -config "C:\Documents and Settings\user\jbproject\whoznextdoor\conf\server8080.xml" -nonaming Jun 23, 2012 8:22:47 AM org.apache.catalina.startup.Bootstrap main WARNING: Bootstrap: command "-nonaming" does …

Member Avatar for mydreamgirl
0
368
Member Avatar for skiabox

I have two panels. One with the price (OHLC) and a moving average, and one with the volume. I want to create a middle panel with to oscillators that oscillate around zero. Each oscillator is the difference of two moving averages of the chart above it. Is it possible? Thank …

Member Avatar for skiabox
0
198
Member Avatar for libathos

I want to consume a WCF service with DataContracts from my Android app, and I'm using Eclipse as my IDE. In .NET when I add a service reference I automatically get metadata and automatically-generated code for calling that service. Is there a way to do so in Java/Android/Eclipse? I wouldn't …

Member Avatar for libathos
0
126
Member Avatar for libathos

hi guys i need to develop an application and to do so i need to import in my project some web references.Does anybody has any idea how i can do that in eclipe(juno version)

Member Avatar for libathos
-1
415
Member Avatar for rahul.ch

Here when I execute the program, the output I'm getting on all the tries is 342 (naturally first 34 prints together then 2 seconds later 2 prints). My doubts is that is the order of start() [x.start() followed by y.start()] important in order of execution? Shouldn't the output be 234? …

Member Avatar for rahul.ch
0
267
Member Avatar for maredinaveen

hello everyone ,i am new to daniweb club i am so much happy to meet you here i am an MCA fresher i have confusion to get train in software technologies so please help and advise which technology presently in market .i am planing for datawarehousing please give your openions …

Member Avatar for hkwhitten
0
89
Member Avatar for Venks

Hai Friends, How to access multiple result sets in java? iam using getMoreResults, but iam able to access only half of data from second table... is there any way to access. please help me for this problem

Member Avatar for jeremfg
0
151
Member Avatar for 47pirates

I've a bill which looks like ![untitled31](/attachments/large/2/untitled31.JPG "untitled31") this is the paper which i use in printer and i want to print the appropriate value in the correct position of that paper. As in the place of date i want to print date and in the place of Rate, Amount …

Member Avatar for JamesCherrill
0
138
Member Avatar for rahul.ch

Two doubts: 1. Placing run() inside main() generates "illegal start of expression error"? So why can't run() be placed inside main()? 2.With the above code I am getting the output as A C D B. Why B comes last is because of join(). But what I'm unable to understand is …

Member Avatar for rahul.ch
-1
229
Member Avatar for amin.sohal

Hi, Here I face one problem in java application. I am working on one project, developed in java 1.4 & 1.5 swing, jboss, applet on netbeans 3.6. But I got an error when I try to debuge or execute in netbeans "IO EXCEPTION WHILE READING: Localhost". Project is successfully build. …

Member Avatar for rubberman
0
94
Member Avatar for rahul.ch

I have a question in SCJP text book by Kathy Sierra and Bert Bates in Development chapter. Q. Given the default classpath: /foo And the directory structure: foo | test | xcom |--A.class |--B.java And these two files as mentioned in the code snippet section. Amongst the choice, 1. javac …

Member Avatar for stephen84s
0
320
Member Avatar for rpjanaka

hi all. I have a form in [COLOR=darkred]page1.jsp[/COLOR]. the action for that form submit is in [COLOR=sandybrown]page2.jsp[/COLOR] so I want to just come back to the [COLOR=darkred]page1.jsp[/COLOR] after processing the request.(reload the first page again) so in [COLOR=orange]page2.jsp[/COLOR], how can i redirect the display page to the [COLOR=darkred]page1.jsp[/COLOR] here I …

Member Avatar for Ice515
0
2K
Member Avatar for rahul.ch

General rules is that: 1) A private method cannot be overridden. 2) Subclass method should be a lower access modifier than a overridden superclass method. But the output of the program is "I am Son". Why? Is it because of the rule 2 the output comes? If that's the case …

Member Avatar for JamesCherrill
0
207
Member Avatar for rahul.ch

Hey guys, I'm a starter so I had a doubt related to placement of a static variable. On line 5, for "static int d=5" compiler issues "illegal start of expression". But when I place it outside main() as Instance variable it works and prints "Hello 5". Why this thing? public …

Member Avatar for rahul.ch
0
204
Member Avatar for Viped

Hi again. I am trying to make code that set all black pixels to white. But my code does nothing. Why is that? package net.viped; import java.awt.image.BufferedImage; public class ImageManipulation { public ImageManipulation() { } public BufferedImage setTransparent(BufferedImage image) { for (int x = 0; x < image.getWidth(); x++) { …

Member Avatar for Viped
0
330
Member Avatar for aabj1989

import java.util.Scanner; public class waterbill8 { public static void main(String[] args) { Scanner reader = new Scanner(System.in); double value1 = 5.00; double value2 = 0.82; double value3 = 0.65; double value4 = 0.42; double value5 = 15.00; double value6 = 1.47; String read1 = null; char I, R; int num1, …

Member Avatar for hszforu
0
151
Member Avatar for Bladtman242

Hi, for a school project (exam actually), we've written a ternary trie for text-completion. We fill it with about 400.000 lines of text (13 MB in total, as UTF-8). Now, java represents characters in UTF-16 i believe. So thats 26 MB, + another 26 for saving the complete strings in …

Member Avatar for Bladtman242
0
217
Member Avatar for eves007

So I wrote this code for generating a maze, when I run it i get ArratOutOfBoundException. sometimes it gives me the error after generating the maze once but sometimes I generate couple time then it crashes. I feel like my error is in the while loop but can't find it. …

Member Avatar for stultuske
0
130
Member Avatar for skiabox

I am trying to overlay a moving average over a OHLC chart but I get no results. Any ideas on what am I doing wrong ? private static OHLCDataset createPriceDataset(String filename) { //the following data is taken from http://finance.yahoo.com/ //for demo purposes... OHLCSeries s1 = new OHLCSeries(filename); try { BufferedReader …

Member Avatar for skiabox
0
264
Member Avatar for B204

Following are the server-client programs,,,, in this client can send files and server have to save it,,,,,i want to add progressbar.....plz help me out!!! client:- import java.net.*; import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; class ftpclient extends JFrame implements ActionListener { JButton b1,b2; JTextField t1; ftpclient() { b1 =new …

Member Avatar for JamesCherrill
0
398
Member Avatar for antipala21
Member Avatar for B204

i have created a chat program and i want to add smiley to it......i know how to add smiley in a program,but my logic works for single smiley in a message.......want logic for multiple smiley in prgm,,,, int zi=msg.indexOf(':'); if(zi!=-1) { try{ st1=msg.substring(msg.indexOf(':'),msg.indexOf(':')+2); String msg_start=msg.substring(1,msg.indexOf(':')); int msg_end_index=msg.indexOf(':')+3; if(msg_end_index>msg.length()) msg_end=""; else …

Member Avatar for stultuske
0
216
Member Avatar for yazz110

Hi Everyone, Starting to write **3D images** using** JOGL **and I can't seem to find any **recent information** and help about **JOGL** and creation. I noticed that most of the terms have changed and it doesn't work. Any **recommendations** on what I could read to help update me and keep …

Member Avatar for yazz110
0
252
Member Avatar for trishtren

Hello, Iv been trying to work through some issues on binary output recently. But im having problems understanding the conversion process in java when using two's complement. I dont understand why System.out.println(Integer.toBinaryString(-11700)); Prints out 11111111111111111101001001001100. Shoudlnt -11700 only be 15 bits long? When i calculate it by hand and invert …

Member Avatar for JamesCherrill
0
166
Member Avatar for 47pirates

I'm trying to print the necessary values in the predefined document for an example, in a Bill name in the left side and date on top right. I already had that documents with empty name and dates . how can i print the name and date to corresponding location in …

Member Avatar for 47pirates
0
145
Member Avatar for bettybarnes

Hello guys, I'm trying to make a list of students grade using array. My question is, how am I going to do this? **OUTPUT:** Lea 94 Morgan 85 Jenny 92 Harold 75 I've tried a bit to program, please do check my code. public class StudentScoreArray { public static void …

Member Avatar for Vs5193
0
99
Member Avatar for Viped

Hi, could some one look over my code I by myself dont get where the flaw is. It should paint 1 cube at a time but now it runs all the code through and paints all at once. package net.viped; import java.awt.Color; import java.awt.Graphics; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import javax.swing.JFrame; …

Member Avatar for JamesCherrill
0
966
Member Avatar for hszforu

I think the following code should print 26 but it's printing 62 instead. public class gjh { public static void main(String[] args) { int x = 2; x += ++x * ++x * ++x; System.out.println(x); } } So how is this possible?

Member Avatar for hszforu
0
109
Member Avatar for shammons1

All, I'm very new to java having done most of my scripting in Javascript and a little bit in other types of programs. I'm basically trying to obtain a script variable and compare it against a condition and return some println messages. Here is my code: String agentType[] = request.getParameterValues("Agent …

Member Avatar for JamesCherrill
0
1K
Member Avatar for godzab
Member Avatar for GlenRogers

In my applcation I have a JText field for entering a phone number. Is it possible to make it only accept numerical characters? Or should i wite a method to alert the user if they enter any other characters into it? Thanks

Member Avatar for GlenRogers
0
131
Member Avatar for karthick2388

Bold Text Here ** java.io.ByteArrayOutputStream fos = new java.io.ByteArrayOutputStream (); java.io.ObjectOutputStream oos = new java.io.ObjectOutputStream(fos); oos.writeObject(chmObjSessionKeyValue); //ConcurrentHashMap oos.flush(); oos.close(); byte buff[]=fos.toByteArray(); ps.setString(2,strSessionId); ps.setBytes(1,buff); ps.execute(); //Read object java.io.InputStream in=null; while(rs.next()) { in=rs.getBinaryStream(2); } java.io.ObjectInputStream oos = new java.io.ObjectInputStream(in); java.util.concurrent.ConcurrentHashMap chmObjectSessionInfo=(java.util.concurrent.ConcurrentHashMap)oos.readObject(); CoreLogger.log("Concurrent hashmap object::"+chmObjectSessionInfo); oos.close(); > `Inline Code Example Here`** *Bold Text …

Member Avatar for karthick2388
0
204
Member Avatar for dorien

I am trying to run an easy Android ndk app in cpp, but I get UnsatisfiedLink Error for the Generate() function. Any help would be appreciated. I am quite fluent in c++, but my java is a little bit rusty. I have been trying a lot of tips from the …

Member Avatar for dorien
0
279
Member Avatar for GlenRogers

I have a TreeMap<String, Customer> (Customer is a class I have created). Customer objects hold a HashMap<String, Repair> (Repair is a class I created). I wrote a method to find a given Repair, this is it: public void processFindRef() { if(ref.length() == 6) // ref is the string we want …

Member Avatar for GlenRogers
0
171
Member Avatar for B204

Following code is for deleting elemnt from array but it shows NullPointerException at **if(names[k].equals(user))** ... how to remove it!!! public class del_array { public static void main(String s[]) { String names[ ] = new String [10]; names[0]="admin"; names[1]="b"; names[3]="m"; String user="b"; for(int k=0;k<names.length;k++) { if(names[k].equals(user)) { String item=names[k]; for(int j=k;j<names.length-1;j++) …

Member Avatar for stultuske
0
205
Member Avatar for ganges

hi friends kinldy suggest me a suitable version of linux os which is suitable for java,j2ee programming ,mysql and oracle thanking you

Member Avatar for godzab
0
96
Member Avatar for treasureireland

Hi, I am trying to display certain content to certain mobile devices, specifically displaying alternative content to iphone's as they cant play flash. I am currently using the detectmobilebrowsers.com JSP code, to redirect my site from the full version to the mobile site, the code is as follows: <% String …

0
105
Member Avatar for GlenRogers

**alue** I have a Customer class and a Repair class I have a TreeMap(customerDetails) of type <String, Customer>. Each Customer object holds a HashMap(repairs) of type<String, Repair>, the String represents the ref number of the repair. The user of my system types in a ref number, the program searches to …

Member Avatar for GlenRogers
0
112
Member Avatar for #include <lou>

Hi everyone I am trying to plot the data within the class XYDataset regress, vertically, right now they plot horizontally. Any help appreciated: package brainwavesanalyser; import java.awt.Color; import java.awt.Paint; import java.io.IOException; import java.util.ArrayList; import org.jfree.chart.ChartFactory; import org.jfree.chart.ChartPanel; import org.jfree.chart.JFreeChart; import org.jfree.chart.plot.DrawingSupplier; import org.jfree.chart.plot.PlotOrientation; import org.jfree.chart.plot.XYPlot; import org.jfree.chart.renderer.xy.StandardXYItemRenderer; import org.jfree.chart.renderer.xy.XYItemRenderer; import …

0
180
Member Avatar for Jdan2388

Hi, I am writing a game. Three card brag. The rules of the game are 1.Each player is dealt three cards. 2.The hand is then assigned a rank based on the cards recieved 3. The hand Ranks are 0,1,2,3 4. the hand ranks are then compared and the highest hand …

Member Avatar for Jdan2388
0
274
Member Avatar for magg93

I'm really confused with this! I have 2 classes, Club and Membership. In Membership I have the method, getMonth(), and in Club I have joinedMonth() which takes the parameter, 'month' - so a user enters a month and then I want it to return the Membership's which joined in that …

Member Avatar for magg93
0
545
Member Avatar for bobytch

Good day to everyone.. First Here is my code so far.. import java.io.*; public class Inventory { public static void main (String[]args)throws IOException{ BufferedReader bv = new BufferedReader (new InputStreamReader(System.in)); String x, z; boolean y = true; int a, b, c, d = 0; do { System.out.println("--------------------------------------------------------------"); System.out.println(" M I …

Member Avatar for NormR1
0
1K
Member Avatar for wuguo

I got the IndexOutOfBoundException in the following code. but I cannot find where went wrong. import java.util.ArrayList; public class sumArrayList { public static int calculateSumArrayList(ArrayList<Integer> Integers) { ArrayList<Integer> duplicate=new ArrayList<Integer>(); for (int i=1;i<=Integers.size();i++) { duplicate.set(i,Integers.get(i-1)); } return calculateSumArrayListHelper(Integers); } private static int calculateSumArrayListHelper(ArrayList<Integer> Integers) { //first: arrayList size 0 if …

Member Avatar for NormR1
0
141
Member Avatar for usernforce

I've been working through an excersise in a introduction to Java book by Deitel and I have a solution to a problem. The program will compile, but I get a message that says, "Exception in thread "main" java.lang.IllegalArgumentException: adding container's parent to itself" Can Someone please help me? Here is …

Member Avatar for godzab
0
1K
Member Avatar for Viped

Hi, I am trying to learn some basic game programming and already made simple pong game so I thought next step could be simple breakout. I already got ball and bat made by Rectangle. How about bricks, also Rectangle? If so it would be easy to break them just by …

Member Avatar for Viped
0
144
Member Avatar for paramv

Hello everyone,I need some good practise problems in java programming so that i can apply concepts in solving the problems.So any help would be much appreciated.Please refer me to any link or suggest me some book for the same and also I am new to this website so forgive if …

Member Avatar for paramv
0
160
Member Avatar for wallet123

hey guys i have done my codes and its working properly the only thing that's bothering me is that' when i input 52 and 'a' as my name, it wont ouput the right answer (it should be 'a' also) i hope you guys can help me thanks! public static void …

Member Avatar for JamesCherrill
0
140
Member Avatar for iEpic

This is driving me crazy. I downloaded netbeans and love it but for the last 5-6 hours i have been trying to figure out why my java programs is not showing images. When i open it with jGrasp the images and everything loads perfect. With netbeans it will not show …

Member Avatar for NormR1
0
255
Member Avatar for iEpic

The code i used in JGrasp to show the image is not working in Netbeans The code i used in JGrasp is final ImageIcon icon1 = new ImageIcon("image/money.gif"); JOptionPane.showMessageDialog(null, " blah blah", "Text", + JOptionPane.INFORMATION_MESSAGE, icon1); And if i wanted to show an image in JOptionPane.showInputDialog would it be the …

Member Avatar for NormR1
0
4K
Member Avatar for kannan_pahang

You are required to write an application called Customer Billing System. This system will calculate water usage charges for a month that has been imposed by Syarikat Air Melaka Berhad. This system will categorise users into residential users and industrial users and calculate the charges based on data entered by …

Member Avatar for Wazzza95
0
472

The End.