java循环执行程序在特定时间后停止
完成 脚本的执行情况良好,没有任何异常,但在一定时间后它停止并显示表的id和消息+++。 我有这个问题很久了。我被说服每次都要杀死应用程序的进程idjava循环执行程序在特定时间后停止,java,multithreading,bash,infinite-loop,execution,Java,Multithreading,Bash,Infinite Loop,Execution,完成 脚本的执行情况良好,没有任何异常,但在一定时间后它停止并显示表的id和消息+++。 我有这个问题很久了。我被说服每次都要杀死应用程序的进程id 我该怎么办?代码不完整,我看不到catch块。而在此处输入code与此无关。可能与问题无关,但您确定您不是有意转义拆分正则表达式开头的字符吗?不,代码很好,执行时没有任何警告或任何异常。确切的问题是,它在任意时刻停止 public Test(){} public void run() { System.out.println("call
我该怎么办?代码不完整,我看不到catch块。而
在此处输入code
与此无关。可能与问题无关,但您确定您不是有意转义拆分正则表达式开头的
字符吗?不,代码很好,执行时没有任何警告或任何异常。确切的问题是,它在任意时刻停止
public Test(){}
public void run() {
System.out.println("calls");
Map<String, Indexation> mi = new HashMap<>();
String[] spl = compo.split("[\\s@&.?$+-:_!^{}']+");
int ct = 0;
try {
System.out.println("calls Prep");
PreparedStatement p = GetConnexion.getPST("select * from mtg where ogvideo is null and title!=? and alfa!=? and st=? order by id desc limit 1");
PreparedStatement pu = GetConnexion.getPST("update mtg set st=? where id=?");
p.setString(1, "");
p.setString(2, "");
p.setInt(3, 0);
ResultSet r = p.executeQuery();
while (r.next()) {
int id = r.getInt("id");
pu.setInt(1, 2);
pu.setInt(2, id);
pu.executeUpdate();
System.out.println(id + "--------");
String title = r.getString("title");
String alfa = r.getString("alfa");
String compo = title + " " + alfa;
String url = r.getString("url");
compo = compo.toLowerCase();
String[] spl = compo.split("[.=#&,;x|<>!\\s\\-:_\\?\\p{P} \\t\\n\\r]+");
System.out.println("<--->");
for (String s : spl) {
System.out.println("+++++++++++++");
ct = getFrequencies(spl, s) + getOccu(url, s);
System.out.println("----coll----");
Indexation i = new Indexation(alfa, title, url, ct, s,
s + url);
if (s.length() > 2 &&
!getAllStpW().contains(s) &&
!getDirty().contains(s)) mi.put(s, i);
}
}
r.close();
p.close();
System.out.println("end");
} catch (Exception f) {
f.printStackTrace();
}
}
while true
do
java -Xms40m -Xmx712m -verbose:gc -jar test.jar