is there a way to get specs of a computer using Java just by giving the computer name.
cause i dont want to get only the specs of the pc that the app is currently running on.
Is it possible to get it remotely?
If the remove system is running Windows, and you have the appropriate privileges, you may be able to retrieve the information you want using a WMI library.
There's a comparison of Java WMI libraries http://www.vijaykandy.com/2009/09/windows-management-instrumentation-wmi-from-java/.
WMI is "Windows Management Instrumentation", and allows you to query remote Windows systems and perform certain management functions.
If you take this route, Scriptomatic is a great tool for browsing WMI classes.
No there is not. Even if "computer name" and "spec" were well defined terms, there is no widely supported protocol to interrogate a machine for such information and if there were, good security practices would demand disabling it.
Related
I'm on a student research team currently working on a Java project in which we want to be able to gather some info about specific external programs in CentOS 7. Some potential examples of data we might want to gather would be the URL from firefox, or the coordinates from Google Earth. Thus far, looking into how to implement this has mostly led me to using JNA and ptrace.
Is this a good route to take to tackle this problem? And if so, what can I use to find the location of specific information about the programs in memory?
JNA and ptrace are quite low level things. To run system applications you should use:
exec method of Runtime class
Apache Common Exec
Last one is more useful.
But it seems you don't need to run any application at all. To get information from Google Earth you can just use special web API - Google Maps APIs Web Services. If you want to send HTTP request you should try Apache Http Client. It's very powerful library and i'm pretty sure it's all for you need.
PS. More convenient client Java Client for Google Maps Services
PS1. I think java is the worst choice to work with OS and native applications. I see 2 ways to use it:
write agent on C/C++ which will be gather this information for java manager. It's a hard way
use hacks and tricks like here is there a way to get the url from current tab in google-chrome or here Possible to catch URLs in linux?. It's more easy but you will have restricted amount these hacks. And it will work not for all applications and cases.
I want to replace a legacy application running on Windows server by rewriting it in Java. This application is now connecting to a bunch of Windows servers (which are unavailable for installing another services and it is impossible to change them) via Windows Impersonation API.
I have come up with two libraries JNA and Waffle. To my understanding, Waffle uses JNA, and JNA provides calls to Windows API from java code.
The thing is, I will have my java application running on a redhat server which obviously does not have win32 api. Is there a *nix binding for Impersonation API? At least I may consider writing JNI over that binding.
I think there should be a way, because Mono and Wine provide similar abstractions on different platforms.
Have you checking on Mono or Wine to see it is supports impersonation? I don't believe it supports.
I think remote impersonation is encapsulated a lot of technologies, and some of it maybe undocumented. It might be very hard task to writing the client application to support server impersonation without using Windows API. The best way should be continue running on Windows. But if you really want to move the system to run on *nix, the best way should be create a proxy between *nix and Windows. Then later you can completely running on *nix when you don't need the services that running on Windows.
I want to run .vmx file using java program.Basically I want to start my virtual machine on vmware workstation using java code..
Have you considered http://labs.vmware.com/flings/vix-java-toolkit
It claims
The VIX Java Toolkit allows Java developers to take advantage of the
VMware VIX API. This is a powerful API that allows for performing
in-guest operations on VMs running with vSphere, Workstation, Server,
and Player. Java developers who are writing code with the vSphere/VI
APIs will find this particularly useful as the vSphere API does not
currently provide any functionality for interacting with the guest
operating system. In addition, this is helpful for software testing as
well as systems administration.
We are planning to develop remote desktop sharing feature in out web application (written in Java) where one user will be able to connect other users desktop with full access.
I don't want to use applications like team-viewer. It has to be some kind of web browser plug-in or feature.
I found following couple of solutions like Adobe Connect & Java.awt.Robot class.
Can anyone please let me know best option available?
It will be great if there is any open source project which can satisfy these requirements.
Try RealVNC out of the box, it has a built in Java web-client that allows full control. Most of the standard flavors of Linux run it, this, of course, totally depends on your user base and what you're trying to do but for an internal tool it is perfect.
http://www.realvnc.com/products/free/4.1/man/vncserver.html
The above link is the documentation for VNC server. It can be configured to one-session per port, it is just a matter of making sure the ports are correct. It sounds like you're reinventing the wheel on this one. There's a horde of good free products out there to handle this. For an infinite user-base this probably wouldn't be the best solution. For an internal tool it works wonders.
I want to create a "virtual" file that, when accessed, will be d/l (by my background application). This should work if the file is accessed by windows explorer, or by other application (e.g Microsoft Word...)
What is the best way to implement it?
EDIT:
Can this be implemented by Shell Extensions?
It sounds as if you're about to write a virtual file system driver. That's a pretty hard task in pure C, limited debugging support and many reboots.
If I'm not mistaken, the task is so hard that there are several commercial offerings that provide tools and libraries that considerably simplify the implementation.
Update:
A starting point is Microsoft's Installable File System Kit, which is a part of the Windows Driver Kit.
What you're describing sounds a lot like WebDAV. There are already servers that support this protocol (including Apache), and Windows appears to support it either natively or via an add-in feature.
You can also choose to implement an CIFS/NFS server instead. I don't know about the current state of Alfresco's JLAN, but they did open source (some of?) the code. Perhaps ask for an update here: Open Java SMB server implementation