Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
එක පැකේජ් එකයි මාසෙටම Unlimited Internet. තාමත් DATA CARD දාන්න සල්ලි වියදම් කරනවද? අඩුම මිලට අපෙන්.
sayuru bandara
Updated:
Tuesday at 12:30 PM
Ad icon
ඉන්ටර්නෙට් එකෙන් හරියටම සල්ලි හොයන්න සහ Success වෙන්න කැමතිද? 🚀 (E-Money & Success Stories)
siri sumana
Updated:
Saturday at 11:44 PM
Gemini AI PRO 18 months Offer
Hawaka
Updated:
May 27, 2026
Ad icon
koko account
DasunEranga
Updated:
May 27, 2026
Ad icon
koko account
DasunEranga
Updated:
May 27, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
JAVA
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="akhilapraveen" data-source="post: 10746960" data-attributes="member: 104181"><p>Machan meka karanna widi hugak tiyanawa</p><p></p><p>1. you can add a URL reading method and get all links for a web page</p><p>then you can divide all pictures links and download them to your software.</p><p></p><p>2.or you can easliy use a web browser to show the locations you searched</p><p></p><p>for that you can use your default browser or a browser you developed.</p><p>I have developed some browsers i can give it to you,if you want BUT i realy recomnd to use the default browser coz its way faster than the browser you developed.</p><p></p><p>ok now heres the coding</p><p></p><p>first create a class called WEBBROWSER and enter the following coding</p><p></p><p></p><p></p><p>//--------------------------------------------------------------</p><p></p><p>import java.io.IOException;</p><p>import java.net.MalformedURLException;</p><p>import java.util.logging.Level;</p><p>import java.util.logging.Logger;</p><p>import javax.swing.JOptionPane; </p><p>import java.util.Arrays;</p><p></p><p> public class WEBBROWSER{ </p><p>static final String[] browsers = { "google-chrome", "firefox", "opera", "epiphany", "konqueror", "conkeror", "midori", "kazehakase", "mozilla" };</p><p> static final String errMsg = "Error attempting to launch web browser"; </p><p> </p><p>public static void openURL(String url) { </p><p> try { </p><p>//attempt to use Desktop library from JDK 1.6+ </p><p> Class<?> d = Class.forName("java.awt.Desktop"); </p><p>d.getDeclaredMethod("browse", new Class[] {java.net.URI.class}).invoke( d.getDeclaredMethod("getDesktop").invoke(null), new Object[] {java.net.URI.create(url)});</p><p> //above code mimicks: java.awt.Desktop.getDesktop().browse()</p><p> } </p><p>catch (Exception ignore) {</p><p> //library not available or failed </p><p> String osName = System.getProperty("os.name");</p><p> try {</p><p> if (osName.startsWith("Mac OS")) { Class.forName("com.apple.eio.FileManager").getDeclaredMethod( "openURL", new Class[] {String.class}).invoke(null, new Object[] {url});</p><p> }</p><p> else if (osName.startsWith("Windows")) Runtime.getRuntime().exec( "rundll32 url.dll,FileProtocolHandler " + url); </p><p>else { </p><p>//assume Unix or Linux </p><p> String browser = null; </p><p>for (String b : browsers) if (browser == null && Runtime.getRuntime().exec(new String[] {"which", b}).getInputStream().read() != -1) Runtime.getRuntime().exec(new String[] {browser = b, url});</p><p> if (browser == null) throw new Exception(Arrays.toString(browsers)); </p><p>}</p><p> } </p><p>catch (Exception e) { JOptionPane.showMessageDialog(null, errMsg + "\n" + e.toString()); } } } }</p><p></p><p>//-------------------------------------------------------------------</p><p></p><p>Now create a object of this class and call tha method as following.</p><p></p><p></p><p>String searchkeyword;</p><p>String searchkeyword2;</p><p></p><p>searchkeyword="ENTER THE PLACE YOU WANNA SEARCH HERE"</p><p></p><p></p><p>searchkeyword2=http://www.nationsonline.org/oneworld/map/google_map_+searchkeyword+.htm;</p><p></p><p><span style="color: Teal">YOU CAN USE ANY SITE THAT PROVIDES GOOGLE MAPS HERE</span></p><p></p><p></p><p>WEBBROWSER page1=new WEBBROWSER();</p><p>page1.openURL(searchkeyword2);</p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">HOPE THIS WILL HELP YOU</span></p></blockquote><p></p>
[QUOTE="akhilapraveen, post: 10746960, member: 104181"] Machan meka karanna widi hugak tiyanawa 1. you can add a URL reading method and get all links for a web page then you can divide all pictures links and download them to your software. 2.or you can easliy use a web browser to show the locations you searched for that you can use your default browser or a browser you developed. I have developed some browsers i can give it to you,if you want BUT i realy recomnd to use the default browser coz its way faster than the browser you developed. ok now heres the coding first create a class called WEBBROWSER and enter the following coding //-------------------------------------------------------------- import java.io.IOException; import java.net.MalformedURLException; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.JOptionPane; import java.util.Arrays; public class WEBBROWSER{ static final String[] browsers = { "google-chrome", "firefox", "opera", "epiphany", "konqueror", "conkeror", "midori", "kazehakase", "mozilla" }; static final String errMsg = "Error attempting to launch web browser"; public static void openURL(String url) { try { //attempt to use Desktop library from JDK 1.6+ Class<?> d = Class.forName("java.awt.Desktop"); d.getDeclaredMethod("browse", new Class[] {java.net.URI.class}).invoke( d.getDeclaredMethod("getDesktop").invoke(null), new Object[] {java.net.URI.create(url)}); //above code mimicks: java.awt.Desktop.getDesktop().browse() } catch (Exception ignore) { //library not available or failed String osName = System.getProperty("os.name"); try { if (osName.startsWith("Mac OS")) { Class.forName("com.apple.eio.FileManager").getDeclaredMethod( "openURL", new Class[] {String.class}).invoke(null, new Object[] {url}); } else if (osName.startsWith("Windows")) Runtime.getRuntime().exec( "rundll32 url.dll,FileProtocolHandler " + url); else { //assume Unix or Linux String browser = null; for (String b : browsers) if (browser == null && Runtime.getRuntime().exec(new String[] {"which", b}).getInputStream().read() != -1) Runtime.getRuntime().exec(new String[] {browser = b, url}); if (browser == null) throw new Exception(Arrays.toString(browsers)); } } catch (Exception e) { JOptionPane.showMessageDialog(null, errMsg + "\n" + e.toString()); } } } } //------------------------------------------------------------------- Now create a object of this class and call tha method as following. String searchkeyword; String searchkeyword2; searchkeyword="ENTER THE PLACE YOU WANNA SEARCH HERE" searchkeyword2=http://www.nationsonline.org/oneworld/map/google_map_+searchkeyword+.htm; [COLOR=Teal]YOU CAN USE ANY SITE THAT PROVIDES GOOGLE MAPS HERE[/COLOR] WEBBROWSER page1=new WEBBROWSER(); page1.openURL(searchkeyword2); [SIZE=5] HOPE THIS WILL HELP YOU[/SIZE] [/QUOTE]
Insert quotes…
Verification
Awruddata maasa keeyada?
Post reply
Top
Bottom