0

I have written an Java code that process some data and stores it in .JSON format.

I also have HTML/CSS/Javascript file, that reads that data, and shows it in much nicer way.

So my question is, is it possible to combine Java and HTML code(in one file .jar) so that, for example on a click of a mouse Java opens HTML file in Default browser?

Thanks

depecheSoul
  • 896
  • 1
  • 12
  • 29

1 Answers1

1

Write out the html file to the filesystem (e.g. a temporary directory How to create a temporary directory/folder in Java?) and then open it using the default program: How to open a file with the default associated program

Community
  • 1
  • 1
Adrian Leonhard
  • 7,040
  • 2
  • 24
  • 38