How do you use this great new API in connection with Java? Do you use just pure native process API like nativeProcess.standardInput.write() and nativeProcess.standardOutput.read() with which you cannot debug Java side neither invoke remote java method. Or you are using some library that leverages remote method invocation such as flerry lib but that also cannot debug Java side? Or maybe you are using Merapi with which you can debug but cannot remotely invoke Java method? I'm asking this because this is maybe the most important question regarding this API and its ease of use.
It sounds like your reservations have to do with being able to debug the Java process. This is not really an issue. You can use the NativeProcess API to kick off a Java process with arguments that will cause it to be externally debuggable. For example:
var processArgs:Vector.<String> = new Vector.<String>();
processArgs.push("-Xdebug");
processArgs.push("-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n");
This will allow your Java process to be remote debuggable. You can then connect to it from Eclipse or Netbeans once the process has started. If the code in the Java process is linked to an active Eclipse/Netbeans project, you can do linewise debugging like you would of any other Java application.
-Raj
You can use NativeProcess to execute java.exe and pass it the right parameters to execute a java application.
You cannot use NativeProcess to run random java code from a jar file.
Having used both of them, you can debug the JVM with MerAPI or NativeProcess API.
Prior to AIR2.0, I used merapi to communicate over the network to a java process.
I would much prefer to use the NativeProcess launcher now, with MerAPI we were hacking
ugly marshalling code. Debugging the network payloads was a pin via merapi.
Using NativeProcess API is easy -
var myForkedExe:NativeProcessStartupInfo = new NativeProcessStartupInfo();
myForkedExe.executable = ;
...
I am not sure I understand what you mean by can not invoke remote Java methods with merapi.
That's exactly what I have been doing. Debugging is easy, just set the JPDA args and attach any JAVA debugger.
You could use Flerry to launch and communicate with java processes.
You can use var file:File = new File("/usr/bin/java"); and pass parameters to the Java-file with a Vector of arguments. E.g.
var arguments:Vector.<String> = new Vector.<String>;
arguments.push("-jar");
Related
Is it possible to communicate to a client/server application by calling the command System in R?
I use BaseX for storing xml databases and I want to call a Basex client from R by using the "system"command after have launching the basexserver manually
setwd("C:/Program Files/BaseX/bin/")
system("basexclient -U admin -P admin",wait = TRUE)
BaseX 8.1 [Client]
Try help to get more information.
The problem is that R can't communicate with the BaseX Client, and as consequence i get this error :
Child process not responding.R will terminate it.
I tried to change wait parameter to wait=FALSE and then execute a command BaseX but it seems that it can't communicate to the client also.
system("OPEN mydatabse",wait = FALSE)
object "mydatabse" not found
Any suggestions you can provide will be appreciated.
N.B : The same problem occurs with Java
I have two local Grunt+Bower-projects with typical build and watch/serve tasks:
Client contains the client to be publicly released
AdminClient is an extension to client intended for internal administration use
AdminClient should re-use Client code and build-result. watch/serve must behave transparently for any change in Client and AdminClient.
How can I do this with Grunt+Bower?
It is a basic problem solved in C# with project dependency and in java typically with maven sub-modules.
You can have the Client configuration in a separate file that you extend in the AdminClient.
var common = require("common.js");
...
grunt.initConfig(common.config);
I'm experiencing problems since I'm calling cuGLGetDevices() on an application which uses the glXGetCurrentContext (https://www.opengl.org/sdk/docs/man2/xhtml/glXGetCurrentContext.xml) function to query an OpenGL context. The context must be local and not remote via ssh for my app to work properly.
Is there any way I can detect if the context is remote or local?
You need to use glXIsDirect function
i have to call an executable in the client machine in asp.net and get the return parameters, i been looking for an example but i couldn't find it.
it this possible to recover the output parameters from one exe in JavaScript?
i know that can i write:
var WshShell = new ActiveXObject("WScript.Shell");
var oExec = WshShell.Exec("My.exe");
but the clients executable returns 0 or 1 that values are the ones i need to collect
Thanks in advance
Browser-based JavaScript can't call executable files on client machines; to do so would be a catastrophic security problem. If you have to run an executable on the client machine, consider asking the user to install a .NET application, an ActiveX control, or something like Java if you want to be platform-independent.
Depending on what you're trying to do, you may not need to run an EXE on the client machine; you can do a LOT with standard cloud-type scenarios (JS or SilverLight on the client, Web services or WCF on the server). Without more information about your situation, however, it's impossible to tell.
EDIT: Based on your comments that you're using the ActiveXObject.Exec method, you can use the StdOut property of the WshScriptExec object that method returns. From MSDN's article on the StdOut property:
if (!oExec.StdOut.AtEndOfStream)
{
input += oExec.StdOut.Read(1);
//...
}
We are using unity to resolve the WCFService and the good practice of WCF says close the client once done.
But if we are using unity when and how to close WCFServiceClient?
I assume that unity provides a proxy to you? Can you use a using statement on the get from unity?
using(var proxy = GetProxyFromUnit()){
...
}
Type of thing?