• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

this is a weird porblem please help?

 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to assess a method which is public from servlet. but it gives weird error. image has been attached please view this image and please help me on fixing this problem
thanks
error.png
[Thumbnail for error.png]
 
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Seen as both classes are in different packages - which should have lowercase names by the way - it might be that the GameRoomPlayerListWindow has the default package private visibility. Make it explicitly public if that's the case.
 
waqas imtiaz
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jelle Klap wrote:Seen as both classes are in different packages - which should have lowercase names by the way - it might be that the GameRoomPlayerListWindow has the default package private visibility. Make it explicitly public if that's the case.



How to change that to public?
 
waqas imtiaz
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jelle Klap wrote:Seen as both classes are in different packages - which should have lowercase names by the way - it might be that the GameRoomPlayerListWindow has the default package private visibility. Make it explicitly public if that's the case.



Please help me how to change that?
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What's the variable "gameRoom"? The getGameRoomPlayerListWindow() method in it should have public access because you are trying access it in different package.
 
Bartender
Posts: 3323
86
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
PatienceIsAVirtue (← click)

Without seeing the whole class it's hard to be sure what is happening hence Jelle saying " it might be ...". But you need to check to see what visibility the class currently has and if it is not public you need to change it to public. If you don't know how to do that read http://docs.oracle.com/javase/tutorial/reflect/class/classModifiers.html.

 
waqas imtiaz
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tony Docherty wrote:PatienceIsAVirtue (← click)

Without seeing the whole class it's hard to be sure what is happening hence Jelle saying " it might be ...". But you need to check to see what visibility the class currently has and if it is not public you need to change it to public. If you don't know how to do that read http://docs.oracle.com/javase/tutorial/reflect/class/classModifiers.html.



Thanks man it's been fixed. Actually class was not public now fixed
Thank you every one for helping me take care
 
reply
    Bookmark Topic Watch Topic
  • New Topic