Case-sensitive imports conflict

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ross Presser

    #1

    Case-sensitive imports conflict

    Background:

    I am trying to make use of the pdfbox library (www.pdfbox.com), which is a
    java-based project that the user has ported to dotnet using the ikvm
    environment (www.ikvm.net). IKVM in turn relies on a port of the GNU
    Classpath library, which implements much of the standard java 1.4.

    My problem:

    GNU classpath supplies the following classes that pdfbox needs:

    java.awt.image. BufferedImage
    java.awt.Image

    They appear in the same assembly, IKVM.GNU.Classp ath.dll, and can both be
    seen in the Object Browser after I reference that assembly from my vb.net
    project.

    Unfortunately, any attempt to use java.awt.image. BufferedImage in my code
    is highlighted as a compile error (and reported as a compile error when
    building:)

    PdfToImageVB.vb (254): Type 'java.awt.Image .BufferedImage' is not defined.

    Although both Image (type) and image (namespace) can be seen when scrolling
    through intellisense, if you stop at java.awt.image it is captialized to
    java.awt.Image.

    When I use Sharpdevelop to set up a C# project, I do not have this issue,
    but Sharpdevelop has the same issue for a VB.NET project.

    Is there anything I can do? I don't enjoy developing in C#...
  • Ken Tucker [MVP]

    #2
    Re: Case-sensitive imports conflict

    Hi,

    I am not sure why you are having problems with the pdfbox library.
    I have used the open source sharppdf library with vb.net without any
    problems.



    Ken
    --------------------------
    "Ross Presser" <rpresser@NOSPA Mgmail.com.inva lid> wrote in message
    news:gmr3d55n8o f1.1sdxswfcjsi7 c.dlg@40tude.ne t...
    Background:

    I am trying to make use of the pdfbox library (www.pdfbox.com), which is a
    java-based project that the user has ported to dotnet using the ikvm
    environment (www.ikvm.net). IKVM in turn relies on a port of the GNU
    Classpath library, which implements much of the standard java 1.4.

    My problem:

    GNU classpath supplies the following classes that pdfbox needs:

    java.awt.image. BufferedImage
    java.awt.Image

    They appear in the same assembly, IKVM.GNU.Classp ath.dll, and can both be
    seen in the Object Browser after I reference that assembly from my vb.net
    project.

    Unfortunately, any attempt to use java.awt.image. BufferedImage in my code
    is highlighted as a compile error (and reported as a compile error when
    building:)

    PdfToImageVB.vb (254): Type 'java.awt.Image .BufferedImage' is not defined.

    Although both Image (type) and image (namespace) can be seen when scrolling
    through intellisense, if you stop at java.awt.image it is captialized to
    java.awt.Image.

    When I use Sharpdevelop to set up a C# project, I do not have this issue,
    but Sharpdevelop has the same issue for a VB.NET project.

    Is there anything I can do? I don't enjoy developing in C#...


    Comment

    • Herfried K. Wagner [MVP]

      #3
      Re: Case-sensitive imports conflict

      "Ross Presser" <rpresser@NOSPA Mgmail.com.inva lid> schrieb:[color=blue]
      > java.awt.image. BufferedImage
      > java.awt.Image
      >
      > They appear in the same assembly, IKVM.GNU.Classp ath.dll, and can both be
      > seen in the Object Browser after I reference that assembly from my vb.net
      > project.
      >
      > Unfortunately, any attempt to use java.awt.image. BufferedImage in my code
      > is highlighted as a compile error (and reported as a compile error when
      > building:)
      >
      > PdfToImageVB.vb (254): Type 'java.awt.Image .BufferedImage' is not defined.
      >
      > Although both Image (type) and image (namespace) can be seen when
      > scrolling
      > through intellisense, if you stop at java.awt.image it is captialized to
      > java.awt.Image.
      >[...]
      > Is there anything I can do?[/color]

      Ask the library's author for a CLS-compliant version. MSDN:

      | For two identifiers to be considered distinct, they must differ
      | by more than just their case.


      --
      M S Herfried K. Wagner
      M V P <URL:http://dotnet.mvps.org/>
      V B <URL:http://classicvb.org/petition/>

      Comment

      • Ross Presser

        #4
        Re: Case-sensitive imports conflict

        On Thu, 19 May 2005 21:08:14 +0200, Herfried K. Wagner [MVP] wrote:
        [color=blue]
        > "Ross Presser" <rpresser@NOSPA Mgmail.com.inva lid> schrieb:[color=green]
        >> java.awt.image. BufferedImage
        >> java.awt.Image
        >>
        >> They appear in the same assembly, IKVM.GNU.Classp ath.dll, and can both be
        >> seen in the Object Browser after I reference that assembly from my vb.net
        >> project.
        >>
        >> Unfortunately, any attempt to use java.awt.image. BufferedImage in my code
        >> is highlighted as a compile error (and reported as a compile error when
        >> building:)
        >>
        >> PdfToImageVB.vb (254): Type 'java.awt.Image .BufferedImage' is not defined.
        >>
        >> Although both Image (type) and image (namespace) can be seen when
        >> scrolling
        >> through intellisense, if you stop at java.awt.image it is captialized to
        >> java.awt.Image.
        >>[...]
        >> Is there anything I can do?[/color]
        >
        > Ask the library's author for a CLS-compliant version. MSDN:
        >
        >| For two identifiers to be considered distinct, they must differ
        >| by more than just their case.[/color]

        Thank you for the answer. Unfortunately, it seems unlikely they will do
        this, since the effort is to be compatible with java ...

        I will have to write at least part of it in C#.

        Comment

        • Ross Presser

          #5
          Re: Case-sensitive imports conflict

          On Thu, 19 May 2005 14:41:58 -0400, Ken Tucker [MVP] wrote:
          [color=blue]
          > Hi,
          >
          > I am not sure why you are having problems with the pdfbox library.
          > I have used the open source sharppdf library with vb.net without any
          > problems.
          >
          > http://sharppdf.it/home.asp[/color]

          SharpPDF appears to be only for creation of new PDFs; for that purpose I am
          content with iText.NET, which seems much more full-featured.

          pdfbox, however, is supposed to add investigation of the structure of
          existing PDFs, as well as pdf rendering.

          My problem is at heart not with pdfbox, but with the IKVM port of GNU
          Classpath.

          Comment

          • Herfried K. Wagner [MVP]

            #6
            Re: Case-sensitive imports conflict

            "Ross Presser" <rpresser@NOSPA Mgmail.com.inva lid> schrieb:[color=blue][color=green]
            >> Ask the library's author for a CLS-compliant version. MSDN:
            >>
            >>| For two identifiers to be considered distinct, they must differ
            >>| by more than just their case.[/color]
            >
            > Thank you for the answer. Unfortunately, it seems unlikely they will do
            > this, since the effort is to be compatible with java ...
            >
            > I will have to write at least part of it in C#.[/color]

            I think it's the best solution to keep the part using the library in a C#
            project too.

            --
            M S Herfried K. Wagner
            M V P <URL:http://dotnet.mvps.org/>
            V B <URL:http://classicvb.org/petition/>

            Comment

            • Ken Tucker [MVP]

              #7
              Re: Case-sensitive imports conflict

              Hi,



              Ken
              ----------------
              "Ross Presser" <rpresser@NOSPA Mgmail.com.inva lid> wrote in message
              news:s5gi73kybo zc$.1a0gdfdu4fl 4z$.dlg@40tude. net...
              On Thu, 19 May 2005 14:41:58 -0400, Ken Tucker [MVP] wrote:
              [color=blue]
              > Hi,
              >
              > I am not sure why you are having problems with the pdfbox library.
              > I have used the open source sharppdf library with vb.net without any
              > problems.
              >
              > http://sharppdf.it/home.asp[/color]

              SharpPDF appears to be only for creation of new PDFs; for that purpose I am
              content with iText.NET, which seems much more full-featured.

              pdfbox, however, is supposed to add investigation of the structure of
              existing PDFs, as well as pdf rendering.

              My problem is at heart not with pdfbox, but with the IKVM port of GNU
              Classpath.


              Comment

              Working...