|
Hello,
my problem that I will make an application (in Java since it is android) will invoke procedures (implemented in C) has a remote server running on a host, and I do not know how to do (or what Socket ). while-I data as the number of the procedure call and has to pass the arguments on appeal and even the return types of the call) that is the signature of procedure in c.
I'm really blocked I do not know how to start my application.
Please show me how to do it .....
And thank you.
|
|
|
|
|
That's rather a lot you are asking for and it's difficult to know where to start with such a vague set of requirements. If you really have no idea about this then perhaps you should spend some time learning the basics of Android development: here[^] is a starting point for you.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
I know about the android, but i want just some ideas to make a remote method call, but as you can see here is a client (java) which will call a server c (procedures).
and thank you for this answer .
|
|
|
|
|
Sorry but I'm still not sure what you are asking. Are you trying to communicate via a socket connection from phone to server or some other method?
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
yes that's right. In fact I want to call these procedures (I have the signature c) Price from my android application via the network (of course the TCP / IP socket and I know the port also for communication)
|
|
|
|
|
OK, and what exactly is your problem? If this is just a question of a socket interface you need a client in Java at one end and a server in C/C++ at the other, plenty of samples available here in the articles or via Google.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
I have a remote procedure void proc_xxx(int a, String y) written in C on a server via a java program (using socket or otherwise)? That's my problem
and thank you
|
|
|
|
|
Pinguin2011 wrote: I have a remote procedure void proc_xxx(int a, String y) written in C on a server via a java program (using socket or otherwise)? That's my problem
What exactly? Saying "I have X, that's my problem" does not really explain what you are trying to do or what your difficulty is. As I said before, if you want to connect via sockets then you need to write the socket front-end for the server and client and communicate that way by an exchange of data.
[edit]If you are trying to use RPC then take a look at these links[^].[/edit]
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
I have a remote procedure proc_xxx void (int a, String y) written in C on a server and I want to invoke it by using a Java program (using socket or other)? That's it
|
|
|
|
|
I have suggested how to use sockets and given some links to information on RPC; writing the actual code is your part of the deal.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
no help
|
|
|
|
|
Pinguin2011 wrote: I'm really blocked I do not know how to start my application.
1. Learn basics of java
2. Learn basics of programming java on Android
3. Learn basics of implementing a java server with a web interface.
4. Learn how to write an Android app that can talk to a server
5. Learn basics of C
6. Learn how to make C and Java talk to each other (I suggest using application via Runtime rather than JNI.)
7. Collect requirements for your Android App and Server
8. Design a system (more than one application) using all you have learned and based on 7.
9. Implement the design.
10. Unit test the design.
|
|
|
|
|
Hi,
I'm writing a simple visitor-based analysis in Java using Eclipse. Here I have to implement a tree-walker analysis within Crystal. But I wanna know the difference (advantages/disadvantages) between implementing the visitor class inside the analysis class or outside that.
Ex: Inner visitor class
public class MyAnalysis extends AbstractCrystalMethodAnalysis {
...
private class MyVisitor extends ASTVisitor {
...
}
...
}
I really appreciate if some can tell me the difference between these two implementations.
|
|
|
|
|
I would turn the question around and ask: why do you want to make the visitor a private inner class? What are you hoping to gain by doing that?
|
|
|
|
|
I'm new to this stuff. I was following some sample codes and there I saw inner-class implementations. So I wonder what's the difference between inner and outter implementations. BTW I'm implementing the AST visitor as a public class even inside the Analysis class.
|
|
|
|
|
Usage of inner classes is one of those things that some Java coders get very worked up about, for and against. Personally, I don't much like them but they have their uses.
There are plenty of opinions on the net about whether to use them, when to use them, how to use them. For every one person who says "Do it this way" you will find another who says "Don't do it that way".
The one thing I would say is: if you are making AST Visitor publicly visible outside Analysis, why not just make it an outer class on its own? What do you gain by making it an inner class of Analysis?
|
|
|
|
|
I want to run an exe file in my project.
I mean when I run my codes,a specific executable file run.
How can I do that?
|
|
|
|
|
I expect you want to use the Runtime[^] class.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Since 1.5 ProcessBuilder has been recommended over Runtime. Having said that, I still use Runtime because it's what I'm used to and old habits die hard.
|
|
|
|
|
I used Google to check; it's a while since I sat and read the latest documentation and guidance notes.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
tell me about Layout Managers
i want to use it in my applet programes
|
|
|
|
|
I have already made a suggestion here[^]. Please do not repeat the same question in multiple forums.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
hi...I'm writing a program for converting nfa to dfa...for getting alphabet and rules(which are array) and other elements in nfa (which are not arrays) I've defined a "NFA" class and for converting another class "NfaToDfa"...when I create an object from "NFA" class and I want to use for example "getrules" method in "NfaToDfa" there's an error...notice that for the other elements which are integer or...(anything except array) there's no error...what can I do ?
NFA NFATo=new NFA();
String[ ][ ] Rules=new String[100][3];
Rules=NFATo.getRule();
String[] alphabet=new String[27];
alphabet=NFATo.getAlpha();
I have error in line 3 and 5...the error is "cannot find symbol"...can anyone help me with this problem ?
|
|
|
|
|
What symbol can the compiler not find, i.e. post the full text of the error message.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
the error is :
cannot find symbol
symbol: class Rules
location: class nfa2dfa.NfaToDfa
<identifier> expected
cannot find symbol
symbol: method getRule()
location: class nfa2dfa.NFA
|
|
|
|