This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

compiling jars into libraries w/ dependencies


I'm trying to compile jars into shared libraries which contain dependencies
on other jars. I can compile a jar with no external dependencies, but even I
I compile the jar which is depended on into a shared lib, I cannot seem to
get it to be recognized. For example, given the following code:

class a
{
	public void a()
	{
		new b();
	}
}

class b
{
	public void b()
	{
		new c();
	}
}

class c
{
	public void c()
	{
		System.out.println("foo!");
	}
}

where a.java, b.java and c.java are compiled into classes and each is put
into it's own jar (a.jar, b.jar, c.jar), it is possible to compile c.jar
into a shared lib with:

 gcj -shared -o libmyc.so c.jar

but compiling b.jar with:

 gcj -shared -o libmyb.so b.jar

yields:

 b.java: In class `b':
 b.java: In method `b()':
 b.java:5: Cannot find file for class c.

what magic command-line do I pass to the second gcj to get it to compile?

thanks!

stewart



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]