Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2005

Tip: Looking for answers? Try searching our database.

constructor problem

Thread view: 
Irlan agous - 12 Jun 2005 08:32 GMT
Hello, i dont understand why i get the cant resolve symbol error.

I want to start an RMI server here.

import java.rmi.*;
import java.rmi.server.*;

public class PatientServer
{

   public static void main(String[] args)
   {
       try
       {
           if (System.getSecurityManager() == null)
           {
               System.setSecurityManager ( new RMISecurityManager());
           }
           Patient p = new Patient();       //////// the constructor
           System.out.println("Binding...");

               Naming.bind("PatientServer", p);
           System.out.println("PatientServer is ready...");

       }
       catch (Exception e)
       {
           e.printStackTrace();
       }
   }

}

Now i have a Patient Class where the constructor exists public Patient(int
patientNummer). So i dont understand why it will not initialize the
constructor. Patient.Class exists in the same package. I get this error
always: symbol  : constructor Patient ()
location: class sapa.Patient
           sapa.Patient p = new Patient();

Can somebody help me please. Even i want to send the code, and you can take
a look, also for payment if neccesary, becouse i cant get it to work and i
want to learn it so badly,

Thanks in advance

Irlan
Raymond DeCampo - 12 Jun 2005 23:03 GMT
> Now i have a Patient Class where the constructor exists public Patient(int
> patientNummer).

Here you indicate that the constructor for the Patient class requires an
integer.

> So i dont understand why it will not initialize the
> constructor. Patient.Class exists in the same package. I get this error
> always: symbol  : constructor Patient ()
> location: class sapa.Patient
>             sapa.Patient p = new Patient();

Here you have attempted to use a no-argument constructor of the Patient
class, which apparently does not exist.  You must pass an integer to the
Patient constructor.

> Can somebody help me please. Even i want to send the code, and you can take
> a look, also for payment if neccesary, becouse i cant get it to work and i
[quoted text clipped - 3 lines]
>
> Irlan

HTH,
Ray

Signature

XML is the programmer's duct tape.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.