Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Visual J# / November 2004

Tip: Looking for answers? Try searching our database.

Java Class Protection Level

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bob - 17 Nov 2004 14:14 GMT
Hi

When referencing a J# class I am receving the error "is inaccessible due to
its protection level". The class is marked public and I can verify this but
locating the class in the Object Browser.

Using C#MDE 2003, Framework 1.1

Thanks Bob
Amit Bhagwat [MSFT] - 18 Nov 2004 06:43 GMT
Hi Bob,
Can you please post the piece of code where you are facing this problem.

Thanks,
Amit
--------------------
>Thread-Topic: Java Class Protection Level
>thread-index: AcTMr7CDCUi3j7feQ3OUT6fPJ4sV6w==
[quoted text clipped - 28 lines]
>
>Thanks Bob
Bob - 19 Nov 2004 14:23 GMT
Thank you Amit,

  I am using J# and covert several Java Class to DLL with jbimp

  The error occurs while calling the object CParameter.

  The DLL in question is referenced in my solution. This occurs with most
java classes converted by jbimp

  Looking at the object browser the class CParameter is public.

  I use command jbimp *.class /usestubrefs /t:library

Thank you

Bob

package ap_web;

import webapi.common.CPage;
import webapi.common.CCommException;
import webapi.common.CParameter;
import webapi.common.CDGroup;
import webapi.common.CServer;
import webapi.common.CKey;
import webapi.common.CDoc;
import webapi.common.CLicInfo;
import System.Collections.*;
import System.ComponentModel.*;
import System.Data.*;
import System.Drawing.*;
import System.Web.*;
import System.Web.SessionState.*;
import System.Web.UI.*;
import System.Web.UI.WebControls.*;
import System.Web.UI.HtmlControls.*;

....

    private void Button1_Click (Object sender, System.EventArgs e)
    {
        try
        {
               
            //Create Parameter object and set the License String
            CParameter oParameters= new CParameter("KAaOlISpP7vnnQDeFipx9U4");

                               ... more code

        }
        catch
        {
            ... blah blah
        }
    }

> Hi Bob,
> Can you please post the piece of code where you are facing this problem.
[quoted text clipped - 36 lines]
> >
> >Thanks Bob
Amit Bhagwat [MSFT] - 22 Nov 2004 06:47 GMT
Can you also share the code where you have defined the class CParameter?
Looking at your description, I think that CParameter class is defined as
package - scoped.

Thanks,
Amit
--------------------
>Thread-Topic: Java Class Protection Level
>thread-index: AcTOQ0h4tkaXDZA9R4Kpbja3+r+AJw==
>X-WBNR-Posting-Host: 12.29.183.218
>From: =?Utf-8?B?Qm9i?= <Bob@discussions.microsoft.com>
>References:  <113F5BF3-7E19-493E-B0CB-50B74AFD7BD1@microsoft.com>
<UBlR6nTzEHA.2916@cpmsftngxa10.phx.gbl>
>Subject: RE: Java Class Protection Level
>Date: Fri, 19 Nov 2004 06:23:04 -0800
[quoted text clipped - 12 lines]
>NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
>Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA0
3.phx.gbl
>Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.vjsharp:6660
>X-Tomcat-NG: microsoft.public.dotnet.vjsharp
[quoted text clipped - 95 lines]
>> >
>> >Thanks Bob
Bob - 22 Nov 2004 18:47 GMT
Amit,

  When I place my cursor over the word CParameter it says

"Class CParameter"

I cannot give you code for CParameter because it was created with jbimp from
a Java class Library.

> Can you also share the code where you have defined the class CParameter?
> Looking at your description, I think that CParameter class is defined as
[quoted text clipped - 127 lines]
> >> >
> >> >Thanks Bob
Amit Bhagwat [MSFT] - 25 Nov 2004 09:17 GMT
The class is package scoped and hence you are getting the error
"inaccessible due to its protection level".
Otherwise in Object browser it would be displayed as "public class
CParameter" instead of "class CParameter"

>X-Tomcat-NG: microsoft.public.dotnet.vjsharp
>
[quoted text clipped - 36 lines]
>> >NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
>> >Path:

cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA0
>> 3.phx.gbl
>> >Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.vjsharp:6660
[quoted text clipped - 97 lines]
>> >> >
>> >> >Thanks Bob

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.