CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: Quick Question

  1. #1
    Join Date
    Nov 2009
    Posts
    3

    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.

  2. #2
    Join Date
    Nov 2009
    Posts
    3

    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.

  3. #3
    Join Date
    Apr 2007
    Posts
    425

    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!

  4. #4
    Join Date
    Nov 2009
    Posts
    3

    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.

  5. #5
    dlorde is offline Elite Member Power Poster
    Join Date
    Aug 1999
    Location
    UK
    Posts
    10,163

    Re: Quick Question

    Quote Originally Posted by willie199120 View Post
    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.

  6. #6
    Join Date
    Apr 2007
    Posts
    425

    Re: Quick Question

    Quote Originally Posted by willie199120 View Post
    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
  •  





Click Here to Expand Forum to Full Width

Featured