-
November 9th, 2009, 08:11 PM
#1
Quick Question
Just had a quick question for you all... I am currently in a project at school in which i need to
import 4 packages:
import java.util.*;
import java.io.*;
import javax.mail.*;
import javax.mail.internet.*;
I wanted to import these packages from the internet though. I will be making my own site, and redirecting the imports to read: import http://www.site.com/java.util.*; etc.
Will this be possible?
Where do i download these packages seperately so i can host them on my website.
-
November 9th, 2009, 08:13 PM
#2
Re: Quick Question
No edit button??
Basically i want to make a program that will email me and that gets its imports from the internet.
-
November 9th, 2009, 09:02 PM
#3
Re: Quick Question
bad idea is a bad idea. What you can do is *theoretically* possible. You can compile classes at runtime and invoke them, but ... why?
------
If you are satisfied with the responses, add to the user's rep!
-
November 9th, 2009, 09:29 PM
#4
Re: Quick Question
why? Lets say i have a program that compiles java. I do not want the user to have to download the class file, or i would like to implement a modded class file to better fit the dimensions of my program specifications.
This is what i'm looking at right now. i am running a modded java compiler that many other people use. For my code though i would like to implement a class file that i do not wan to be physically on the HD and using up valuable space.
-
November 10th, 2009, 05:04 AM
#5
Re: Quick Question
Originally Posted by willie199120
For my code though i would like to implement a class file that i do not wan to be physically on the HD and using up valuable space.
Are you sure you mean HD? I was guessing this is some sort of mobile device with limited memory, but surely any HD will be able to store the required class files without any significant space implications? How small is this HD?
There is nothing so useless as doing efficiently that which should not be done at all...
P. Drucker
Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.
-
November 10th, 2009, 11:48 AM
#6
Re: Quick Question
Originally Posted by willie199120
why? Lets say i have a program that compiles java. I do not want the user to have to download the class file, or i would like to implement a modded class file to better fit the dimensions of my program specifications.
This is what i'm looking at right now. i am running a modded java compiler that many other people use. For my code though i would like to implement a class file that i do not wan to be physically on the HD and using up valuable space.
This still doesn't make sense to me. Your final executable bytecode will have to have this class, so what you are saving is very minimal. maybe it was the example, but importing java.util.Something versus java.util.* will save you a lot more than by trying to reference an externally located class.
Point is, at compile time the class must be readily available. You can use a network class loader for this I suppose. http://java.sun.com/developer/techni.../classloaders/
but it still seems a very strange constraint.
------
If you are satisfied with the responses, add to the user's rep!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|