How to execute or call other application
I have doubt in executing or calling any exe file using java application.
For example: i have a button. If i click on that button, then any application (eg. any exe file, any program file, etc) will execute and come out in the different frame. Now, i don't know how to make the coding.
I need the helps. Please give me any code or ideas.
Thanks very much
Sorry. if you are writing a sample program just to get a feel of Java, then the following is sufficient. Note that I have added "throws Exception" after the "main" method signature.
import javax.swing.JOptionPane; // import class JOptionPane
public class Welcome4 {
// main method begins execution of Java application
public static void main( String args[] ) throws Exception
JOptionPane.showMessageDialog(
null, "Welcome\nto\nJava\nProgramming!" );
String command = "d:\\test\\test.bat";
Process p = Runtime.getRuntime().exec(command);
p.waitFor();
System.out.println("done");
System.exit( 0 ); // terminate application
} // end method main
} // end class Welcome4
Similar Messages
-
How can I communicate with other applications from my Java application?
Hello,
I need help about how can i communicate with other application(say textpad.exe/wordpad.exe/MS word.exe) from my Java program.
More precisely, I need to know how i can get the current position of the cursor whether it is in any .txt/.doc files, then I may write some text in my java application and click a button and then my program will append the line(string) in that position of the file which is running under another appliction(Notepade.exe/MSword.exe).
Please provide me some help.I may be wrong (and anyone, please correct me if so), but Java may not be the best tool for something such as this. I envision that you'd have to make some OS calls such as calls to the user32.dll, and while this can be done through the JNI, you'd still have to have a C or C++ program doing the dirty work.
-
How to execute a simple JSP application in Oracle 9iAs WE?
Hi,
How to execute a simple JSP application in Oracle 9iAs WE?
Thanks
AnupamaPlease "Preview" your future posts. Your formatting is awful. Especially learn to use the [ code ] tags.
Are you sure DateTime.Now.ToString() returns a string in the format of 'MM/DD/YYYY HH:MI:SS.FF3'?
Fix that and if you still having the problems, debug the actual result of your string.Format() and post that. -
How to bring windows of other application to top
Hi,
Does anyone knows how to give the focus to other application's window using Java?
Thanks,
yinmosYou can do it using JNI. Also, to do it you need to know window handle of the other application.
JNIWrapper for windows may help you with JNI and other platworm related functionality.
Check the http://www.jniwrapper.com
Hope it helps,
EToporov -
Calling other application via forms
Hi
Can we call java applications via oracle forms 6i.
Thanks in advanceHave you looked at this white paper?
http://www.oracle.com/technology/products/forms/pdf/269054.pdf
Maybe it can help -
How to get links from other applications to open a new Firefox window
I have non-Web browser applications that want to open browser windows. I have Firefox as my default Web browser. When these other applications pass a URL to Windows, Windows passes the URL to Firefox. Unless there are no Firefox windows running, Firefox then opens the URL in a new tab of the most recently used Firefox window. I would prefer that Firefox open a completely new window. Where can I find the setting for this behavior?
Thank you,
DanStart Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
*Don't make any changes on the Safe mode start window.
*https://support.mozilla.com/kb/Safe+Mode
See also:
*https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes
*http://kb.mozillazine.org/Preferences_not_saved -
How to execute a statement in application process on new authentication
Hi all,
How can i execute a statement such as
set role TABLE_NAME identified by sunil;
in my application process?
I have tried exec('set role TABLE_NAME identified by sunil');, but wasn't successful. Does anybody knows the problem in my syntax?
Thanks,
Sunil Bhatia
Edited by: Sunil Bhatia on Jun 25, 2009 12:33 PMCan you proceed me to this direction?No, it's still the wrong one.
DB roles are not used in APEX due to fundamentals of APEX and Oracle architecture: this is clear when it is understood Re: Priveleges to create procedures/functions in schemas (points 3 & 4 being most relevant to this issue – and read "APEX" for "HTML DB")
(If anyone knows of a more "official"/complete description of what goes on under the covers than the referenced Forum post it would be helpful to know about it.) -
How to execute SQL Instruction from Application Module
Hi people
I´d like to know how I can execute a SQL Instruction like "delete from user" from the Application Module ..prepareSession method...
I´m Using Jdev 10 with ADF Faces
thank youHello,
Code example:
@Override
protected void prepareSession ( Session session ) {
super.prepareSession( session );
setDebugOff();
private static final String DEBUGOFF = "begin IVA_UI_ALGEMEEN_PCK.SET_DEBUG_OFF; end;";
public boolean setDebugOff () {
boolean success = false;
PreparedStatement debugOffSP = null;
try {
debugOffSP = getDBTransaction().createPreparedStatement( DEBUGOFF, 0 );
success = debugOffSP.execute();
} catch ( Exception e ) {
success = false;
} finally {
if ( debugOffSP != null ) {
try {
debugOffSP.close();
} catch ( Exception e ) {
log.warning( e.getMessage() );
return success;
}-Anton -
How to get feeds from other application
hi,
i m trying to devlope an web application in which some input will come from some other site and it will effect my page dynamically.
but d main thing is i dont know how to do it .
pls tell me how to do it
thanxbut d main thing is i dont know how to do it .
pls tell me how to do itPlease make the extra effort to write out words such as "please" and "the". The extra keystrokes won't cost much in the way of time, and the enhanced clarity will be appreciated by those communicating on a forum with international readership. Also, it will give the appearance that you take your question seriously, which will in turn make your question look more interesting to answer.
So, to answer your question, first things first: Learn how, then do it*. If you've tried something and are running into a snag, we'll be happy to help, but this forum is not conducive to providing an entry-level Java EE tutorial.
~
* Look into having a servlet handle the request, delegate to a service to make the appropriate connection and obtain the content, populate the required model, and forward the model to the view. -
Setting of service permission to call other application
I am trying to access from my portal application A another portal application B. To access
app B as standalone, it is generally a user authentication necessary. Now I am calling B as
IView from a JSP file in A and want to display it in the content area.
To enable every user access B I assigned anonymous user, read permission
and end user permission on app B
and other services which are referenced by B. However it still does'nt work and after hitting of submit
button calling app B in A, user gets portal logon page to login
before he accesses!
Which configuration might be still required?
ThanksI try to adapte the question, hope it is now more clear.
I will access an application which is running under folowing URL in the portal:
http://my-server:50100/irj/servlet/prt/portal/prtmode/preview/prtroot/pcd!3aportal_content!2fother_vendors!2fevery_user!2fcom.root!2fCompanies!2fEP_Theme!2flayout!2fcom.tmt.ses.ZE_MyApplication
When a user puts this URL he gets the portal logon to authenticate.
But I will that the application is accessible for every user without any authentication.
I did following configuration:
- the security zone in portalapp.xml is defined as u2018no_safetyu2019
- there is no AuthScheme in the portalapp.xml defined
- the u2018anonymousu2019 and u2018Evryoneu2019 user are assigned read prmission for this application
I hope, the issue is now more clear and you guys can help.
Thanks -
How to execute multiple methods of application module from managed bean using operation binding
im using jdev 11.1.2.3
gettiing error..........in my page as below
java.lang.NullPointerException
ADF_FACES-60097:For more information, please see the server's error log for an entry beginning with: ADF_FACES-60096:Server Exception during PPR, #1
and weblogic log as below
RegistrationConfigurator> <handleError> ADF_FACES-60096:Server Exception during PPR, #1
javax.servlet.ServletException
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:521)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused by: java.lang.NullPointerException
at view.com.pof.admin.users.POFAdminUser.createPasswordHistory(POFAdminUser.java:64)
at view.com.pof.admin.users.POFAdminUser.performOperationBinding(POFAdminUser.java:49)
at view.com.pof.admin.users.POFAdminUser.saveData(POFAdminUser.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(Unknown Source)
at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1545)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:159)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1137)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:361)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:202)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)
... 38 moreUser, I fail to understand what your header (of the question) has to do with the stack trace. You get a npe in your code
view.com.pof.admin.users.POFAdminUser.createPasswordHistory(...)
This is the point where I would start my investigation.
Timo -
How to execute ODI scenario from a web application
Hi
I need to execute ODI scenario from ApEx form.
how to execute ODI scenario from application. Using 10.1.3.5.5
-appIn the SQL property of the TQuery object, enter the call as an anonymous block:
begin
pkg_name.procedure_name(true);
end; -
How to execute any cmd command from java application?
Hi all,
How to execute or call any command of cmd from java application??
Is there any method to do so??
Or, is it possible to do it using Runtime.exec() ??? And if so, how to use it, please explain with ab example...
I'll highly appreciate....
Thank you.If google would be the best option, then I would not be on Sun's forums and I would not have asked experts like you, sir !! :-)
Neway, I got the solution from PhHein !!
Good link indeed..
Cheers.. -
Executing any other applications from a java application
how can i execute or invoke other applications on the pc
from a java application?Runtime.getRuntime().exec("dir");
-
How add a link of other page web
Good Night,
How can add a link in the ESS in the area of travel that can call other application WEB external?
Kind Regards.FOr Adding services check following link
ESS / MSS Configuration (SAP Best Practicesfor SAP HCM V2.600) (N06)
http://help.sap.com/bp_hcmv1600/BBLibrary/Documentation/N06_BB_ConfigGuide_EN_US.doc
Maybe you are looking for
-
Specific details; p/n: GS066PA#ABG, 4 GBytes DDR2 RAM, OS Windows 7 (6.1) Ultimate Edition 64-bit Service Pack 1 (Build 7601) DirectX 11.0. LED's were working but during one of the windows automatic updates they stopped working. I don't know which
-
PO creation from EXCEL uploaded by a Gateway Service in UI5
Hi, The business requirement is to create Purchase Order from Excel File, uploaded from the UI5 application and call Gateway Service to create PO in SAP ECC. I am trying to achieve this with CREATE_STREAM method of DPC. However, my concern here is th
-
Hi all if I have 4 routers all on 172.16.1.0, 172.16.2.0, 172.16.3.0, 172.16.4.0, If I use rip on each one, will it advertise 172.16.0.0 as its classful, and would this cause probs with routing ?
-
Installing Camera Raw Upgrade on Trial PS cs4
I am trying out the trial version of PS CS4 and wish to try the Camera Raw plug-in, but when I go to work on a RAW file (NEF as NIKON calls them) I get a message that the file could not be opened because it is not the right kind of document. I a usi
-
We just got married. How can we merge accounts/libraries?
We just got married, and each have a LARGE library of m4p's. How can we merge accounts/libraries into one family account?