Using Java on a client machine I wish to execute a different Java program on a server.
I have a Windows 7 laptop that I'm using as a client machine, and I wish to run a simple java program on a MacBook Pro (this will be the server) from the client. The program on the server will be stored there, so there won't be any need for uploading the code from the client.
I am already running some Java Selenium tests remotely using Seleniums remote web driver, however Selenium cannot do everything I want which is why I need to execute a simple java program that will use the robot class to trigger a few keyboard events.
Is this possible?
(Essentially I want to run a java program on a client machine that executes some keyboard events on a server machine.)
Usual way to upload a file using Selenium is the following:
driver.findElement(By.id(<uploadId>)).sendKeys(<pathToTheFile>);
I hope it should be enough and you don't want to test browser specific popup dialog.
Related
I need to connect my Java Application to Virtual Machine. After connecting I need to send String saved in my code to bash script, execute it, and then get the output of the script (it comes out in csv file), and then I need to compare it to another csv file that's in the code. I know how to compare it, but I don't know how to connect to Virtual Machine.
I would be very happy if someone could help.
Basicly, I don't know how to connect to Virtual Machine with my Java App, any comment will help, should I use socket? If so, where to start?
Well, i tried to connect to VM with running proces but that didn't worked out. It's a corporate Vitrual Machine, that runs opperations for clients.
I am working on a JavaFX desktop application where the User is able to open the JavaFx desktop application more than once in a Windows machine. From Mac it cant be opened more than once.
The following code is used to launch the application:
Application.launch(ExampleApplication.class, (java.lang.String[])null);
Apart from JUnique library, is there any way to fix this issue ?
Any inputs will be helpful.
Application.launch() should only succeed once per a single application as per documentation. In addition it solely manages the current application and doesn't return until the application exits. If you want to be able to run the application more than once I'd recommend creating a standalone launcher for your application which runs a java process, which in turn runs your application. This way each time the launcher is executed a unique process is started and invokes the application.
I want to develop a program for ubuntu platform, That listens to DialUp modem and get Calls and send them to my php program that's running on my localhost.
for example when somebody calls my phone line, my listener program give the number and run this query:
http://127.0.0.1:80/listen.php?caller=ThePhoneNumber
How can I do that? is there any classes in java for that?
I think you'd need native tools for that. You can make pppd answer the call and run a custom script or program. But I have not fiddled with that for a long time. See linux modem howto. There should be plenty of information.
I developed a java desktop application where the user can manually load a file and press a button to start a simulation process. I want to automate the above two steps so that an external program can iteratively call this desktop application multiple times and run the simulation process without any human intervention every time. Any thoughts on how I can go about doing this?
It depends on which OS you do it.
If OS X, use automator, for Windows you can use winautomation and for Linux use google and search (for example) kde automation.
I know this is an old question. But there is a new solution now,
JAuto: a JVMTI agent that runs in Java VM and expose UI widget attributes such as class names, screen coordinates. You talk to JAuto by sending a command to a named pipe. It responds by writing a file. It lets you control a Java program via bash scripts.
Using an input simulator such as xdotool, you can achieve automation under the Linux X11 settings.
Disclaimer: I'm the author of JAuto.
I wanted to make a login program for remote desktop using windows terminal. I found tho that the amount of packets I have to recreate is ridiculous. Is there any pre-written code for just the login sequence?
I could not find an free-standing Java library for doing this kind of thing, but there are Java clients available. Take a look at the Java RDP client listed here and see if you can reuse some of their code.