JAVA program to connect to IBM PCOMM - java

Please can you assist me on how to connect JAVA to IBM PCOMM and interact with its screen. Right now, I am just running IBM PCOMM using AutoHotKey (Run and SendInput), no API at all, just an automated keyboard input care of AHK script.
I am also thinking of writing AHK script to connect to IBM PCOMM and run it in my JAVA program as exe, but unfortunately, I don't know either how to write that script.
I am using Eclipse JUNO.

I'm also doing the same things like your. I'm using jacob - a com-java bridge component for java. I've just started my project for one week and the result I've got is quite fessible. Until know, I can wrap all the PCOMM com object by java and work with it properly. You can study jacob at this link: http://sourceforge.net/projects/jacob-project/ and danadler.com/jacob/ .

Related

Connect java pc application to a mobile hotspot

Objective : I want the java project to connect to a mobile(android) hotspot.
I referred to WIFI - Scan and Connect using Java and tried using jwlanSacn lib but unfortunately it works only for 32 bit systems. This lib uses JNI.
Is there a way to connect to a mobile hotspot in java? Any libraries ?
or can I create my own JNI code for it?
Also, referred to
WIFI - Scan and Connect using Java
Finding SSID of a wireless network with Java
I'm working on 64bit Windows.
I'm new in pure java programming. Please help!
Thanks
You have to do it from the command line. You pretty much have to execute OS-specific instructions from your java program to command line using Runtime.getRuntime().exec(...) And then do some kind of parsing for the response you get. That's the idea.
Sorry I can't help more right now. I will update my answer as soon as I investigate this further

How to call MATLAB program from the java application

I am trying to call matlab executable file from java application
i am try 2 option:
Process p=new ProcessBuilder("C:\\Users\\Dexter\\Documents\\MATLAB\\Project.exe").start();
Process p= Runtime.getRuntime().exec("C:\\Users\\Dexter\\Documents\\MATLAB\\Project.exe");
... these 2 options are work properly for another application like chrome, eclipse, et cetera
pls suggest the solution
I suppose that you are trying to run an executable exported from Matlab, within Java. I am not sure that this is going to work...
What you can do is to use the matlabcontrol library in order to open a session with Matlab and then you will be able to run Matlab commands directly, from Java, or run a Matlab script from Java, by giving some inputs and taking back the result from Matlab. I have created a server which does all the aforementioned, in Java, and using matlabcontrol library to connect with Matlab. You can find it here:
Connect Java with Matlab
Let me know if you need any further clarification.

how to start/stop an application pool in IIS 6.0 from Java remotely

Can I start and stop IIS 6.0 application pools on one machine from within Java code running on another machine? If so, how?
Use Java's facility to execute another program and use the command line tool such as
appcmd stop apppool /apppool.nam
appcmd start apppool /apppool.nam
(see http://technet.microsoft.com/en-us/library/cc732742(WS.10).aspx)
I believe you can do it using WMI. Please take a look http://msdn.microsoft.com/en-us/library/ms525309(v=vs.90).aspx
and here: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/9041b0a5-c314-46d9-8f56-01506687f357.mspx?mfr=true
Or just google "iis wmi".
First find API you need and find a way to write JScript or VBScript that does what you need.
Then you have 2 ways.
Just execute script you have just done from java using Runtime.exec()
Use one of interoparability packages like JaWin, JIntegra or JInterop (or, probably others) to call the same code from java.

Please suggest a platform to port C# app to Mac?

Greetings,
I need to port this Windows utility: http://solinker.com to Mac.
The app was written in C#, .NET 2.0.
The main requirement is:
The app should be able to talk with AppleScript to interact with Photoshop. The program is small and UI is simple so I could consider to fully rewritte the app.
Possible candidates are:
MonoMac
Unity 3D (seems it doesn't required to install the Mono)
XULRunner (Flickr Uploader written by XULR)
QT
Java (convert all the app to Java + 2 different connector to photoshop:
for Mac and for Win)
I would be appreciate for any advice!
I'm not experienced with others but can definitely suggest MonoMac. It looks and feels like any other Mac app while running on Mac. On the other hand, if the application was written with Visual Studio on Windows, it never properly works on MonoMac. So prefer MonoDevelop, if you go this route.
If you check the documentation for MonoMac, you will see they have a packager which bundles all dependencies with the final app. So, no need for a seperate Mono install:
http://www.mono-project.com/MonoMacPackager
As for AppleScript, MonoDevelop does some wrapping of AppleScript. You should take a look at their source:
https://github.com/mono/monodevelop/blob/master/main/src/addins/MacPlatform/MacInterop/AppleScript.cs
I would say MonoMac is your best approach.

How to start a local port on user's computer (Edited question)

sorry in the past I have not been able to formulate my question coherently. This will be my last try. =|
Basically, I want to do something like this website is doing: http://www.ninjavideo.net/video/56388. They are rendering an iframe that points to a port on localhost. You will see nothing in the iframe if you dont have their applet running (which can be found here: ninjavideo.net/applet.php ). I want to write a script that does something like what applet.php is doing, but I don't think they are using only php code as it won't run on computers that don't have php installed. Do you suppose they are using Java/C to do this?
Thanks for all your suggestions.
An Applet is basically a piece of Java code which is served by a webpage and is supposed to run at the client machine. You can learn more about Applets at Sun's own Applet tutorial. If you're green to Java as well, then I recommend to go through Trials Covering the Basics first. Opening sockets (ports) using Java code is covered here.
That PHP script is just serving the applet code from the server, so that the client can download it.
You could do this in PHP using a ready-to-run Apache setup (there are some that are ready to run from a USB key, should be possible to make into something that a client can install, but is complicated, see e.g. this tutorial) or a product like NuSphere Dock:
PhpDock is a deployment platform for PHP applications.
PhpDock enables you to deploy any PHP web application as a Stand Alone Windows Desktop application w/o any changes in the code.
PhpDock combines NuSphere's powerful embeded Srv webserver and browser components.
I would usually say that if you are looking to build a Windows application, you should go with a tool that is aimed at just that, i.e. C++, C#, Java, the .NET platform, Delphi, and the likes. But if you need some kind of daemon or local web server, you may actually be well off with a product bringing a web server to the desktop.

Categories