I want to write an Android app that is able to communicate with an application on a server pc, using java sockets.
I have created few classes that implement the Serializable interface, in order to send them through socket as protocol.
The problem is that I have to create two projects in Eclipse, one for the server application and one for the android app. So, I should create a duplicate of those protocol classes in order to use them in both projects.
Is that right? Is there a kind of "import project into another project" so that I can keep those protocol classes in a third project and import it in my android app and server application?
Thank you.
You don't actually need to create a separate Eclipse project for the shared classes. You can just create a 'common source folder' outside of the other two projects' disk hierarchy. For both the server and client projects. In the Properties/Java Build Path/Source add a 'Link source' to the new folder.
Related
I want to add a mule flow developed in one project to another project i.e wanted to use the flow created in one project in another project like flow reference.
If I am understood your requirement correctly, Your trying to access one mule flow that resides in one project from another project mule flow.
If yes, then you can't use mule flow reference component to achieve this instead you can VM component.
Mule introduced concept of Domains in mule run time version 3.5 and mule anypoint studio with run time version 3.6.
With Domains concept you can access flows across projects using VM component. Go through the below Mule documentation link that will clearly tell you on how to
https://docs.mulesoft.com/mule-user-guide/v/3.7/shared-resources
1) How to create Domain application.
2) How to create Shared components in Domain.
3) Creating application that uses shared components in Domains.
4) Deployment of Domains etc ..
You can manage your projects via Maven and package reusable flows. Mule can then use any of these flows imported on the classpath: https://docs.mulesoft.com/mule-user-guide/v/3.5/modularizing-your-configuration-files-for-team-development
I am developing a java program which calls a web service. I am using NetBeans as my development environment. I imported the WSDL and Netbeans created the classes I needed. I have been happily coding for several weeks. The owner of the web service has released two updates since then. With the second update, I started getting errors from the web service. The obvious first step is to update my program.
Here is my question, I have the WSDL URL for the udpate. How do I "re-import" and update all my existing classes?
Any suggestions would be appreciated.
I finally came across the solution. In the project view, you can right-click on the specific web service connection and click either "Refresh" which will re-read the WSDL if you are calling the same URL, or you can delete the connection and readd it using the new URL.
I'm trying to wrap an existing Java web app as a mobile app using Cordova. The client side code is a single-page app built in Angular and the project is being built with Maven.
Is it possible to modify the default Cordova project structure to say, point www to src/main/webapp instead? Has anyone successfully integrated Cordova into a standard Maven web app directory structure? It would be great to avoid having to maintain a separate mobile and web code base.
I am developing a Windows Service that uses TCP/IP to communicate with their clients.
So i create a project for the service using Maven. Now i need to create a client to comunicate with this service. Is it better to create another project or a module? Or create it inside the Windows Service project?
For development purposes it easier to create another module. First, its easy to view both client and server code in the IDE without having to close and open projects. Second, common code can be placed in another module, which makes easier to code and debug.
I'm trying to implement an interface that needs to be implemented by the server but also the client. I am making an RMI server/client system where the client should call the server, and get a value from the server.
It should be a "Remote Interface" between the server and client but i have problems implement it in my server and client programs.
Have made 3 projects in Eclipse
Projekt 1 (Server)
Projekt 2 (Client)
Projekt 3 (Remote Interface)
I want a class inside the Server project named DataImpl to implement the Remote Interface. Have tried to add a JARS in my Server libraries but it dosnen't work.. have these options:
So if i add them, and go to the DataImpl class inside the server, i still wont implement DataI. Here is the options, but they are all wrong.
Hope someone know what the problem is, and what i am doing wrong :)
I found the answer myself..
You should add the project
In the build path --> Project --> Add --> Choose it!
Is the project with the interface on the classpath for the project you want to use it in? If it is, implementing it the way you are doing it is correct.
This scenario is just like any other jar file in the class path. One project is including the other project in its classpath and then uses it.