简体   繁体   中英

How to create a new project from an existing package in IntelliJ?

I am new to any IDEA and I am using IntelliJ recently.

I am asking if I have three classes in a package, one class contains the main method, I have opened this package in IntelliJ IDEA but the RUN icon is greyed out.

How could solve this problem or how could I create a project from this package?

在此处输入图像描述

In some IntelIJ products there is button to import the project. Import means it will convert the project from other ide to IntelIJ project.

But it is not always possible. Usually you can open only projects created in that IDE.

You can create new project and create classes with same names, also pay attention to "Edit configuration" that is usually near Run button. In configuration you can specify which file you want to compile and run and what compiler you want to use. For example, you want to run 'main' method of class Bounce.java using java version 1.8.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM