• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Loading a HTMl file on runtime

 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mates,

I was trying to load a html page via my java code. It is a eclipse project. When i run from IDE it works fine.
But when i export it as a jar it doesnt work. Please tell how this can be resolved

I tried to open the html page using this.
java.awt.Desktop.getDesktop().browse(new URI("images/NetWorking.html"));

The needed files are placed under this D:\WORKSPACE\myIPFinder\images


Regards
Abhi
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The default directory is sure to be different when running a standalone app compared to running it inside of an IDE, so use an absolute path instead of a relative path.
 
reply
    Bookmark Topic Watch Topic
  • New Topic