| Author |
Package level constructor ?
|
Pho Tek
Ranch Hand
Joined: Nov 05, 2000
Posts: 757
|
|
I wrote a simple javabean class:- package a.b.c; public class Foo{ int i; Foo(){ i = 1000; } void setI(int i){ this.i = i; } int getI() { return(i); } } And in a servlet; it failed to load the class Foo via a: Class.forName( a.b.c.Foo ); I don't understand what the package level access modifier does to a class constructor. Note that I am able to instantiate the class Foo like this: Foo f = new Foo(); Pho
|
Regards,
Pho
|
 |
Cindy Glass
"The Hood"
Sheriff
Joined: Sep 29, 2000
Posts: 8521
|
|
Pho, There is not quite enough information here for us to follow. Where does the directory reside - client side or server side? What is the code that didn't work?? What was the error given? I'm afraid that it SOUNDS like you have the package on the client side with the GUI, and are trying to access it from the server side (Nope won't work). This of course had nothing to do with constructors, just architecture.
|
"JavaRanch, where the deer and the Certified play" - David O'Meara
|
 |
 |
|
|
subject: Package level constructor ?
|
|
|