473,609 Members | 2,184 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Java Forum

Java programming language (Sun Microsystems) - Ask questions about java programming, OOP, JRE, SDK, Swing, Plugins, Java Virtual Machine(JVM), Java Libraries: Collection, XML Processing, Security, JDBC, JNDI, RMI, CORBA, AWT (GUI) and more.
1
5,202
thread by: thatdudeart34 | last post Oct 17 '12 by: Rabbit
Hello World, I've been asked to write a program with the following information: The U.S Census Bureau projects population based on the following assumptions: 1. One birth every 7 seconds 2. One death every 13 seconds 3. One new immigrant every 45 seconds. Write a program to display the population for each of the next five years. Assume...
10
4,088
thread by: sushantshrestha | last post Oct 15 '12 by: Rabbit
import java.io.*; import javax.swing.JOptionPane; public class read { public static void main(String args)throws IOException { try{ FileInputStream fstream = new FileInputStream("C:/Users/sushan/Desktop/abb.txt"); DataInputStream in = new DataInputStream(fstream); BufferedReader br = new BufferedReader(new InputStreamReader(in));...
0
1,700
thread by: mdyusufali786 | last post Oct 13 '12 by: mdyusufali786
Hello everyone, I am very much new to java programming. I have been assigned the task of creating a java application through which the live video of an IP camera connected via usb can be recorded into our system and played at the same time in the java JFrame created by me. How to proceed with it? What concepts should i have to...
1
1,577
thread by: MohNoha | last post Oct 12 '12 by: Rabbit
public class Hotel { private Room rooms; public Hotel() { rooms = new Room; int i = 0; for(; i<5; i++) {
0
1,670
thread by: mach22 | last post Oct 11 '12 by: mach22
Hello, After opening a crystal report in jsp page, top and rear buttons of crystal report viewer application were not working.. it says that Javascript: CrystalViewerCrystalEvent('CrystalViewer','tb=next') or CrystalViewerCrystalEvent('CrystalViewer','tb=printdlg') or any other buttons.. ERROR it seems like this js script doesnot exist or...
0
2,101
thread by: Ram R | last post Oct 10 '12 by: Ram R
I need to modify hibernate.cfg.xml with encrypted password by running my own java class. <?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration>...
1
1,562
thread by: hamza | last post Oct 10 '12 by: Rabbit
private char encryptChar(char c, int k) { if (Character.isLetter(c)) return (char) ('A' + (c - 'A' + k) % 26); else return c; }
5
7,777
thread by: Wazzz | last post Oct 8 '12 by: saumendra0022
Hi, I am using the following code to upload an image, i am able to upload the image and save in DB on Windows but the code fails somehow on Linux machine. Here is the code: String contentType = request.getContentType (); if ((contentType != null) && (contentType.indexOf ("multipart/form-data") >= 0)) { ...
0
1,608
thread by: Catfood | last post Oct 5 '12 by: Catfood
I do hits on mTurk and often (inquisit software, for instance) and some of the surveys and survey applications will not load due to java's refusal to launch. I have windows vista.
2
2,418
thread by: amanjot24 | last post Oct 5 '12 by: zmbd
Okay, so I have the program complete but i cannot figure out how to get the second part. It asks, "Print an asterisk for every five values in each category." My program right now prints an asterisk for every value. This is my program so far: //***************************************************************** //Histogrm1.Java //
0
1,541
thread by: ndedhia1 | last post Oct 4 '12 by: ndedhia1
I was wondering how I connect to a server, using a password, login and needing to look up a key in an id_rsa file? I was able to log into the box before just using the password and login, but security has gotten tighter, so now we need to public/private key. I have the keys on my pc in a file called id_rsa and id_rsa.pub. Before, I was...
13
47,632
thread by: marvinp | last post Sep 28 '12 by: edk2
I am writing a class which contain a variable INFINITY. Is there any constant defined for this in java so that i can assign that value? In .NET, there is System.Threading.Timeout.Infinite for infinity. I am looking for the same in java also.
7
2,121
thread by: rwgwiccan | last post Sep 28 '12 by: Killer42
Writing a program that is to end when "stop" is entered in the name field during execution. However, I cannot seem to get it to do so. Code is below: public static void main(String args) { // TODO code application logic here Scanner scanner = new Scanner(System.in); String cleanInputBuffer; ...
0
1,679
thread by: Prabowo Budi | last post Sep 28 '12 by: Prabowo Budi
I have try to build a aplication about audio compression in Java using Huffman Compression. I have been searching all over the net and MSDN and cannot find anything that explains how to use Huffman in Java. I need to compress audio data using Huffman and then playing the new file using that aplication. Building the palyer is easy. Finding out...
0
1,603
thread by: zeinz | last post Sep 27 '12 by: zeinz
I'm using JMF in making a live stream from a webcam at server to an applet. That when any client open the applet, he 'll be able to watch live stream from the webcam at the server. Till now, i'm just able to make a unicasting streaming at local network only that i must enter the destination ip @ the transmitting code at server. i want a way...
0
2,015
thread by: plsHelpMe | last post Sep 27 '12 by: plsHelpMe
Hi, I have a webs application written using Java. This application does not offer any GUI for the end users but has few classes which are exposed over http request. This is deployed on WebSphere application server on zOS. Now, another external web application (Websphere application server on Windows) make http request to this zOS webapp to...
3
1,622
thread by: rwgwiccan | last post Sep 27 '12 by: Rabbit
Have a program that is to take a persons name, hours worked, rate of pay, fed and state taxes, and combine them to get a net pay. However, most of the calculations will be done in a separate class file. main file looks like Scanner scanner = new Scanner(System.in); boolean end = false; // is the input name stop? while...
0
2,124
thread by: ajgordon | last post Sep 26 '12 by: ajgordon
I am trying to write a program that produces random permutations of the numbers 1 to 10. It goes into and ArrayList and I have to take it from the ArrayList and put it in an array. It is working without any errors, but all the numbers print 0. I'm not sure why it isn't transferring the numbers correctly to the array. Any suggestions are greatly...
0
1,205
thread by: sriraram | last post Sep 24 '12 by: sriraram
Hi, I am also facing the same problem, mentioned in the below link. http://bytes.com/topic/java/answers/857534-mails-sent-java-code-going-junk-folder-ms-outlook But still I did not see any solution for this problem. Please help me on this.
1
2,085
thread by: HARMLESS | last post Sep 22 '12 by: zmbd
The method invocation takes an argument and the function also takes an argument so this really confuses,what exactly is the difference between them?
1
1,870
thread by: nanfh | last post Sep 22 '12 by: Rabbit
public int getCellColourIndex(int row, int col) { return ???; the thing is here i have to return (int) help please urgent
7
23,327
kaleeswaran
thread by: kaleeswaran | last post Sep 20 '12 by: hsn81321
wat is use of flush() fun in java
0
1,562
thread by: ganessinv | last post Sep 19 '12 by: ganessinv
I am using a struts application. I want to upload a file in JSP and read the contents of that file in the Java. Case 1: I deployed this application.war in my local tomcat server, and ran the app, it works fine. (Local machine OS is windows) Case 2: When I deployed this application.war in the tomcat server on Unix machine, and ran, it...
3
3,120
thread by: dynamiser | last post Sep 17 '12 by: zmbd
i was trying to use JOptionPane as the input mode to find out if the input number is prime or not.. but i am stuck with this code.. package primeNo; import java.util.Scanner; import javax.swing.JOptionPane; public class primeNo { public static void main(String args) { int num; JOptionPane.showInputDialog("Please enter a number : ");
0
1,441
thread by: Nishant | last post Sep 14 '12 by: Nishant
I have two pages one is index.jsp and another is first.jsp. I have drop down list in index.jsp page.I want that if i choose any value from dropdown list that value should go to the next page that is first.jsp. the code i am using is mention below. <h4>Plant: <select name="plants" onchange="location.href=f1.plants.options.value;"> ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.