gpt4 book ai didi

java - 在 windows8.1 上编译 OpenGTS 失败

转载 作者:行者123 更新时间:2023-11-28 22:37:51 25 4
gpt4 key购买 nike

我在 Windows 8.1 上编译 opengts 时遇到问题我已经关注了 OpenGTS 安装和配置 pdf,但仍然没有运气我在用

java: jdk1.7.0_45 Ant :apache-ant-1.9.3 Tomcat : Tomcat 8mysql: mysql5.5.20mysql-connector-java-5.1.28-bin.jarjavax.mail.jar

我已经配置好JAVA_HOME,GTS_HOME,CATALINA_HOME,MYSQL_HOME,ANT_HOME

并将它们添加到路径变量中

任何帮助表示赞赏。谢谢

构建的输出是:

Buildfile: E:\java\projects\opengts\build.xml
clean:
[delete] Deleting directory E:\java\projects\opengts\build
custom.jar:
[echo] Skipping General Custom build ...
customtrack.jar:
[echo] Skipping Track Custom build ...
custom:
prepare:
[mkdir] Created dir: E:\java\projects\opengts\build
[mkdir] Created dir: E:\java\projects\opengts\build\lib
[echo] OS = Windows 8
[echo] JavaHome = C:\Program Files\Java\jre7
[exec] java version "1.7.0_45"
[exec] Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
[exec] Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
[copy] Copying 2 files to E:\java\projects\opengts\build\lib
[echo] (Ignore copy 'not found' warnings)
[copy] Warning: E:\java\projects\opengts\lib\gtsopt\classes does not exist.
gtsutils.compile:
[echo] Compiling gtsutils.jar source ...
[javac] Compiling 62 source files to E:\java\projects\opengts\build
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
[javac] Note: E:\java\projects\opengts\src\org\opengts\util\OSTools.java uses or overrides a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 1 warning
[javac] Creating empty E:\java\projects\opengts\build\org\opengts\util\package- info.class
[echo] Compiling SendMailArgs.java (optional if 'mail.jar' not available) ...
[javac] Compiling 1 source file to E:\java\projects\opengts\build
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:37: error: package javax.mail does not exist
[javac] import javax.mail.*;
[javac] ^
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:38: error: package javax.mail.internet does not exist
[javac] import javax.mail.internet.*;
[javac] ^
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:365: error: cannot find symbol
[javac] private static InternetAddress[] _convertRecipients(String to[])
[javac] ^
[javac] symbol: class InternetAddress
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:366: error: cannot find symbol
[javac] throws AddressException
[javac] ^
[javac] symbol: class AddressException
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:400: error: cannot find symbol
[javac] private static void _printAddresses(String msg, Address addr[])
[javac] ^
[javac] symbol: class Address
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:167: error: cannot find symbol
[javac] InternetAddress ia = new InternetAddress(addr, true);
[javac] ^
[javac] symbol: class InternetAddress
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:167: error: cannot find symbol
[javac] InternetAddress ia = new InternetAddress(addr, true);
[javac] ^
[javac] symbol: class InternetAddress
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:266: error: package javax.mail does not exist
[javac] javax.mail.Authenticator auth = null;
[javac] ^
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:268: error: package javax.mail does not exist
[javac] auth = new javax.mail.Authenticator() {
[javac] ^
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:279: error: cannot find symbol
[javac] Session session = Session.getInstance(props, auth);
[javac] ^
[javac] symbol: class Session
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:279: error: cannot find symbol
[javac] Session session = Session.getInstance(props, auth);
[javac] ^
[javac] symbol: variable Session
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:282: error: cannot find symbol
[javac] MimeMessage msg = new MimeMessage(session);
[javac] ^
[javac] symbol: class MimeMessage
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:282: error: cannot find symbol
[javac] MimeMessage msg = new MimeMessage(session);
[javac] ^
[javac] symbol: class MimeMessage
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:283: error: cannot find symbol
[javac] msg.setFrom(new InternetAddress(from));
[javac] ^
[javac] symbol: class InternetAddress
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:285: error: cannot find symbol
[javac] InternetAddress toAddr[] = _convertRecipients(to);
[javac] ^
[javac] symbol: class InternetAddress
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:286: error: cannot find symbol
[javac] InternetAddress ccAddr[] = _convertRecipients(cc);
[javac] ^
[javac] symbol: class InternetAddress
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:287: error: cannot find symbol
[javac] InternetAddress bccAddr[] = _convertRecipients(bcc);
[javac] ^
[javac] symbol: class InternetAddress
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:296: error: package Message does not exist
[javac] msg.setRecipients(Message.RecipientType.TO , toAddr);
[javac] ^
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:297: error: package Message does not exist
[javac] msg.setRecipients(Message.RecipientType.CC , ccAddr);
[javac] ^
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:298: error: package Message does not exist
[javac] msg.setRecipients(Message.RecipientType.BCC, bccAddr);
[javac] ^
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:302: error: cannot find symbol
[javac] Multipart multipart = new MimeMultipart();
[javac] ^
[javac] symbol: class Multipart
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:302: error: cannot find symbol
[javac] Multipart multipart = new MimeMultipart();
[javac] ^
[javac] symbol: class MimeMultipart
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:304: error: cannot find symbol
[javac] MimeBodyPart textBodyPart = new MimeBodyPart();
[javac] ^
[javac] symbol: class MimeBodyPart
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:304: error: cannot find symbol
[javac] MimeBodyPart textBodyPart = new MimeBodyPart();
[javac] ^
[javac] symbol: class MimeBodyPart
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:309: error: cannot find symbol
[javac] BodyPart attachBodyPart = new MimeBodyPart();
[javac] ^
[javac] symbol: class BodyPart
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:309: error: cannot find symbol
[javac] BodyPart attachBodyPart = new MimeBodyPart();
[javac] ^
[javac] symbol: class MimeBodyPart
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:324: error: cannot find symbol
[javac] Transport transport = session.getTransport("smtp");
[javac] ^
[javac] symbol: class Transport
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:329: error: cannot find symbol
[javac] Transport.send(msg);
[javac] ^
[javac] symbol: variable Transport
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:338: error: cannot find symbol
[javac] } catch (MessagingException me) {
[javac] ^
[javac] symbol: class MessagingException
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:342: error: cannot find symbol
[javac] if (ex instanceof SendFailedException) {
[javac] ^
[javac] symbol: class SendFailedException
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:343: error: cannot find symbol
[javac] SendFailedException sfex = (SendFailedException)ex;
[javac] ^
[javac] symbol: class SendFailedException
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:343: error: cannot find symbol
[javac] SendFailedException sfex = (SendFailedException)ex;
[javac] ^
[javac] symbol: class SendFailedException
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:348: error: cannot find symbol
[javac] ex = (ex instanceof MessagingException)? ((MessagingException)ex).getNextException() : null;
[javac] ^
[javac] symbol: class MessagingException
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:348: error: cannot find symbol
[javac] ex = (ex instanceof MessagingException)? ((MessagingException)ex).getNextException() : null;
[javac] ^
[javac] symbol: class MessagingException
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:368: error: cannot find symbol
[javac] java.util.List<InternetAddress> inetAddr = new Vector<InternetAddress>();
[javac] ^
[javac] symbol: class InternetAddress
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:368: error: cannot find symbol
[javac] java.util.List<InternetAddress> inetAddr = new Vector<InternetAddress>();
[javac] ^
[javac] symbol: class InternetAddress
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:386: error: cannot find symbol
[javac] inetAddr.add(new InternetAddress(t));
[javac] ^
[javac] symbol: class InternetAddress
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:387: error: cannot find symbol
[javac] } catch (AddressException ae) {
[javac] ^
[javac] symbol: class AddressException
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:392: error: cannot find symbol
[javac] return inetAddr.toArray(new InternetAddress[inetAddr.size()]);
[javac] ^
[javac] symbol: class InternetAddress
[javac] location: class SendMailArgs
[javac] 39 errors
[javac] 1 warning
[javac] Compile failed; see the compiler error output for details.
[echo] Compiling dbtools ...
[javac] Compiling 24 source files to E:\java\projects\opengts\build
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
[javac] Note: E:\java\projects\opengts\src\org\opengts\dbtools\DBAdmin.java uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 1 warning
[javac] Creating empty E:\java\projects\opengts\build\org\opengts\dbtools\package- info.class
gtsutils.exceltools:
gtsutils.sigHandler:
gtsutils.optional:
gtsutils.jar:
[echo] Creating gtsutils.jar ...
[copy] Copying 14 files to E:\java\projects\opengts\build
[jar] Building jar: E:\java\projects\opengts\build\lib\gtsutils.jar
gtsutils:
CompileTime.java:
[echo] Creating CompileTime module ...
gtsdb:
[echo] Creating gtsdb.jar ...
[javac] Compiling 112 source files to E:\java\projects\opengts\build
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
[javac] 1 warning
[javac] Creating empty E:\java\projects\opengts\build\org\opengts\geocoder\tinygeocoder\package-info.class
[javac] Creating empty E:\java\projects\opengts\build\org\opengts\db\tables\package-info.class
[javac] Creating empty E:\java\projects\opengts\build\org\opengts\geocoder\nominatim\package-info.class
[javac] Creating empty E:\java\projects\opengts\build\org\opengts\dbtypes\package-info.class
[javac] Creating empty E:\java\projects\opengts\build\org\opengts\geocoder\google\package-info.class
[javac] Creating empty E:\java\projects\opengts\build\org\opengts\geocoder\geonames\package-info.class
[javac] Creating empty E:\java\projects\opengts\build\org\opengts\db\dmtp\package-info.class
[javac] Creating empty E:\java\projects\opengts\build\org\opengts\geocoder\gisgraphy\package-info.class
[javac] Creating empty E:\java\projects\opengts\build\org\opengts\geocoder\package-info.class
[javac] Creating empty E:\java\projects\opengts\build\org\opengts\db\package-info.class
[copy] Copying 45 files to E:\java\projects\opengts\build
[jar] Building jar: E:\java\projects\opengts\build\lib\gtsdb.jar
[copy] Copying 1 file to E:\java\projects\opengts\build\lib
optjars:
tomcat.home:
[echo] 'CATALINA_HOME' is defined - C:\Program Files\tomcat
tomcat.env:
tools:
[echo] Tools ...
[javac] Compiling 4 source files to E:\java\projects\opengts\build
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
[javac] E:\java\projects\opengts\src\org\opengts\war\tools\BufferedHttpServletResponse.java:41: error: BufferedServletOutputStream is not abstract and does not override abstract method setWriteListener(WriteListener) in ServletOutputStream
[javac] public static class BufferedServletOutputStream
[javac] ^
[javac] 1 error
[javac] 1 warning

BUILD FAILED
E:\java\projects\opengts\build.xml:2046: Compile failed; see the compiler error output for details.

Total time: 30 seconds

最佳答案

您是否将 JavaMail API 放在 $JAVA_HOME/jre/lib/ext/目录中?

还有这个错误

error: BufferedServletOutputStream is not abstract and does not override abstract method setWriteListener(WriteListener) in
ServletOutputStream

是因为你用的是Tomcat8.x 你应该用Tomcat7.x

关于java - 在 windows8.1 上编译 OpenGTS 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20873323/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com