-2

I want to open an html file in java from a specific directory. I cannot use Desktop.open() because it is not the default browser, so how else can I do this? Thanks.

1

1 Answer 1

0

You can create a script file say open.bat or open.sh.In your executable file,write the code for opening of HTML file using the preferred browser.

Then use Runtime.getRuntime().exec("open.bat");

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.