-1

I am making a java project that creates other java code, and I need it to compile it, and I need it to work on a system whether or not it has a compiler installed natively. How would I go about this? I cannot use ToolProvider.getSystemJavaCompiler(); from the JavaCompiler library, because I cannot just assume that the user has a java compiler on their system.

0

1 Answer 1

-1

If you are talking about implementing code from other projects in your current project, create a Java package.

Otherwise...

Assuming you are using eclipse

Step #1. Right Click => Project

Step #2. Click Project Properties

Step #3. Click on Java Build Path

Step #4. Click the Projects Tab

Step #5. Click the Add Button

Step #6. Select the Project you want to add

Step #7. Click OK button

Sign up to request clarification or add additional context in comments.

1 Comment

Question says "java project that creates other java code". This is not about multi-module projects, it's about a Java program that generates Java source files and then needs to compile them immediately, so the newly generated code can be executed immediately.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.