当前位置:首页>开发>正文

eclipse黑色背景jni怎么办 eclipse运行出现不明错误

2023-04-21 11:57:20 互联网 未知 开发

 eclipse黑色背景jni怎么办 eclipse运行出现不明错误

eclipse黑色背景jni怎么办

楼上正解!
Eclipse在window-preferences-General-Editors-TextEditors-Background color 把System Default 的勾去掉,选择上面的颜色.选择黑色

字体改颜色,
window-preferences-General-Appearance-Colors and Fonts
不过我试着可以改下划线,改字体。颜色改了没有什么反应。。。。

eclipse运行出现不明错误

首先楼主出现这个异常是因为没有传参数的问题

在eclipse中给args数组传参数的方法如下:
在程序中点击邮件-》run as-》run configerations
然后在右边的框点击Arguments,输入 1 回车 然后点击 run
这样就可以了

需要注意的是,这种传的参数是String的 ,所以先用String类型的变量接受下

public class hello {

/**
* @param args
*/
public static void main(String[] args) {
String a, x, y // 声明a,x,y
a = new String(args[0]) // a输入
x = new String(args[1]) // b输入
if (new Integer(a) <= new Integer(x)) // IF-else使用
y = a
else
y = x

System.out.println("x=" x) // 输出
System.out.println("y=" y)
System.out.println("a=" a)
}
}

最新文章