我很新,可以 j,事实上这是我的第一个方案。 我似乎在为我的java方案制作一个jar档案方面遇到问题。 这是一个非常基本的方案,它只是从一个网站收集数据,然后以电子格式展示。 该方案取决于Jsoup和HtmlCleaner。 The gui was made with JFormDesigner.
回到问题,当我用ec子管理方案时,一切都完全有效。 没有任何问题。 然而,当我把它作为出口支柱(或与JarMaking公司做的jar)时,德国马克公司甚至显示了这一点。 奇怪的是,当我用<代码>.bat文档管理时,德国马克显示器具显示器,但该节目没有做什么。
I am really stuck, I am not sure what to try next. Any help will be greatly appreciated.
//package com.stackoverflow.q2835505;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import java.awt.*;
import javax.swing.*;
import com.sun.xml.internal.ws.util.StringUtils;
public class TestDumper extends JFrame {
public static String test = "+";
public static String test1 = "-";
public static String itemID;
public static String stab;
public static String slash;
public static String crush;
public static String magic;
public static String range;
public static String stabDef;
public static String slashDef;
public static String crushDef;
public static String magicDef;
public static String rangeDef;
public static String Str;
public static String Prayer;
public static String lowAlch;
public static String highAlch;
public static String Name;
public boolean guiWait = false;
public static boolean printed = true;
public static void main(String[] args) throws Exception {
statGrabber g = new statGrabber();
g.setDefaultCloseOperation(EXIT_ON_CLOSE);
g.setVisible(true);
for ( ; ; ) {
while(g.test){
String url = g.textField2.getText();
Document document = Jsoup.connect(url).get();
stab = document.select("table.wikitable.smallpadding tbody tr td").tagName("TD").eq(2).text();
slash = document.select("table.wikitable.smallpadding tbody tr td").tagName("TD").eq(3).text();
crush = document.select("table.wikitable.smallpadding tbody tr td").tagName("TD").eq(4).text();
magic = document.select("table.wikitable.smallpadding tbody tr td").tagName("TD").eq(5).text();
range = document.select("table.wikitable.smallpadding tbody tr td").tagName("TD").eq(6).text();
stabDef = document.select("table.wikitable.smallpadding tbody tr td").tagName("TD").eq(7).text();
slashDef = document.select("table.wikitable.smallpadding tbody tr td").tagName("TD").eq(8).text();
crushDef = document.select("table.wikitable.smallpadding tbody tr td").tagName("TD").eq(9).text();
magicDef = document.select("table.wikitable.smallpadding tbody tr td").tagName("TD").eq(10).text();
rangeDef = document.select("table.wikitable.smallpadding tbody tr td").tagName("TD").eq(11).text();
Str = document.select("table.wikitable.smallpadding tbody tr td").tagName("TD").eq(16).text();
Prayer = document.select("table.wikitable.smallpadding tbody tr td").tagName("TD").eq(17).text();
Name = document.select("table.wikitable.infobox caption b").text();
highAlch = document.select("table.wikitable.infobox tbody tr td").tagName("TD").eq(8).text();
lowAlch = document.select("table.wikitable.infobox tbody tr td").tagName("TD").eq(9).text();
g.sweet = true;
// String shopPrice = document.select("table.wikitable.infobox tbody tr td").tagName("TD").eq(11).text();
if(stab.startsWith(test)){
stab = stab.substring(1);
}
if(slash.startsWith(test)){
slash = slash.substring(1);
}
if(crush.startsWith(test)){
crush = crush.substring(1);
}
if(magic.startsWith(test)){
magic.trim();
magic = magic.substring(1);
}
if(range.startsWith(test)){
range.trim();
range = range.substring(1);
}
if(stabDef.startsWith(test)){
stabDef = stabDef.substring(1);
}
if(slashDef.startsWith(test)){
slashDef = slashDef.substring(1);
}
if(crushDef.startsWith(test)){
crushDef = crushDef.substring(1);
}
if(magicDef.startsWith(test)){
magicDef.trim();
magicDef = magicDef.substring(1);
}
if(rangeDef.startsWith(test)){
rangeDef.trim();
rangeDef = rangeDef.substring(1);
}
if(Str.startsWith(test)){
Str.trim();
Str = Str.substring(1);
}
if(Prayer.startsWith(test)){
Prayer.trim();
Prayer = Prayer.substring(1);
}
if(highAlch.equalsIgnoreCase("Cannot be alchemised")){
highAlch = "0";
lowAlch = "0";
}
else{
highAlch = highAlch.replace(",", "");
highAlch = highAlch.replace(" ", "");
highAlch = highAlch.replace("c", "");
highAlch = highAlch.replace("o", "");
highAlch = highAlch.replace("i", "");
highAlch = highAlch.replace("n", "");
highAlch = highAlch.replace("s", "");
lowAlch = lowAlch.replace(",", "");
lowAlch = lowAlch.replace(" ", "");
lowAlch = lowAlch.replace("c", "");
lowAlch = lowAlch.replace("o", "");
lowAlch = lowAlch.replace("i", "");
lowAlch = lowAlch.replace("n", "");
lowAlch = lowAlch.replace("s", "");
}
while(printed){
System.out.print("item = "+ itemID+" ");
System.out.print(Name.replace(" ", "_")+" ");
System.out.print(Name.replace(" ", "_")+" ");
System.out.print(highAlch+" ");
System.out.print(lowAlch+" ");
System.out.print("0 ");
System.out.print(stab+" ");
System.out.print(slash+" ");
System.out.print(crush+" ");
System.out.print(magic+" ");
System.out.print(range+" ");
System.out.print(stabDef+" ");
System.out.print(slashDef+" ");
System.out.print(crushDef+" ");
System.out.print(magicDef+" ");
System.out.print(rangeDef+" ");
System.out.print(Str+" ");
System.out.print(Prayer+"
");
System.out.print("Connected!
");
printed = false;
}
}
}
}
}