32,204 Topics

Member Avatar for
Member Avatar for null_guy

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>"); …

Member Avatar for null_guy
0
112
Member Avatar for l2u

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 …

Member Avatar for bugmenot
0
206
Member Avatar for Taker

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 …

Member Avatar for Taker
-1
85
Member Avatar for zaigtahir

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 …

Member Avatar for zaigtahir
0
69
Member Avatar for swetha bandaru

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!!

Member Avatar for jwenting
0
110
Member Avatar for jcato77

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 …

Member Avatar for K504K
0
1K
Member Avatar for Google Spider

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. …

Member Avatar for Jens
0
159
Member Avatar for theausum
Member Avatar for luisator

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. …

Member Avatar for jasimp
0
376
Member Avatar for onsir

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 { …

Member Avatar for jwenting
0
405
Member Avatar for debee

Hi there, I seem to be having problems multiply two BigDecimal numbers without loss. Can anybody explain to me how to do this, please?

Member Avatar for debee
0
494
Member Avatar for NycNessyness

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.

Member Avatar for NycNessyness
0
103
Member Avatar for clueless101

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 …

Member Avatar for clueless101
0
144
Member Avatar for debee

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 …

0
50
Member Avatar for minamoda

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 …

Member Avatar for minamoda
-1
73
Member Avatar for minamoda

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 …

Member Avatar for minamoda
0
71
Member Avatar for gsanson-2019

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. …

Member Avatar for gsanson-2019
0
90
Member Avatar for piyush09

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 …

Member Avatar for piyush09
0
226
Member Avatar for maydhyam

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...

Member Avatar for Ezzaral
0
111
Member Avatar for denniskhor

[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. …

Member Avatar for Ezzaral
0
184
Member Avatar for abhi287

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 …

0
54
Member Avatar for Navdip

[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]

Member Avatar for new_2_java
0
64
Member Avatar for it2051229

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.. …

Member Avatar for it2051229
0
186
Member Avatar for staneja

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 …

Member Avatar for staneja
0
101
Member Avatar for Katherine692008

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"); …

Member Avatar for javaAddict
0
141
Member Avatar for KimJack

Does any one know of any good websites that explain hash tables in great detail? Thanks

Member Avatar for ~s.o.s~
0
93
Member Avatar for debee

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 …

Member Avatar for debee
0
400
Member Avatar for D boss

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 …

Member Avatar for D boss
0
143
Member Avatar for Neeraj Sharma

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 …

Member Avatar for Ancient Dragon
-1
106
Member Avatar for ajithraj

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 …

Member Avatar for Ezzaral
0
123

The End.