Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

URL connection questions... Urgent!!!!

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a question.
How can I get the URL if I read it directly from the keyboard?
Hello all,
For example I run the following program:
javac myurl.java http://www.mysite.com/index.html
Can I do something like this? Or I have to hard code the URL inside the class?
//////////////////////// myurl.java///////////////
public class myurl {
public static void main(String[] args) throws Exception {
URL aURL = new URL(args);
}
}
Could someone help me with this ?
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by christopson:
I have a question.
How can I get the URL if I read it directly from the keyboard?
Hello all,
For example I run the following program:
javac myurl.java http://www.mysite.com/index.html
Can I do something like this? Or I have to hard code the URL inside the class?
//////////////////////// myurl.java///////////////
public class myurl {
public static void main(String[] args) throws Exception {
URL aURL = new URL(args);
}
}
Could someone help me with this ?


i didn't get why javac urlname
 
christopson
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Pradeepta Bhattacharya:
i didn't get why javac urlname


Hi Pradeepta,
I got it.
Thanks,
Chris.
 
Ranch Hand
Posts: 1874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
christopson , Welcome to javaranch.
PROPER NAMES ARE NOW REQUIRED
Please look carefully at official naming policy at javaranch & reregister yourself with proper first & last name. Please adhere to official naming policy & help maintain the decorum of the forum.
Waiting for your posts with proper first & last name. Once you have reregister , please let us know about that & then your previous account will be disabled.
Regards.

Your Friendly Bartender
Shailesh.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic