36,051 Topics

Member Avatar for
Member Avatar for coroll

Hi all, I'm developing a simple RMI chat server. Im getting following exception when i execute Client. Server works well. java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322) at sun.rmi.transport.Transport$1.run(Transport.java:177) at sun.rmi.transport.Transport$1.run(Transport.java:174) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:173) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667) …

Member Avatar for JamesCherrill
0
289
Member Avatar for omgnametaken

Hey guys. I have two questions about my code(which has no errors but isnt giving the output i want)...Is it possible to have an if statement in my 3rd constructor? Also why is my output giving the filepath instead of outputting calcutations? Thanks for having a look public class order …

Member Avatar for omgnametaken
0
115
Member Avatar for soumyadityac

I cant get this program working. Cant really sort out where i am wrong. The program works fine without the save/load object feature. Please help!! import java.io.*; class Account { String name ,accno; double bal; void withdraw(double amt) { System.out.print("Processing"); for(double pr = 0; pr<500000000; pr++); System.out.print("."); for(double pr = …

Member Avatar for JamesCherrill
0
146
Member Avatar for anwatts

I am creating a program that has multiple classes. The program draws various shapes on a gui and the program needs to be modified to incorperate a highlighting function if a shape is clicked on. I have done the coding but it is not drawing the circle and I am …

Member Avatar for JamesCherrill
0
214
Member Avatar for kumar0559
Member Avatar for xianamersu

I'm trying to make a video store program that allows customers to search for videos and either buy or rent them. I have already made a class with 3 subclasses, VHS, DVD and VCD. for the meantime,When video objects are first put into the store, the status should be “IN”. …

0
77
Member Avatar for Cronicle8

Hello, I'm building this app, which requires a Camera, but it is not working, it doesn't show anything except the design, here's teh code: Camera c = null; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.qrreaderscreen); SurfaceView v = (SurfaceView) findViewById(R.id.v); SurfaceHolder surface_holder = null; v = new SurfaceView(getApplicationContext()); if (surface_holder …

Member Avatar for Cronicle8
0
305
Member Avatar for sobias

Hi guys, Finally I've registered after being a very long visitor for this awesome community. I have this problem which consumed 2 days of my time trying to figure out how to solve it. And your help is needed guys. The problem says: Transfer elemenents from Stack1 to Stack2 , …

Member Avatar for Taywin
0
8K
Member Avatar for somjit{}

this is my code, from the book *Head First Java* ... class Echo { int count=0; void hello() { System.out.println("Helloooo....."); } } public class EchoTestDrive { public static void main(String[] args) { Echo e1 = new Echo(); Echo e2 = new Echo(); // output 10 //Echo e2 = e1; // …

Member Avatar for somjit{}
0
180
Member Avatar for ganges

hi suggest me a good exam prepration guide for "Java EE 6 Java Persistence API Developer Certified Expert Exam" Exam Number: 1Z0-898 thanking you

Member Avatar for stultuske
0
55
Member Avatar for 1bung100

I have created a simple client server chat program using socket. I used to run Client program and Server program separately in two eclipse and chat is done through console only. The logic is as below: System1Class (Server) | System2Class (Client) 1) SendThreadSys1 Class | 1) SendThreadSys2 Class 2) ReceivedThreadSys1 …

Member Avatar for 1bung100
0
1K
Member Avatar for FUTURECompEng

public void Enqueue(int value){ node end = endList.next; end.next=null; endList.data=value; endList.next=end; endList=end; Here is my code for an Enqueue method but when I run it mylist.Enqueue(12); It gives me an error. Is something wrong with my method or am I testing it incorrectly? Thanks.

Member Avatar for FUTURECompEng
0
294
Member Avatar for calvintmoss

So I am trying to make a tile map editor/reader to create and interact with maps like [this](http://www.codeproject.com/KB/game/Autotiles_Algorithm/TileMapExample.png) , so essnetially I am wondering what the best way to go about this would be. I have not done anyhting graphical in programming in a long time and yeah, I was …

Member Avatar for ObSys
0
780
Member Avatar for riahc3

Hello I want to be able to be on a page and have a favorite that points to http://localhost/export which is a web service. When I select that favorite, the current web page Im on should send all of its source code to the web service. The web service should …

Member Avatar for Taywin
0
226
Member Avatar for boopathyraj

I want to align two text in same line first text should be in left side another one should be in right side of java swing textpane. so I have using style interface and Styleconstants class to align text but it couldn't worked. I have applied some other styles on …

Member Avatar for JamesCherrill
0
305
Member Avatar for subrat_p

Hello friends, I have created three JComboBoxes. first two of them get list from string. However I select these two comboboxes, the third combobox automatically retrieve data of a particular column from my database. But in my code its only get data from first item which automatically seleted by setmodel …

Member Avatar for mKorbel
0
427
Member Avatar for Mbot

Hey, Im trying to write a chat program which should be able to run multiple clients using threads. But I seem to get this "java.io.StreamCorruptedException: invalid type code: 00" error the whole time. My server code: [CODE] import java.io.*; import java.net.*; public class Server{ ServerSocket serverSocket; Socket connection = null; …

Member Avatar for Qiqa
0
582
Member Avatar for nHulk

public class SendMessage { public static void main(String[] args) throws UnsupportedEncodingException { //String strMsg=java.net.URLEncoder.encode("This is API msg", "UTF-8"); callURL("https://api.mVaayoo.com/mvaayooapi/MessageCompose?user=user@gmail.com:1111&senderID=TEST SMS&receipientno=9999999999&dcs=0&msgtxt=msg&state=1"); } public static void callURL(String strURL){ System.out.println(" URL is :"+strURL); try{ URL obj = new URL(strURL); HttpURLConnection httpReq = (HttpURLConnection)obj.openConnection(); httpReq.setDoOutput(true); httpReq.setInstanceFollowRedirects(true); httpReq.setRequestMethod("GET"); String iStatus = httpReq.getResponseMessage(); System.out.println("iStatus: "+iStatus); } …

0
181
Member Avatar for yigit.hatipoglu

Hi everybody, I really tried to do my assignment but I am lost . Any helping is very helpful , Thanks Write a program that will generate a set of 50 random integers in the range -20 to + 20. The program should display the following: a) The number of …

Member Avatar for nmaillet
0
206
Member Avatar for gopi.mishra.7

Dear All, **Please first accept my humble respects unto all of you**. I am a masters pass out in computer science from a reputed university and I have pretty good knowledge of Java as i have studied and practiced first 6 chapters of Java OCJP by Bates(I am doing remaining …

0
45
Member Avatar for muhammads

Hi, I am new to java and am facing this problem. I have to use a TextEditor to display a list of customers. The JAR for that Texteditor which i have to use is available at (http://code.google.com/p/jtexteditor/downloads/list). Below is my class in which i am trying to use it. I …

Member Avatar for JamesCherrill
0
200
Member Avatar for muhammads

Hi All, I am not very good with Java and have a project in which i have to use this API ( http://code.google.com/p/jtexteditor/ ) to simply initiate/draw a TextEditor and fill it with the array of data i have. Unfortunatelly, there is no wiki/document/example with this API and i have …

Member Avatar for JamesCherrill
0
257
Member Avatar for greystreet34

Hi everyone, I'm in an entry level Java class and I'm supposed to be able to count the # of 7's within an integer. I've read the chapters and looked online for help but can't seem to figure it out. We just learned loops (do, while, for) and if statements …

Member Avatar for dmanw100
0
238
Member Avatar for ncis_sg1

**I am having trouble understanding exactly what I am supposed to do with the following instructions.** a. Create a class named Pay that includes variables of type double that hold rate of pay per hour and withholding rate percent. Gross pay is computed as hours worked times rate of pay …

Member Avatar for ncis_sg1
0
208
Member Avatar for ct_hunny

im trying to display result from my sql statement. here my report looks like success = 12 fail = 7 how can i display all success data when i click success and all fail data when i click fail link.. any idea..? im using netbeans...

Member Avatar for ObSys
0
79
Member Avatar for hwoarang69

i am make a 2d game in java. i have 3 class: Main.java, Player.java, Ground.java. problem i am having is how trying to make my player to jump. i want it so it jump fast, slow down at top, and come down fast on ground. so kind of like real …

Member Avatar for ObSys
0
293
Member Avatar for Syrne

Hi there, I'm attemtping to write my own version of the java "headSet" function which steps through a given tree set and returns all elements that are less than the function argument. For example: headSet(30) called for a set such as: [2, 5, 7, 18, 22, 34, 50, 76] should …

Member Avatar for Syrne
0
254
Member Avatar for emaellie

import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; class work { // main method constructs the Frame window public static void main ( String[] args ) { CircleWindow application = new CircleWindow(); }// end of main method }// end of Line app class CircleWindow extends Frame { private int nSeconds …

0
81
Member Avatar for bleedi

Hi, I've been searching all the internet for an answer for my problem, but none of the sites I've stumbled upon haven't given any results. So, I have a JList, held inside JSCrollPane, held inside JPanel inside JFrame. I have a MySQL database, and another block of code retrieves stuff …

Member Avatar for markzenz
0
2K
Member Avatar for shiv.hikumar

Display tag with strust2, tiles, export option to pdf, excel is not working in WAS7.Working perfectly in Jboss6.Below is error trace.

0
104
Member Avatar for rahul.ch

public class GenericDemo<E extends GenericDemo> { E innerE; public E doStuff(E e, GenericDemo<E> e2) { //insert code here } public E getE() { return innerE; } } The options are: 1. return e 2. return e2.getE() 3. return e2 4. return e.getE() Option (1) and (2) compile fine. Option (3) …

Member Avatar for ~s.o.s~
0
250
Member Avatar for eantz

Hi.. I have an XML file like this <?xml version="1.0" encoding="UTF-8"?> <player> <user> <username>destiya</username> <password>destiya</password> </user> <user> <username>dian</username> <password>dian</password> </user> </player> then I want to parse it with javascript and here is my javascript code : function loadXML(path) { var xhttp; xhttp = new XMLHttpRequest(); xhttp.open("GET", path, false); xhttp.send(); return …

0
56
Member Avatar for alikhandro

hi all,hope anyone can describe for me what is happining in this code,its about NaryTrees and am new with trees. public class NaryTree extends AbstractTree { protected Object key ; protected int degree ; protected NaryTree[ ] subtree ; public NaryTree(int degree){ key = null ; this.degree = degree ; …

Member Avatar for JamesCherrill
0
107
Member Avatar for mahes_

I am supposed to pass up my lab work a few weeks back..but i dont seem to get it rite.Pls help me see what is wrong with my code.....this is the question Write a class PlaneSeat that has the following features. Each PlaneSeat object should hold a seat identification number …

Member Avatar for Taywin
0
926
Member Avatar for GeKKeR

Good Afternoon all, I'm working on a project for school, and we have a part where we want a combobox filled with data from a mysql database, tabel = sport. We can work out how to fill a normal combobox just with strings, but we can't find out how to …

Member Avatar for JamesCherrill
0
728
Member Avatar for alikhandro

public void enqueue(Object obj) { if(count == size) throw new ContainerFullException(); else { array[rear] = obj; rear = (rear + 1) % size; count++; } } this is a code that add and object to a circular array.at the start the array is empty,rear=front=0. when we add the first element …

Member Avatar for Taywin
0
107
Member Avatar for psy.blast

Hello Daniweb Members, I am a beginner programmer and I have a problem, I am doing a PAT (Practical Assessment Task) for my school and I have come accross a huge problem, I'm trying to get a value from a selected combobox in Netbeans, (I am using the GUI builder), …

Member Avatar for JamesCherrill
0
244
Member Avatar for Pyler

Suppose I have a class with a constructor that takes in two strings is it okay to write the constructor this way? public class box{ private String s1; private String s2; public box(**String str1,String str2**){ s1=str1; s2=str2; } } Or can I just say public box(String str1,str2)?

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

foo |-test |-xcom |-A.class |-B.java And two files: package xcom; public class A{} package xcom public class B extends A{} Given above directory structure where root dir is foo. Class B extends A. Question is: Which allows B.java to compile? The answer is: Set the current dir to *test* then …

Member Avatar for rahul.ch
0
1K
Member Avatar for paolieanne

` Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at finalprojectintersection.ProjectGUI.findbuttonActionPerformed(ProjectGUI.java:278) at finalprojectintersection.ProjectGUI.access$000(ProjectGUI.java:26) at finalprojectintersection.ProjectGUI$1.actionPerformed(ProjectGUI.java:133) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6505) at javax.swing.JComponent.processMouseEvent(JComponent.java:3321) at java.awt.Component.processEvent(Component.java:6270) at java.awt.Container.processEvent(Container.java:2229) at java.awt.Component.dispatchEventImpl(Component.java:4861) at java.awt.Container.dispatchEventImpl(Container.java:2287) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422) at java.awt.Container.dispatchEventImpl(Container.java:2273) at java.awt.Window.dispatchEventImpl(Window.java:2719) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:703) …

Member Avatar for nmaillet
0
147
Member Avatar for bulldogs2016

I need help with the caesar cipher homework assignment, I am stuck and I do not know where to go in this problem. THis is the decoder which moves all the letters back three, but I do not know what is missing.. import java.io.*; import java.util.Scanner; public class AssignmentSix { …

Member Avatar for bulldogs2016
0
181
Member Avatar for hannahabigail.lewis

Can I get help writing a program for a 12 sided and 10 sided die and rolling snake eyes?

Member Avatar for JamesCherrill
0
88
Member Avatar for sk8ergirl

call method from another class Hi , I'm almost done with my practice paper I have done with the first part and now I'm working in the second part I came to this question and I stopped and didn't know how to call method from another class here is the …

Member Avatar for ObSys
0
207
Member Avatar for anglwthnati2de

Hi I want to be able to change the name of the JFrame I am working on. It is currently named SwimmingPoolVolumeCalculator. When I go the Company Tab and enter in a name, I want that name to be shown as the new Title of the JFrame. How can i …

Member Avatar for ObSys
0
1K
Member Avatar for yavindu

Are there any online resources to learn Java BCD ,if there are please send me some links. Thanks.

Member Avatar for JamesCherrill
0
45
Member Avatar for anandschiru

How to add an integer no to a date so tat i can a new date foe ex: date=10/11/2012 no=5 newdate=15/10/2012 **Any body plz help to solve the problem**

Member Avatar for anandschiru
0
305
Member Avatar for expresado

Hello, I would need some help/suggestions for my java project. it has to create object - "skrynka"="closet". Closet has Shelfs("poličky"). There should be for example Users = 3 cups(differenced by color). I need to move cup on shelf and than autocreate new cup on the "start" place. Problem is that …

Member Avatar for JamesCherrill
0
101
Member Avatar for sandrannola

Inline Code Example Here import java.util.*; public class DiceGame { public static void main(String[] args){ Random myRand = new Random(); Scanner myScan = new Scanner(System.in); double money = 10.00; int temp2 = myRand.nextInt(6)+ 1; int temp3 = myRand.nextInt(6)+ 1; int roll = temp2 + temp3; int choice = 0; boolean …

Member Avatar for DJSAN10
0
241
Member Avatar for nHulk

Please let me know godds books for web development using Jsf,Spring,Hibernate I am beginner to learn these technologies...and i am currently working on web development using these technologies...so let me know the easy and best books to learn these technologies. Books should include complete core concepts in simplified way....please help …

0
104
Member Avatar for ct_hunny

Hello I’m struggling in how to create simple pie chart (for dashboard). Since I’m new in jsp, and I have no basic how to connect the chart with database. Any idea or any solution.

0
79

The End.