Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Using Java Classes in VB appl.

Using Java Classes in VB appl.

Scheduled Pinned Locked Moved Visual Basic
javaquestionlearning
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sairam Samavedam
    wrote on last edited by
    #1

    Hey ! I am a mech. engr. student and am having to put up with this course - intelligent robotic control. The robots (amigobots) can be controlled by Java code that uses IP or whatever..!!! I have done all my coding for Motion and Path Planning in VB. Is there any way I can access the bots' Java Classes from my VB appl. ? Really desperate for this! Dont tell me to rewrite the entire code in Java...I am very new to programming... Sairam Samavedam

    J D 2 Replies Last reply
    0
    • S Sairam Samavedam

      Hey ! I am a mech. engr. student and am having to put up with this course - intelligent robotic control. The robots (amigobots) can be controlled by Java code that uses IP or whatever..!!! I have done all my coding for Motion and Path Planning in VB. Is there any way I can access the bots' Java Classes from my VB appl. ? Really desperate for this! Dont tell me to rewrite the entire code in Java...I am very new to programming... Sairam Samavedam

      J Offline
      J Offline
      John Kuhn
      wrote on last edited by
      #2

      Unless I'm mistaken, this could be an amazingly complex, yet interesting, project. there's an article on this subject here or you can go to java.sun.com and look up documentation on the JNI (Java Native Interface). I don't find much in the VB world that provides shortcuts for this, either.

      1 Reply Last reply
      0
      • S Sairam Samavedam

        Hey ! I am a mech. engr. student and am having to put up with this course - intelligent robotic control. The robots (amigobots) can be controlled by Java code that uses IP or whatever..!!! I have done all my coding for Motion and Path Planning in VB. Is there any way I can access the bots' Java Classes from my VB appl. ? Really desperate for this! Dont tell me to rewrite the entire code in Java...I am very new to programming... Sairam Samavedam

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        I've found the same complexities. If your in a time crunch, it looks like your best bet is to start rewriting in Java. At least, with the VB code already written, you don't have to reinvent the logic. RageInTheMachine9532

        S 1 Reply Last reply
        0
        • D Dave Kreskowiak

          I've found the same complexities. If your in a time crunch, it looks like your best bet is to start rewriting in Java. At least, with the VB code already written, you don't have to reinvent the logic. RageInTheMachine9532

          S Offline
          S Offline
          Sairam Samavedam
          wrote on last edited by
          #4

          Thanks guys for the supp.. Anyway, came to know about an appl. called JavaReg, that comes with Jdk1.3 This thing is supposed to convert a Java class into a COM object that can be used in VB code. Have tried it and it is not working some of the times. Like, it is not showing some of the methods in the created COM object that were supposed to be there. If anyone have used JavaReg before, would like to know some info. on how to use it correctly. Sairam Samavedam

          D 1 Reply Last reply
          0
          • S Sairam Samavedam

            Thanks guys for the supp.. Anyway, came to know about an appl. called JavaReg, that comes with Jdk1.3 This thing is supposed to convert a Java class into a COM object that can be used in VB code. Have tried it and it is not working some of the times. Like, it is not showing some of the methods in the created COM object that were supposed to be there. If anyone have used JavaReg before, would like to know some info. on how to use it correctly. Sairam Samavedam

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            Yeah. I tried it once, but never could get it to work reliably. I was just messing around with it though. I didn't need it for any particular project and just dropped it at that point. RageInTheMachine9532

            S 1 Reply Last reply
            0
            • D Dave Kreskowiak

              Yeah. I tried it once, but never could get it to work reliably. I was just messing around with it though. I didn't need it for any particular project and just dropped it at that point. RageInTheMachine9532

              S Offline
              S Offline
              Sairam Samavedam
              wrote on last edited by
              #6

              Did u ever try any of the tools that supposedly convert a VB code into Java code... ? Do they work? Any good ones ? Going to all this trouble because rewriting would be painful, even though logic is done. Have to implement Digkstra's and visibilty graph algos... Sairam Samavedam

              D 1 Reply Last reply
              0
              • S Sairam Samavedam

                Did u ever try any of the tools that supposedly convert a VB code into Java code... ? Do they work? Any good ones ? Going to all this trouble because rewriting would be painful, even though logic is done. Have to implement Digkstra's and visibilty graph algos... Sairam Samavedam

                D Offline
                D Offline
                Dave Kreskowiak
                wrote on last edited by
                #7

                Of the few language conversion tools I've used, they ALL have one thing in common: They can never get all the code to convert properly, so you have to go thru and edit the resulting code anyway. RageInTheMachine9532

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups