cancel
Showing results for 
Search instead for 
Did you mean: 

Compilation error on PA generated Java source files

Former Member
0 Kudos

Hi All -

I get error messages for each independent variables when I compile the java files that are generated automatically out of PA.

When I run the following statement on the terminal:

>> javac -Xlint:deprecation KxJRT.jar My_Model.java

I get below errors during the compilation process:

symbol:class IKxDModellnput

location: class SampleModel SampleModel.java:702: error: cannot find symbol

private double Kxen_RobustRegression_0_KxVar6( IKxDModellnput ilnput ) {

However, when I run the same files using this statement:

>> javac -classpath KxJRT.jar My_Model.java

I just get some warnings/notifications regarding some depreciated statements on the source but ultimately it generates a class at the end of the compilation.

The question is: Should I modify the Java file that generated out of PA to get rid of the error messages that is compiled with -Xlint parameter or leave the source code as it is?

Your expert insights on the matter would be greatly appreciated.

Thanks & regards

Erdal

Accepted Solutions (1)

Accepted Solutions (1)

bertrand_lamy
Employee
Employee
0 Kudos

No, sorry I meant: you should try:

javac -Xlint:deprecation -classpath KxJRT.jar My_Model.java

(-classpath and KxJRT.jar must not be separated).

Answers (6)

Answers (6)

Former Member
0 Kudos
Thank you very much Anton -

Your feedback/reply is very helpful.

Appreciated

former_member537989
Contributor
0 Kudos

  1. for brevity instead of -classpath a -cp option may be used so final command will become: javac -Xlint:deprecation -cp KxJRT.jar My_Model.java
  2. the warning(s) you see is the result of -Xlint:deprecation analysis meaning that My_Model.java contains calls inside to some deprecated APIs.
  3. "Should I modify the Java file that generated out of PA to get rid of the error messages that is compiled with -Xlint parameter or leave the source code as it is?" You shouldn't modify the generated source code, I assume it's better to consult with PA support why the generated code uses deprecated API.
  4. "when the class is recompiled with -Xlint:unchecked" that's another analysis option, checking for type safety of collection api calls, it doesn't suggest what is deprecated calls actually is. For full list of warning you may run with option -Xlint:all
Former Member
0 Kudos

Hi there -

I tried -

javac -Xlint:deprecation -classpath KxJRT.jar My_Model.java

The Notes/Warnings are generated out of this statement. (Pl. check the first shot)

However, when the class is recompiled with -Xlint:unchecked parameter, the outcome of this run is displayed on the second screenshot.

Thanks and regards

Erdal

sap-pa-1.jpg

sap-pa-2.jpg

achab
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello, could you please raise a ticket with SAP Support? Thanks and kind regards Antoine

Former Member
0 Kudos

Hi -

I compiled with -classpath as well. But the result is the same. The result screen -> javac-xlint-with-classpath.jpg

Regards

bertrand_lamy
Employee
Employee
0 Kudos

Hi

Aren't you missing the classpath option on the first line ?