R
rfractal30
Hi
I've got a question about transferring a program I created to another
computer. Am I right in thinking that I will have to include in my 'Jar
file' every custom made package which contains classes which I have
used within my application - even if I have used only a very few
classes from that package?
Or is it the case that when a java source file has imports of classes
from a package - then at compilation time those imported files become
merged with that class; and therefore that class becomes self contained
and would not need to 'carry' the other classes with it, when it is
transferred onto another computer system?
This is how I see it:
---
import myroot.myclasses.ClassY;
import myroot.myclasses.ClassZ;
public class ClassMain {}
---
So - when I compile ClassMain - am I right in thinking that ClassY and
ClassZ have been merged with ClassMain (assuming that they have
definitely been used within ClassMain). If this is the case, I should
be able simply transfer ClassMain onto another computer - without
needing to include package 'myroot' when I put it into a Jar file.
Thanks for any help - Michael
I've got a question about transferring a program I created to another
computer. Am I right in thinking that I will have to include in my 'Jar
file' every custom made package which contains classes which I have
used within my application - even if I have used only a very few
classes from that package?
Or is it the case that when a java source file has imports of classes
from a package - then at compilation time those imported files become
merged with that class; and therefore that class becomes self contained
and would not need to 'carry' the other classes with it, when it is
transferred onto another computer system?
This is how I see it:
---
import myroot.myclasses.ClassY;
import myroot.myclasses.ClassZ;
public class ClassMain {}
---
So - when I compile ClassMain - am I right in thinking that ClassY and
ClassZ have been merged with ClassMain (assuming that they have
definitely been used within ClassMain). If this is the case, I should
be able simply transfer ClassMain onto another computer - without
needing to include package 'myroot' when I put it into a Jar file.
Thanks for any help - Michael