32,204 Topics
| |
Elo guys, i have trying to develop a client/server application! i'm new with sockets, so i'm trying to learn from existing source codes. I have come accros a piece of code: public static void main(String args[]) { // validate parameters: if (args.length != 2) { System.err.println("Usage: java GameClient <host> <friend_port>"); … | |
Hello I'd like to have a list of ints inside my vector.. I tried to do the following: [CODE]private static Vector<List<int>> getCombMatrix() {[/CODE] But it will give me error: Syntax error on token "int", Dimensions expected after this token However, this works okay: [CODE]private static Vector<int[]> getCombMatrix() {[/CODE] What am … | |
Devlope a Pedel boat class and a Rowing boat class and mark a boat as hired, storing the customer name and time, return a boat's details as a String, including customer name and time of hire if it currently hired out, calculate the amount due on a hired boat, given … | |
Hi All! Im creating a java web application. I am finding a very little information on making forums/blogging/chatting application with java. There is plenty of stuff that uses php/mySQL. Should I learn php, or how to use java to interact with php, or are there tutorial, books or other sources … | |
I want to call a shell script from java.I have searched in many java related web sites but I did not find the correct answer.Can anyone please help me out with this problem. plzzzzzzzzzzzzz thank you!! | |
Hello, The following is background on my assignment "Modify payroll program so that it uses a class to store and retrive the employee's name, hourly rate and the number of hours worked. Use a constructor to initialize the employee information, and a method within that class to calculate the weekly … | |
Hello, I am on Linux Mint and just installed Netbeans to get started with Java programming. I got these errors while starting the IDE for the first time: [url]http://i268.photobucket.com/albums/jj17/Google_Spider/netbeanswarning.png[/url] [url]http://i268.photobucket.com/albums/jj17/Google_Spider/netbeanswarning1.png[/url] I don't know what these errors mean. When I started the IDE for the second time, I got no errors. … | |
Hi every one...I am modifying an application that make the Pc speaker have acces to the rtp stream comming from a telephone. The problem is, the rtp stream could be one of G.711U or G.711A or G.729 or G.729A depending on which codec was setup and the Speaker supports PCM_UNSIGNED. … | |
Hi, all How to make connection to database more dynamically using hibernate. Example while my application running, I want to change connection to other server and database name but structure database is still same. I using jdbc I commonly using code like this [CODE] public static void getConnection(){ try { … | |
Hi there, I seem to be having problems multiply two BigDecimal numbers without loss. Can anybody explain to me how to do this, please? | |
Hello guys. I needed some help with my calculations. I'm having a problem with having my output display the total amount. I believe the problem is coming from trying the float calculation. | |
I need to design an Ages class with fields to hold 3 ages and includes a constructor, accessor and mutator method. Also needed is a method that returns the average of the ages. I also need to write a demo class that creates an instance of Ages class. The demo … | |
Hi there, Can someone figure out why I am getting this problem, please. In my algorithm, i have this method that takes in a BigDecimal value and returns a BigDecimal value as shown below: [code] public BigDecimal sigmoidActivationFunction(BigDecimal sum) { Big_pi test2 = new Big_pi(); //sum = sum.multiply(new BigDecimal(-1.0)); BigDecimal … | |
Hello to every one.. I have another question, If i write my code, as: [CODE] line = BbmReader.getFileReader("input.txt").readLine(); StringTokenizer tokens = new StringTokenizer(line); while (tokens.hasMoreTokens()) { System.out.println(tokens.nextToken()); } [/CODE] then it shows the tokens of only first line of file. How can i make it to go to the next … | |
Dear friend it is days that i couldnt find any solution for my problem. I use: [CODE] while ((line = reader.readLine()) != null){ StringTokenizer tokens = new StringTokenizer(line," "); System.out.println(tokens.nextToken()); } [/CODE] this loop for reding all inputs of file but this loop only shows the irst token of the … | |
| I've got a problem in that I have a dll I've created and most of the functions work without any problem. There is only one function that throws the exception stated in the subject, NoClassDefFound. I've checked the classpath along with all the other things I can think of, obviously. … |
please help me in finding the proble in the following code import java.awt.*; import java.awt.image.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; class button extends JButton { public button(String s) { setName(s); setVisible(true); } } class label extends JLabel { public label (String s) { setText(s); setVisible(true); } } class loginform … | |
Hello, I need some help....I have to create part of an application that uploads an MS Excel file, and stores the data into a MySQL db...and I have no clue where to start... | |
[code="Java"] public void actionPerformed (ActionEvent e) { String hostServer, fromEmail, fromTo, contentSubject, contentMsg; if (e.getSource()== btnSend) { hostServer=txtHost.getText(); fromEmail=txtFrom.getText(); fromTo=txtTo.getText(); contentSubject=txtSub.getText(); contentMsg=msgArea.getText(); // Establish a TCP connection with the mail server. Socket soc = new Socket("" + hostServer, 25); // Create a BufferedReader to read a line at a time. … | |
hi all I m new for the J2ME technology.. I m currentlu using text file to save the data needed for my application as a database.. Then accessing it to store it into Record Store.. But wwhile using the text file i need to design it in some format and … | |
[TEX]how can we append and display live data in JTextArea using while loop, i have implemented everything but data display in JTextArea after completetion of while loop [/TEX] | |
I'm creating a simple chat program using sockets... I did the program using a console and it worked in console so the next thing I did is to make a graphical user interface but whenever the program reaches the code serverSocket.accept(), the GUI just hangs and I can't do anything.. … | |
I am trying to display an Image using applet. Image is updated after every 4 seconds so i want my applet to show updated image.I am not sure where i should load the image i have tried to load it in the init() method as well as in "start" method … | |
I have an Illegal start to an expression. I'm trying to remove it so these methods can be implanted. import java.io.*; import java.text.*; public class Kudo { public static void main(String args[])throws IOException { do { System.out.println("pick from 1 of the following options"); System.out.println("1) twelve"); System.out.println("2) minMaxAvg"); System.out.println("5) to exit"); … | |
Does any one know of any good websites that explain hash tables in great detail? Thanks | |
Hi there, I got a little problem with finding the inverse of a matrix when using the BigDecimal type. I mean, I have got a method that finds the inverse of a matrix perfectly with the primitive type double. Here is the method as shown below: [code] import java.lang.*; public … | |
hello guys, i need a lil guidance here i am trying to save the output from my "SThreads" results to a txt file without deleting the previously stored data, i jst want to keep adding to the file..any suggestions that will help are appreciated.. heres the code i have done … | |
Hello, if any one want a final year project in java for submission in their college then i have one project that is developed by me and the Title is Remote Desktop Handling (Remote Desktop Capture or desktop capturing) this project can connect to the one or more client machines … | |
haii I have a problem while accessing a class(A) through "reflection" from class B.... i want to pass a parameter to class A... My code is like this... Method idMethod = Class.forName(ClassName).getMethod(FunctionName,null); Method getMethod = Class.forName(ClassName).getMethod("getInstance", new Class[]{Class.forName("java.lang.String")}); Object object = getMethod.invoke(Class.forName(ClassName()),new Object[]{dboption}); lists = (ArrayList)idMethod.invoke(object,personId); i will get correct … |
The End.