Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

please clarify some doubts

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all
1>i have seen in so many application the import
statements like import com.sun.mail.util or objects created
like new sun.misc.BASE64Encoder(),i wanted to know wheather the package is imported from the local machine(jdk) or from the internet.
2> can any body tell how to download the
content of a file which resides in a LAN(any machine in the
network other than local machine).
3>can anybody tell me what is an ASCII file
with real time example.
4> what is the meaning of CLASSPATH
help please
dinesh jayaraj
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. when u say import com.ibm.*.*
your classes are imported from your local machine.. (the parent directory to the directory specified i.e., com must be in your classpath)
2. classpath is a environment variable which the Java compiler uses to find and include classes.
3. ASCII file is a normal text file, wherein each character is represented in ASCII format.
 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all
1>i have seen in so many application the import
statements like import com.sun.mail.util or objects created
like new sun.misc.BASE64Encoder(),i wanted to know wheather the package is imported from the local machine(jdk) or from the internet.
First response is 100% correct, although the actual class file can come from various sources, it's usually file system based.
2> can any body tell how to download the
content of a file which resides in a LAN(any machine in the
network other than local machine).
Java provides rudimentary socket connections getting streams via FTP. You could also use HTTP responses. As for Microsoft shares, Netware shares, NFS, etc...if the JVM can't refer to the file via a local filesystem, then it's not visible. There are no direct connect classes for these services within the JDK, although third part class libraries exist.
Your question is a bit vague to have a solid answer
3>can anybody tell me what is an ASCII file
with real time example.
The previous response answered this adequately, but I don't know what you mean by "real time" example. Real time rarely describes a file, but may describe a file's read/write operations, although the file system and operating system must support this.
4> what is the meaning of CLASSPATH
To expand the previous post's answer, CLASSPATH is more than an environment variable. The classloader built in to the JVM is used to find classes needed by other classes the JVM loads. Think of it as a giant graph that the JVM traverses to find neccesary classes. *THE* CLASSPATH refers to the JVM's classpath. It is possible to write your own class loader thus adding another list of (lower case 'c') classpaths. In addition, RMI has the concept of network based class loading.
I think this should satisfy your curiosity. Feel free to ask more questions!
Jesse
 
    Bookmark Topic Watch Topic
  • New Topic