Is it possible to run dos-command's in java?
I have a small security problem. I have a dos-based java prog. with login at the start og the program, but I have problems hiding the password. I have managed to hide the password when it is typed, but when you press enter and get to the next menu, it is only to press the up-key, and dos recover the last typed sentence. (The password...) I have been able to fine the dos-command "doskey /reinstall", which will clear the memory, but I haven't been able to implemet this in my java-prog.
Any tips/trics are appreciated.
I have a small security problem. I have a dos-based
java prog. with login at the start og the program, but
I have problems hiding the password. I have managed to
hide the password when it is typed, but when you press
enter and get to the next menu, it is only to press
the up-key, and dos recover the last typed sentence.
(The password...) I have been able to fine the
dos-command "doskey /reinstall", which will clear the
memory, but I haven't been able to implemet this in my
java-prog.
I doubt that calling that in your program would help.
doskey is specific to the process. Running it by any means in java means that a new process will exist. You can verify this by open two console windows and running doskey in both. Nothing that you do in one will be reflected in the other.
I don't think your problem is a program problem. That means that it should not be solved by software but rather by management. For example you certainly wouldn't expect your program to make sure that someone wasn't standing behind the user when they typed their password right? And what if someone installs a key grabber on the computer? In that case any program, yours included, would have all the key presses logged to a file.
Alternatively if you might be able to solve it with one of the following...
- Recode the application to use a GUI. If there is no console the doskey isn't going to get anything.
- Write some JNI that bypasses the java input handling. If you handle the input directly then you can turn off echo
- Inspect the java source code for the VM. There might be a hidden method to turn echo off. Alternatively you can find the code responsible for this, modify them, and use them with the bootclass option to replace the ones in the VM. This solution is not distributable. And it might not be possible solely using java.
Similar Messages
-
Hi all
Is it possible to run a command prompt(or DOS Command) through flash.If it possible please guide me to do that throug AS 3.0.
and
Is it Possible to run a activex (.OCX) file from flash. If it is so please guide me the way to do it
Thanks and Advance
Sankar.M.SOr create a desktop shortcut (in Windows) or an application launcher ( in Linux GUI).
-
Hi all
Is it possible to run a command prompt(or DOS Command) through flash.If it possible please guide me to do that throug as 2.0. and is it possible to run a Activex File(.OCX) through flash.
Thanks and Regards
Sankar.M.SOr create a desktop shortcut (in Windows) or an application launcher ( in Linux GUI).
-
Is there a way to run dos commands on onther system?
Hi I have connected to a port of another system where windows is the operating system. So can I run dos commands on the other system through that network connection from my computer?
I'm not sure what you mean by "connected to a port of another system" . Which port using what software to which server?
-
How to run DOS command in Java environment?
Can i run DOS command in Java environment?
I did like this:
Runtime r = Runtime.getRuntime();
r.exec("cmd.exe");
r.exec("set classpath=%CLASSPATH%;.\\tmp")
but failed.
However if I run the java command, it runs successfully.
r.exec("javac Test.java");
r.exec("java Test");
how should I do so that i can run the DOS commands metioned above in Java Environment?
thanks a lot.Have a look at http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
This may help. I wonder if this is ok ?
Runtime r= Runtime.getRuntime();
r.exec("cmd.exe /C set classpath=%CLASSPATH%;.\\tmp\""); -
Hi ,
I would appreciate if anyone could tell me how to run DOS command such as "del" using JAVA language .Thank you.<steps onto soapbox>
Surely for something like 'del' we should be advocating a non-OS specific method so we don't lose sight of Java's cross platform abilities.
If it has to run an OS specific thing fine, but please look for a non OS specific solution first.
<steps off soapbox> -
Is it possible to run host command in sap environment
hi
could any body tel me
is it possible to run host command in sap environment
then how..?yeah , by using FM
EXECUTE_FUNCTION
Regards
Prabhu -
Is it possible to run a command when a monitor goes to a healthy state?
Hi, I'm using SCOM 2007R2
Is it possible to run a command/script when a web application Monitor changes to a healthy state?
I have a web application monitor that checks four different websites from our proxy servers. on the aggregate rollup of all four sites I have a health rollup policy of 'Best state' meaning
that the monitor will only go critical if all four sites are unreachable. If that happens I have a Diagnostic task that runs to Stop the w3svc service.
This stops the proxy server serving ‘Page cannot be displayed’ content to the users within the company.
What I would like to do is start IIS automatically when the web application monitor goes to a healthy state.
I’m guessing I’m going to need a script that perhaps pings the sites every few minutes then starts the w3svc service if it gets a result.Hi,
I recommend you touch the Orchestrator, Orchestrator can integrate
SCOM.
Use Orchestrator to design a Runbook for your task. When the state of a web application Monitor changes to healthy, then run a command/script.
System Center 2012 Orchestrator.
Orchestrator is a workflow management solution for the data center. Orchestrator lets you automate the creation, monitoring, and deployment of resources in your environment.
For more information, please review the link below:
System Center Integration Pack for System Center Operations Manager 2007 R2
http://technet.microsoft.com/en-us/library/hh531770.aspx
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
Is it possible to run host command from SAP environment? How do you run?
Hi
Is it possible to run host command from SAP environment? How do you run?
Thank YouHello Subhash
You will more details in the following thread:
Re: How to define command for SXPG_COMMAND_EXECUTE
Regards
Uwe -
Possible to run host command ???
Hi experts,
Is it possible to run host command from SAP environment? How do you run?
Thanks,
Logucheck whether this helps
DATA:os TYPE sxpgcolist-opsystem.
DATA:host TYPE rfcdisplay-rfchost.
DATA:commandname TYPE sxpgcolist-name.
DATA:exec_protocol LIKE STANDARD TABLE OF btcxpm.
os = sy-opsys.
host = sy-host.
commandname = 'ZDOWNLOAD'. "SAP Command Name
CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
EXPORTING
commandname = commandname
operatingsystem = os
targetsystem = host
stdout = 'X'
stderr = 'X'
terminationwait = 'X'
TABLES
exec_protocol = exec_protocol[].
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
Running a DOS Command through a JAVA GUI
I'm trying to run a command line through a GUI.. how would i go about doing this... suppose i wanted to run the following dos command inside a java program:
String command = "jar cvf classes.jar open.java close.java"
Does anyone have a good model I can look at that can implement a dos command?Maybe you can refer to this resource , I can not remember the Class, It seems like this Runtime.getRuntime().exec() ?? It can execute your command.
-
Running ssh command in a java application
Hi there!
I am trying to run a ssh command from a java application cause I need to store the result.
Actually I can run this command in the cygwin shell so I need to open the shell and run the command, all trough java.
so, what my process needs to do is:
1) open the cmd
2) run C:\cygwin\cygwin.bat
3) execute the ssh command
ssh -l fip-user ipdb fip 42704) print the result of the ssh command.
Note that the cygwin opens in the same command line window and so will print it's result to the same process inputstream
Message was edited by:
RBerviniUse "Runtime.getRuntime().exec()" to execute the SSH program,
and you can then get the output of the SSH program
via the getInputStream() method on the returned Process object.
Note: there are many pitfalls with this. In particular, most people don't know
they should create separate threads to drain the input/output pipes.
See this excellent classic article http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
on how to do it right. -
Is it possible to run a website built in Java and applet from Safari browser in iPad
Is it possible to run a website built in Java and applet from Safari browser in iPad?
Java isn't supported on the iPad
-
How to execute Dos Command 'Pause' from Java ?
How to execute Dos Command 'Pause' from Java ?
I have read the article in javaworld for Runtime.exec() anomalies.
Can someone please give an insight on this?Thanks Buddy!
That was very useful. Even though its a simple
solution, I never thought about that.Bullshit! Reread reply #7 of http://forum.java.sun.com/thread.jspa?threadID=780193 -
Can we execute DOS Commands from a Java Application
I just want to know whether we can execute DOS Commands from a Java Application.
Thanks.hi,
try this:
Runtime.getRuntime().exec("cmd /c start abc.bat");
andi
Maybe you are looking for
-
Keyboard & Trackpad don't work
The keyboard and trackpad do not work on my 13" Macbook. I've attached a usb keyboard and mouse to get functionality. So far I've repaired permissions, reset pram and smc all with no effect on the keyboard and trackpad. Any ideas?
-
Open File in Acrobat or Reader
I have Acrobat 8 and Reader X installed on my PC (Vista Business). After installing updates for both programs over the past few months I have lost the default toolbar on documents I download from the web and need to use F8 to get a toolbar. In additi
-
My IPod turning on automatically
My iPod Turning on automatically during night. Could anybody help? Thanks.
-
I'm not trying to create a new account, just access my current one on my new computer as well as listen to some "locked" music that I downloaded previously and requires my password.
-
Hi: Running 9.2 on 64bit Itanium In SQLPlus, I'm getting..... SQL> select count(*) from imp_insts; select count(*) from imp_insts ERROR at line 1: ORA-01115: IO error reading block from file 2 (block # 273118) ORA-01110: data file 2: '/odb0/oracle/or