This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem while opening a CSV file using Internet Explorer  RSS feed

 
Rasath Umar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have code like this to open a PDF and text file in Internet explorer. Its working fine. Now I have to open a CSV file which is not works well with IE but works fine with Firefox.

String OpenFile = "rundll32 url.dll,FileProtocolHandler " + FileURL

Firefox is opening the file as an attachement for PDF or CSV file. But IE didn't.

In servlet we can use like this and you can place the code to open a new window.
response.setContentType="text/Comma Separated Values"

Is there any way to write an equal code like this in AWT/Swing?
 
Rob Camick
Ranch Hand
Posts: 2787
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Starting in JDK6 you can use the Desktop class.
 
Rasath Umar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Rob. But I need to use exactly JDK 1.5.0
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!