Executing URI commands in Java -


In a way, steam allows users to launch games and perform many other actions, for example (from), URI Using protocol:

Vapor: // run / & lt; Id & gt; will match the specified ID.

Steam: // Validate / & lt; Id & gt; will validate the game files of the specified ID.

How do I get Java to run them? I do not even know what you call it, either you run 'URI, or do' execute 'them, or what? Because there is nothing for the return of these URIs and there is no relation to the 'execution' in the URI class in Java, although URL does, but it does not work !

I have tried to:

  ... try {URI testURI = URI.create ("steam: // run / 240"); URL testURL = joinURI.toURL (); // URL testURL = New URL ("steam: // run / 240") does not work either. Virtual connection (); // does not work // joinURL.openstream () does not work either} hold (malformedlexception e) {system.err.println (e.getMessage ()); } ...   

returns each combination error: Unknown Protocol: Vapor .

A system that uses Steam to handle URIs is definitely working, for example, I can type the above url in Firefox and it works.

My eternal gratitude to the person who answered!

Thanks

Try, it will start the "default action" steam: // URI, e.g.

  URI Yuri = new URI ("steam: // store / 240"); If (Desktop.isDesktopSupported ()) {Desktop.getDesktop (). Browse (Yuri); }    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

memcached - Django cache performance -

java : convert string value to int -