36,051 Topics

Member Avatar for
Member Avatar for jeffrey o

when i compiple this using rmiregistry, javac for HelloServer2 and HelloClient it says: I've attached all files as well java.rmi.NotBoundException: ReceiveMessageInterface <<No stacktrace available>> [CODE] import java.rmi.*; import java.rmi.registry.*; import java.rmi.server.*; import java.net.*; import java.util.Random; public class HelloServer2 extends java.rmi.server.UnicastRemoteObject implements ReceiveMessageInterface { String address; Registry registry; int a[]=new int[6]; …

0
140
Member Avatar for Syrne

Hi there, so I'm currently studying Java at my University and as of right now we're working on Linked Lists, Array lists, Array Deques, etc. As part of this lesson, we're being told to write our own versions, both recursive and iterative, of the predefined java functions for its corresponding …

Member Avatar for hfx642
0
226
Member Avatar for Murphyv10

Hello all. Can i get some help with my homework please. Im quite literally staring at a blan screen with very little done. Ive been quite sick recently and lost ground with the class. Ive watched You Tube videos and read oop books but to avail. I have to make …

Member Avatar for hfx642
0
84
Member Avatar for AbdullahJava

I don't know why it doesn't compile ! ! [CODE] import java.util.Scanner; public class Beach { public static void main (String [] args) { Scanner input = new Scanner (System.in); System.out.println("Enter the weather Hot or Cold"); String A; A = input.next(); System.out.println("Enter the type of day Sunny or Windy or …

Member Avatar for Philippe.Lahaie
0
87
Member Avatar for manoj_93

I am trying to calculate the number of code points that are present in a file, but it always showing me the number of characters being used. I am using string buffer to read the file, so I come to this part f d code [code]while ((sCurrentLine = br.readLine()) != …

Member Avatar for ~s.o.s~
0
121
Member Avatar for nilay84

Can anyone figure out why the following code is not showing the menubar when it is run in eclipse. import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.*; public class MenuExample { Display display; Shell shell; Menu menu, fileMenu, editMenu,viewMenu; public MenuExample() { display = new Display(); shell = new Shell(display); shell.setText("Menu Example"); shell.setSize(300, 400); …

Member Avatar for FALL3N
0
380
Member Avatar for clapton

Hi. I'm a student and I need write a programe bank application in java . I must write a program that the customer could withdraw and deposit from his account.I need a few class? my professor said me that it's very simple but it's dificullte for me. you can help …

Member Avatar for stultuske
0
201
Member Avatar for jarograv

I currently have this code: [CODE]import java.util.Random; import java.io.*; public class randomdwarf { public static void main(String[]args)throws IOException { String dwarves[]= {"Dopey", "Sneezy", "Happy", "Sleepy", "Grumpy", "Bashful", "Doc"}; Random generator = new Random(); int randomIndex = generator.nextInt( 7 ); System.out.println(dwarves[randomIndex]); Runtime.getRuntime().exec("H:\\Profile\\Desktop\\dwarves\\Doc.jpeg"); } }[/CODE] It is a very simple code that …

Member Avatar for Philippe.Lahaie
0
191
Member Avatar for geojia

Hi gurus, this is a homework assignment on finding all closest pairs. I used a quad tree for my algorithm and its running time is compared to the naive algorithm. (I didn't use the java quad tree because I didn't know it existed...) My problem right now is that after …

Member Avatar for rubberman
0
218
Member Avatar for herious89

Hi im trying to calculate the constant e, this is my codes, the program doesnt output correct value, im new to java, please help [CODE]import java.util.Scanner; public class calculateE { public static long factorial( int n ) { if( n <= 1 ) // base case return 1; else return …

Member Avatar for rubberman
0
364
Member Avatar for freedomflyer

Hello everyone. I have a TreeSet<State> that I want to iterator over in order to change the States within the TreeSet (more specifically, a private subclass within each state). However, I will most likely run into problems as I do something like this, or something to this effect: [CODE]for(State s …

Member Avatar for freedomflyer
0
1K
Member Avatar for bcain2121

Hello there. I am writing a game in java for a class of mine but i am getting this bugger ass error and i cant find it. Can someone help me? The whole project including all classes and such is located in the .zip you can download. I swear it …

Member Avatar for JamesCherrill
0
288
Member Avatar for riahc3

Hey I am having problems making a exact copy of a file. It seems that it changes the headers of the file. I tried using the Apache fileutils copyfile method but it seems to change the header completely. The rest of the file looks pretty much OK. I think it …

Member Avatar for riahc3
0
238
Member Avatar for riahc3

Hey I have a FTP server with this [url]ftp://192.168.100.2/folder/[/url] And I have something like anotherfolder: afolderinsidethatone: file1.bin file2.bin file.txt I want to pass all of that to the ftp server so it takes this form: [url]ftp://192.168.100.2/folder/anotherfolder/[/url] [url]ftp://192.168.100.2/folder/anotherfolder/afolderinsidethatone/[/url] [url]ftp://192.168.100.2/folder/anotherfolder/afolderinsidethatone/file1.bin[/url] [url]ftp://192.168.100.2/folder/anotherfolder/afolderinsidethatone/file2.bin[/url] [url]ftp://192.168.100.2/folder/anotherfolder/file.txt[/url] I have this code: [code] public void subidaftp(String ip, String …

Member Avatar for riahc3
0
217
Member Avatar for hurrycart

Hello people. I'm designing a little app, and due to my lack of XP, I hope for some advices on how to deploy it. The App: It's simple Java app. There are many sub-functionalities" like: logging, sending a log via email, error handling, and others about XML technology. But to …

Member Avatar for stultuske
0
129
Member Avatar for shaan_046

Hey guys. I am getting an error in this jsp code in line13 i.e PopulateTextbox obj = new PopulateTextbox(). What is wrong in my code. Am i declaring the function at wrong plae or missing braces anywhere. Please help. ? [CODE] <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@page …

Member Avatar for stbuchok
0
198
Member Avatar for 1bung100

I have an xml having same tags (<value> tag) as given below: [CODE]<number> <type>decimal</type> <value>12</value> <value>14</value> </number>[/CODE] I am trying to parse using either Digester or JAXB (without Schema). What I have done is I have created a java class that will map with the given xml. For this I …

Member Avatar for 1bung100
0
2K
Member Avatar for 47pirates

HOw can i private chat with logged in users from a group chat? HOw can i begin the proces?

Member Avatar for dantinkakkar
0
146
Member Avatar for liphoso

with integer arrays when i add them i can have code that looks like this result[0] = array[0] + array2[0] all the arrays being of integer type now if my arrays are of Huge type and i would like to get their sum, how would i do that? this is …

Member Avatar for stultuske
0
245
Member Avatar for shaan_046

Hey guys. I am getting an error in this jsp code in line13 ( PopulateTextbox obj = new PopulateTextbox();). What is wrong in my code. Am i declaring the function at wrong plae or missing braces anywhere. Please help. ? [CODE] <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@page …

Member Avatar for stultuske
0
232
Member Avatar for konman795

Hello all, I have an assignment in which I need to subclass and implement an abstract method (java.io.OutputStream) to create an output stream called NumStream. The NumStream class converts digits to strings. We are given most of the code it seems and I need to only implement one area. It …

Member Avatar for ztini
0
234
Member Avatar for alreem

mr7b .. To calculate the value of e^x ,, I do this code but I THINK I have mistake . . ! Can any one tell me if it's true or not > ? [CODE]package calculate; import java.util.Scanner; public class Main { public static void main(String args[]){ double x, n, …

Member Avatar for ztini
0
2K
Member Avatar for sariberri

[CODE]import java.util.*; //You may assume that all Points are unique. public class PointSet { private ArrayList<Point> list; private Comparator<Point> compareMethod; //default constructor public PointSet(){ list = new ArrayList<Point>(); } //copy constructor for a point public PointSet(PointSet l){ list = new ArrayList<Point>(); for(Point p: l.list){ this.add(p); } } //randomly generating a …

Member Avatar for sariberri
0
909
Member Avatar for ladybro

Thanks for taking the time to open this. I am just starting to learn Java and cannot seem to get past a point in the program I'm currently working on. I'm making a credit card verifier, where you enter the numbers and an algorithm deems it valid or invalid. I …

Member Avatar for stultuske
0
155
Member Avatar for NicoleD90

I have to create a program that simulates flipping a coin. The directions my teacher gave me are as follows: 1. Program should prompt the user for number of runs 2. Program should prompt the user for the number of times to flip the coin in a single run 3. …

Member Avatar for NicoleD90
0
700
Member Avatar for iRamble88

[CODE=java]import java.util.Scanner; class Sum { private int value; public int get() { return value; } public void set(int sum) { this.value = sum; } } class Summation extends Thread { private int upper; private int lower; private Sum sumValue; public Summation(int upper, Sum sumValue) { if (upper < 0) throw …

0
175
Member Avatar for 09cody

I'm just learning Java, so please bear with my ignorance. I have a feeling (hope) that this question has a very simple answer, just one that is evading me at the moment. For our assignment, we have to write a boolean function that will take a given elephant, "e" (the …

Member Avatar for JamesCherrill
0
299
Member Avatar for gedas

Hey guys, what would be a neat why of geting every third token in the string. lets say there is a: String longString= "i want this"; how would i be able to get "this" ? Thanks

Member Avatar for JamesCherrill
0
1K
Member Avatar for MineCrafter

It keeps giving me this error and i really need help! [CODE] package net.minecraft.src; import org.lwjgl.opengl.GL11; public class ModelMrsMcDade extends RenderLiving { //The three numbers below change the size of your model (you'll need to change the hitbox size too though) protected void preRenderScale(ModelMrsMcDade entity, float f) { GL11.glScalef(1F, 1F, …

Member Avatar for JamesCherrill
0
585
Member Avatar for johang_80

Hello everyone I have a task of changing values in an int[][], for example if I input 1 it is changed to 0 and vice versa. So far I tried the following for a hundred times amending the xs and ys but with no happy ending. [CODE] public void reverseOrder(int …

Member Avatar for johang_80
0
193
Member Avatar for 47pirates

I have a server in python and client in java and i want to share images through the socket how can i do so? help plz

Member Avatar for dantinkakkar
0
172
Member Avatar for Stjerne

Hello, I've a question about DataOutputStream. I'm trying to complete this Pseudo-sentence: [CODE] public void writeObjectToFile( DataOutputStream output ) { < Writing data field values ​​to file. > } [/CODE] This is my code: [CODE] public void writeObjectToFile( DataOutputStream output ) { String filename = "test.dta"; try(output = new DataOutputStream(new …

Member Avatar for JamesCherrill
0
157
Member Avatar for vuquanghoang

I have done almost all things in my project. I think file SlList.java in my project has something wrong( in insert function). When I insert something in the middle of link list, I rest disappear although I link the rest to the next of the node I want to insert. …

Member Avatar for Philippe.Lahaie
-1
257
Member Avatar for divsok

please anybody can give me the access code for "Introduction to Java Programming, Comprehensive, 8/e" book if you've..

Member Avatar for StephNicolaou
0
116
Member Avatar for luskbo

Okay, been working on Android program and since its JAVA based, I figured this might be a place to get some good advice. I have been writing this program to run tcpdump, but for some reason it freezes and crashes. I am able to execute the shell commands, but after …

Member Avatar for luskbo
0
285
Member Avatar for artemis_f

Hello all, I am new to this forum. I think this will be an excellent place for learning things and I am looking forward to gaining more java knowledge. My current predicament is the ArrayIndexOutOfBoundsException I am getting on a program I have written. I haven't been able to figure …

Member Avatar for stultuske
0
1K
Member Avatar for archie.herbias

when i tried to send an email to an account it does not sent. the error result will be displayed. i got an error in the apache tomcat bin log like this: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port:25; nested exception is: java.net.ConnectException: Connection refused: connect at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1934) …

Member Avatar for archie.herbias
0
201
Member Avatar for adil_bashir
Member Avatar for TIM_M_91

Hi guys well what I want to do is play a video clip when my program starts. My menu has been set up to how I want it to look. I've researched how to do this but I cannot seem to find anything that I want. All I find is …

Member Avatar for TIM_M_91
0
487
Member Avatar for Hitman Mania

So I'm doing this simple draw program where I let the user click a button, i.e. Rectangle, and then click any desired place on the JFrame to draw it. Now, I want the user to first click on the JButton, then click anywhere on the JFrame (so that I get …

Member Avatar for JamesCherrill
0
169
Member Avatar for Samwal

Hey there guys, this is my first post here. Really pretty website I must say. I guess you'd expect a programming website to be well built. Haha. But anyways, I've been having some problems recently with a JFrame. I'm a beginner, but I usually do pretty well with resolving errors. …

Member Avatar for JamesCherrill
0
218
Member Avatar for mehnihma

I have problems with choosing a line and to find a number or times specifif word repeats in that line? Can you help me with that? [CODE]import java.awt.*; import javax.swing.*; import java.awt.event.*; public class DefectInspector { private JFrame frame = new JFrame(); private JPanel p1,p2,p3,p4; private JMenuBar jmb; private JMenu …

Member Avatar for stultuske
0
116
Member Avatar for jhonilson

HI I had generate a report with IREPORT 3.7 . I have now a .jasper file. I would want to be able to execute (show) it with a jsp file or servlet. My generated report not use sql queries, only it need 2 parameters. i think to pass these parameters …

Member Avatar for Amunantha
0
958
Member Avatar for adil_bashir

hello, i have written the below piece of code for calculating the power function, but when i run the program, it shows the wrong result and i verified it by calculating manually. so please help me to get the correct result. [CODE] public class powerFunction { public static void main(String …

Member Avatar for dantinkakkar
0
168
Member Avatar for freedomflyer

Hello y'all. I am in the midst of an exciting project, and I've hit a little bump. I'm trying to do a 'deep copy' of a TreeMap<String, State> [B]so that I can work with one (delete, insert, etc...) and preserve the other for later.[/B] Instead of having to code up …

Member Avatar for ~s.o.s~
0
1K
Member Avatar for igotaquestion

How to implement a DHT in Java? Basically I need to know how to implement a lookup algorithm for DHT. The idea is to grasp java RMI and lookup algorithm of DHT.

Member Avatar for dantinkakkar
0
159
Member Avatar for Mxlfa

Ok you guys are my last hope, i've tried searching what i need and i cant find it. i really tried searching.... but i just don't know exactly what i'm really searching for... i have to do the following project in c# (wrong post haha) but if you could help …

Member Avatar for ztini
0
283
Member Avatar for miss_lovely

Having some difficulties getting this assignment to work. What, I'm having trouble completing is creating an conditional statement that calculates interest for the amount of years entered by the user at the interest rate they enter and displays it in a message box. This is my code so far: [CODE]import …

Member Avatar for ztini
0
186
Member Avatar for riahc3

Hey I have this code [code] FileUtils.forceDelete(new File(nombreprograma+".zip"); FileUtils.forceDelete(new File(nombreprograma+"/"+nombrebmp+".bmp")); [/code] Deleting the zip inside of the root works perfect but for some reason the BMP inside of a folder, doesnt. The error it gives is that it cannot delete the file, nothing else. Any tips?

Member Avatar for dantinkakkar
0
282
Member Avatar for Sonny101

Hi, I am currently doing a JDBC project where I am manipulating data in a Access DB on a table named empDetail and one of my tasks has got me stumped, considering I only started learning about JDBC yesterday. I hope somebody can give me a bit of direction as …

Member Avatar for dantinkakkar
0
134

The End.