当我尝试使用Hipe从Erlang shell编译模块时,我得到:
3> hipe:c(erlangmodules2,[native]).
** exception error: undefined function hipe:c/2
4> hipe:help().
** exception error: undefined function hipe:help/0
不是标准Erlang的一部分吗?我在Ubuntu 14.04 LTS上从Eshell V7.2运行R18。
答案 0 :(得分:1)
您应该为此安装public class Point {
public String name = "Henry";
public Point() {
}
public Point(String name) {
this.name = name; //changes current value (Henry) to the one sent as an argument.
}
public void setName(String newName) {
this.name = newName;
}
public String getName() {
return this.name;
}
public static void main(String[] args) {
Point pointA = new Point();
Point pointB = new Point("Other name");
System.out.println(pointA.name); // Henry
System.out.println(pointB.name); // Other name
pointA.setName("New name");
System.out.println(pointA.getName()); // New name
}
}
包。