我的电脑中安装了eclipe(版本2019-03)[ide]。我也有Windows10。我使用Java11。所以,我有以下代码:
/**
*
*/
package com.aegean.ccsl;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Random;
import java.util.Scanner;
import org.apache.log4j.Logger;
/**
* @author steve
*
*/
public class Main {
private static final Logger LOG = Logger.getLogger(Main.class);
//Lists and parameters declaration
private static List<IotDevice> iot_list = new ArrayList<IotDevice>();
private static List<Cluster> cluster_list = new ArrayList<Cluster>();
private static List<Double> rate_list = new ArrayList<Double>();
private static int M, Bt, P, No, cell, fc, min_d, f, F;
private static double B, h;
private static int h_mobile, h_base;
private static final DecimalFormat df = new DecimalFormat(".##");
/**
* Main method.
*/
public static void main(String[] args) {
System.out.println("Hello");
}
当我右键单击Main class并以Java Application身份运行时,eclipse会抛出一个窗口:[在此处输入图像描述] [1]
[1]:https://i.stack.imgur.com/R88kl.png。有任何可能的原因可以解决此问题? 谢谢!