| | |
how to close the application using java
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
You can't. You aren't opening it with Java either. You are simply telling the browser what is being sent (the content type) and letting the browser decide how to display it. In this regard, Java has nothing to do with it.
Assuming that this question is related to
http://www.daniweb.com/forums/thread100436.html
Assuming that this question is related to
http://www.daniweb.com/forums/thread100436.html
Last edited by masijade; Dec 10th, 2007 at 4:02 am. Reason: typos
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
But, you are not opening the application with Java. That is exactly what I said in the last post. You are simply setting a content-type type (and filename with extension since windows is stupid enough to need this info) and then passing the file through byte for byte. How the file gets displayed on the client is determined by the browser.
I tell you what, change your file settings remove the ".xls" association. Then access an excel sheet using your JSP and tell us what happens. The browser displays a bunch of BS in the browser, rather than using excel to display the sheet, doesn't it?
Like I said, you are not opening excel on the client in your Java code, you are simply letting the browser know what it is you are sending, and the browser is deciding how to open it.
It's not that hard to understand.
I tell you what, change your file settings remove the ".xls" association. Then access an excel sheet using your JSP and tell us what happens. The browser displays a bunch of BS in the browser, rather than using excel to display the sheet, doesn't it?
Like I said, you are not opening excel on the client in your Java code, you are simply letting the browser know what it is you are sending, and the browser is deciding how to open it.
It's not that hard to understand.
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
•
•
Join Date: Jul 2008
Posts: 1
Reputation:
Solved Threads: 0
heyy, but do u know how to close internet explorer using java program, which i opened using the syntax:
Please let me know guys.. I want to know..
Sirius
Java Syntax (Toggle Plain Text)
Runtime.getRuntime().exec(browserCommand+" "+Url_name);
Please let me know guys.. I want to know..
Sirius
Java Syntax (Toggle Plain Text)
Process p = Runtime.getRuntime().exec(browserCommand+" "+Url_name); p.destroy();
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
![]() |
Similar Threads
- java application that will print to patterns (Java)
- how to open an application like word,excel,adobe indesign,xml using java (Java)
- Java Problem with running program (Java)
- WMP Internal application error ha occured (Windows NT / 2000 / XP)
- Application Data Folder... (Viruses, Spyware and other Nasties)
- Generic Host Process for WIN32 services has encountered a problem and needs to close. (Viruses, Spyware and other Nasties)
- If your Firebird application doesn't work... (Database Design)
- Keeping a Java App. Open but Closing One of the Windows (Java)
- Re: Hijack log-WMP Internal application error ha occured (Viruses, Spyware and other Nasties)
- Help needed In creating application to make business cards (Java)
Other Threads in the Java Forum
- Previous Thread: Servlet Package doses not exist...
- Next Thread: Removing and Adding items to JPanel
| Thread Tools | Search this Thread |
-xlint android api applet application array arrays automation bi binary blackberry block bluetooth chat class classes client code compile compiler component database developmenthelp draw eclipse error event exception fractal freeze game gameprogramming givemetehcodez graphics gui html ide image input integer j2me j2seprojects java javac javaprojects jetbrains jni jpanel jtable julia learningresources lego linux list login loop loops mac map method methods mobile netbeans newbie notdisplaying number online oracle page print problem program programming project qt recursion scanner screen server set singleton size sms sort sql string swing system template textfields threads time title tree tutorial-sample update variablebinding windows working xor






