Reference / Call method to another project's source code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nickyeng
    Contributor
    • Nov 2006
    • 252

    #1

    Reference / Call method to another project's source code

    i have 2 projects but i am not sure how to integrate them.

    from 1st project, i have to call some function in 2nd project.

    what source code should i add into my 1st project ?

    use "import" ?
    but import is used within the same project but not with other project , right ?

    so what should i do ?
  • dmjpro
    Top Contributor
    • Jan 2007
    • 2476

    #2
    Originally posted by nickyeng
    i have 2 projects but i am not sure how to integrate them.

    from 1st project, i have to call some function in 2nd project.

    what source code should i add into my 1st project ?

    use "import" ?
    but import is used within the same project but not with other project , right ?

    so what should i do ?
    Actually this sounds very absurd.
    Why do you need this?
    Please let me know.

    Kind regards,
    Dmjpro.

    Comment

    • nickyeng
      Contributor
      • Nov 2006
      • 252

      #3
      Originally posted by dmjpro
      Actually this sounds very absurd.
      Why do you need this?
      Please let me know.

      Kind regards,
      Dmjpro.
      Because i need to update project B's account from project A.

      Comment

      • dmjpro
        Top Contributor
        • Jan 2007
        • 2476

        #4
        Originally posted by nickyeng
        Because i need to update project B's account from project A.
        So your A project depends on B.
        But that should not happen in Application.

        Kind regards,
        Dmjpro.

        Comment

        • r035198x
          MVP
          • Sep 2006
          • 13225

          #5
          Originally posted by nickyeng
          Because i need to update project B's account from project A.
          What type is the account? Is it a file? A database table?

          Are these "projects" running at the same time from different JVMs?

          Comment

          • Nepomuk
            Recognized Expert Specialist
            • Aug 2007
            • 3111

            #6
            Originally posted by nickyeng
            i have 2 projects but i am not sure how to integrate them.

            from 1st project, i have to call some function in 2nd project.

            what source code should i add into my 1st project ?

            use "import" ?
            but import is used within the same project but not with other project , right ?

            so what should i do ?
            You can import one project into another with import, as long as that other project is in your classpath. However, as was already said, this is normally no good idea.

            Greetings,
            Nepomuk

            Comment

            Working...