My apologies as I'm very much a "Java noob." Anyways, I think I've dumbed this problem down sufficiently to ask in a way that is straight-forward and will get me the answer I want. Let's say I have two files, both in my home directory, as follows:
Test.java:
class Test
{
public static void main(String args[])
{
Test2.test();
}
}
and Test2.java:
class Test2
{
public static void test()
{
System.out.println("Hello World!");
}
}
Now if I leave these files as is, when I run "gcj Test.java --main=Test
", naturally I get an error saving Test2 is undefined. But I have no idea what I need to add to tell it where to find Test2. I tried adding "import Test2;
", "import Test2.*;
", and "import Test2.java;
" to the top of Test.java, but clearly I'm not on the right track here. What do I need to do to link these files together and get it to compile?