one package two jar files

F

f

Can I put one package in two jar files:

I have
jar1.jar
-com
-company
-project
-package1
-file1.class
-file2.class

jar1.jar
-com
-company
-project
-package1
-file3.class
-file4.class

I compile jar1.jar successfully. But had some problem to compile jar2
with jbuilder7. file3.class use file1.class and file2.class. The
problem is that I can not use

import com.company.project.package1.*; in file2.java

I have to use
import com.company.project.package1.file2;
import com.company.project.package1.file2;

How can I fix it?

Thanks,

ff
 
M

Mike

(e-mail address removed) (f) wrote in message
Try to be a little more precise, I think you have a few typos in your
question.
What is the exact error you're getting?

As a side note, ex-C programmers tend to like to create lots of jar
libraries.
Keep in mind that on Java you'll have a lot less trouble if you simple
one single tree of java code you use for all your projects. No
multiple jar file libraries, except for 3rd party code.

Compilation speed will not likely ever be an issue if you compile
using Jikes, which is just totally redicously fast.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top