B4J Question Absolute path

Discussion in 'B4J Questions' started by bjfhs, Jun 11, 2019.

  1. bjfhs

    bjfhs Active Member Licensed User

    How can I use absolute path with B4J?
    For example:
    Code:
    m.Initialize("m","D:/t.mp4")
    I get error:java.lang.UnsupportedOperationException: Unsupported protocol "d"
     
    Last edited: Jun 12, 2019
  2. Erel

    Erel Administrator Staff Member Licensed User

    What is m?
     
  3. bjfhs

    bjfhs Active Member Licensed User

    Dim m As MediaPlayer
     
  4. OliverA

    OliverA Well-Known Member Licensed User

    Try file:///d:/t.mp4
     
    José J. Aguilar and bjfhs like this.
  5. bjfhs

    bjfhs Active Member Licensed User

    Yes,you are right. Thank you very much.
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    You should use File.GetUri. You can leave one of the parameters (dir or filename) empty.
     
    OliverA likes this.
  7. bjfhs

    bjfhs Active Member Licensed User

    Now I can use not only "file:///" but also File.GetUri.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice