Creation of package and import them in another jav

2019-08-19 00:26发布

I have a folder with structure src/org/openjdk/jmh and in this I have various files such as annotations, generators, infra, profile, results, runner, util.

All these files have various java programs in them .

Now in src/com/user directory I have a benchmark code "JMHSortBenchmark.java" which uses the

import org.openjdk.jmh.annotations.*;
import org.openjdk.jmh.runner.*; 

But when I compile the JMHSortBenchmark.java, I get an error as

package org.openjdk.jmh.annotations does not exist
package org.openjdk.jmh.runner      does not exist

How to get rid of this error or how to create package and import them into the benchmark code?

Or in other words how can I create a package org.openjdk.jmh.annotations and org.openjdk.jmh.runner thereby importing them and use?

0条回答
登录 后发表回答