Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: Can't compile .java file in JDeveloper due to missing files

  1. #1
    Junior Member
    Join Date
    Jul 2011
    Posts
    3
    My Mood
    Stressed
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question 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.


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default 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?

  3. #3
    Junior Member
    Join Date
    Jul 2011
    Posts
    3
    My Mood
    Stressed
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default 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.

  4. #4
    Forum old-timer
    Join Date
    Nov 2008
    Location
    Faversham, Kent, UK
    Posts
    472
    My Mood
    Mellow
    Thanks
    4
    Thanked 58 Times in 54 Posts

    Default Re: Can't compile .java file in JDeveloper due to missing files

    Quote Originally Posted by javanewbie2 View Post
    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?

  5. #5
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default 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.

Similar Threads

  1. [SOLVED] Compile a set of java files for a sudoku program
    By kanishk.dudeja in forum Java Theory & Questions
    Replies: 7
    Last Post: June 16th, 2011, 09:54 AM
  2. [SOLVED] Netbeans 7.0 won't compile files.
    By Melawe in forum Java IDEs
    Replies: 3
    Last Post: June 14th, 2011, 04:38 AM
  3. making a .bat file that compiles your java files
    By sp11k3t3ht3rd in forum What's Wrong With My Code?
    Replies: 5
    Last Post: October 24th, 2010, 12:55 AM
  4. log4j RollingFileAppender missing files
    By razorSpirit in forum What's Wrong With My Code?
    Replies: 0
    Last Post: October 13th, 2010, 01:40 PM
  5. Missing Substance file
    By ma05k1 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: April 4th, 2010, 05:22 PM