Can't compile .java file in JDeveloper due to missing files
I am trying to compile a java file in JDeveloper. We have the Oracle iProcuremment Application installed here, version 12.1.1. The java file validates the PO (purchase order) line DFFs. The java file references other .java files that are referencing files we are missing. I've been able to find the .class versions of the PoBaseEOImpl, PoBaseEntityDefImpl, PoLineMergeEOIImpl files but we don't have the .java version. I added the .class versions in the appropriate directory in the project in JDeveloper but still get "not found" errors on these files: PoBaseEOImpl, PoBaseEntityDefImpl, PoLineMergeEOIImpl.
Has anyone experience a similar issue and been able to resolve it?
Thanks.
Re: Can't compile .java file in JDeveloper due to missing files
My javac command works with .class files as definitions for classes.
Are you sure you need the source for those files?
Re: Can't compile .java file in JDeveloper due to missing files
I found a de-compiler and was able to create .java versions of the class files. I go the code to finally compile in JDeveloper.
Re: Can't compile .java file in JDeveloper due to missing files
Quote:
Originally Posted by
javanewbie2
I found a de-compiler and was able to create .java versions of the class files. I go the code to finally compile in JDeveloper.
Two things - firstly, as Norm said, you don't need the .java source files if you've already got the .class files;
Secondly, using decompiled source files is a really bad idea, because with modern optimizing compilers there is no guarantee you will get the original code back, and no guarantee the source will even compile, let alone run and behave like the original. You may have been lucky this time, but how do you know the decompiled code is doing everything the original code would do?
Re: Can't compile .java file in JDeveloper due to missing files
There are lots of products that are distributed as .class files in jar files. Your IDE must take jar files containing class definitions for use during compilation. Look into the IDE options for using libraries.