Eclipse, java8 is built with an ant and the bootstrap class path is not set with -source8 error.

Asked 2 years ago, Updated 2 years ago, 468 views

As the title suggests, I am too new to know how to set classpass.
Currently, javac is unknown in the following configuration:

jdk-14.0.2
jre1.8.0_261
tomcat 8.5.57

Below is the error.Thank you for your cooperation.

Buildfile: C:\Users\tono\tomcat\pleiades\workspace\apache-tomcat-8.5.57\webapps\web\WEB-INF\build-web.xml
US>clean:
compile:
    [javac] Compiling 41 source files to C:\Users\tono\tomcat\pleiades\workspace\apache-tomcat-8.5.57\webapps\web-INF\classes
    [javac] Warning: Options bootstrap class path not configured with -source8
    [javac] C:\Users\tono\tomcat\pleiades\workspace\apache-tomcat-8.5.57\webapps\web-INF\src\jp\veritrans\tercerog\sample\push\CarrierPushServlet.java:18: Error: Package jp.veritrans.terlog.mutkilk does not exist
    [javac] import jp.veritrans.tercerog.mdk.util.MdkMerchantUtility;
    [javac]^
    [javac] C:\Users\tono\tomcat\pleiades\workspace\apache-tomcat-8.5.57\webapps\web-INF\src\jp\veritrans\tercerog\sample\util\CarrierUtility.java:11: Error: Package jp.veritrans.terlog.mdokdo does not exist
    [javac] import jp.veritrans.tercerog.mdk.dto.MdkServiceConstants;
    [javac]^
    [javac] C:\Users\tono\tomcat\pleiades\workspace\apache-tomcat-8.5.57\webapps\web\WEB-INF\src\jp\veritrans\tercerog\sample\web\PaymentMethodSelect.java:10: Error: Package jp.veritrans.terlog.mtodo does not exist
    [javac] import jp.veritrans.tercerog.mdk.dto.MdkServiceConstants;
    [javac]^
    [javac] C:\Users\tono\tomcat\pleiades\workspace\apache-tomcat-8.5.57\webapps\web\WEB-INF\src\jp\veritrans\tercerlog\sample\web\carrier\base\AbstractAuthorizeExec.java:11: The package does not exist.trangerkertrans\web.
    [javac] import jp.veritrans.tercerog.mdk.ITransaction;
    [javac]^
    [javac] C:\Users\tono\tomcat\pleiades\workspace\apache-tomcat-8.5.57\webapps\web\WEB-INF\src\jp\veritrans\tercerlog\sample\web\carrier\base\AbstractAuthorizeExec.java:12: The package does not exist.trangerkertrans\web.
    [javac] import jp.veritrans.tercerog.mdk.TransactionFactory;
    [javac]^
    [javac] C:\Users\tono\tomcat\pleiades\workspace\apache-tomcat-8.5.57\webapps\web\WEB-INF\src\jp\veritrans\tercerlog\sample\web\carrier\base\AbstractAuthorizeExec.java:13: The package does not exist: jp.verransderkotrans\web\web.dotrans\web.
    [javac] import jp.veritrans.tercerog.mdk.dto.CarrierAuthorizeRequestDto;
    [javac]^
    [javac] C:\Users\tono\tomcat\pleiades\workspace\apache-tomcat-8.5.57\webapps\web\WEB-INF\src\jp\veritrans\tercerlog\sample\web\carrier\base\AbstractAuthorizeExec.java:14: The package does not exist.trans\web.docator.
・・・
・・・
・・・
・・・
・・・

    [javac]IT Transaction tran=TransactionFactory.getInstance(reqDto);
    [javac]^
    javac symbol:variable TransactionFactory
    javac location:class AbstractTerminateExec
    [javac] C:\Users\tono\tomcat\pleiades\workspace\apache-tomcat-8.5.57\webapps\web\WEB-INF\src\jp\veritrans\tercerog\sample\web\carrier\base\AbstractTerminateExec.java:100: Error: No Symbol Found
    [javac] CarrierTerminateResponseDto=(CarrierTerminateResponseDto) tran.execute();
    [javac]^
    javac symbol:class CarrierTerminateResponseDto
    javac location:class AbstractTerminateExec
    [javac] C:\Users\tono\tomcat\pleiades\workspace\apache-tomcat-8.5.57\webapps\web\WEB-INF\src\jp\veritrans\tercerog\sample\web\carrier\base\AbstractTerminateExec.java:100: Error: No Symbol Found
    [javac] CarrierTerminateResponseDto=(CarrierTerminateResponseDto) tran.execute();
    [javac]^
    javac symbol:class CarrierTerminateResponseDto
    javac location:class AbstractTerminateExec
    [javac] Note: C:\Users\tono\tomcat\pleiades\workspace\apache-tomcat-8.5.57\webapps\web\WEB-INF\src\jp\veritrans\tercerlog\sample\util\Custom.java operation is unchecked or unsafe.
    [javac] Note: For more information, recompile with the -Xlint:unchecked option.
    [javac] 78 errors
    1 [javac]

BUILD FAILED
C:\Users\tono\tomcat\pleiades\workspace\apache-tomcat-8.5.57\webapps\web\WEB-INF\build-web.xml:70:Compile failed; see the compiler error output for details.

Total time: 1 second

java eclipse tomcat

2022-09-30 21:53

1 Answers

I don't know much about it, but I'll write a workaround for you when I'm into it.

 C:\Users\tono\tomcat\pleiades\workspace\apache-tomcat-8.5.57\webapps\web\WEB-INF\build-web.xml

to

<property name="version.target" value="12"/>
<property name="version.source" value="12"/>

Is there a description like this?

The above is an example of Java 12, but it seems that this description does not match the actual SDK version, and an error is displayed when the required library, etc., is not found.
I think we can avoid errors by matching this version.

Also, if you search for "bootstrap class path is not set with -source8" as the search word, similar cases will be quite successful.Why don't you review your settings using examples that are similar to your environment?


2022-09-30 21:53

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.