Why are some custom javascript files working but some are not

If, as you have ensured, the javascript files are correctly loaded, simply WordPress is not likely to be involved in your problem.

That being said, if, as you also have ensured, the code is correct and there are no errors, I think that the problem can be related with the DOM being not ready. The code from java1.js code depends on DOM, so you must be sure that DOM is ready before you try to execute it. One of the easier and popular ways to do it is to wrap your code in jQuery(document).ready method:

(function($){

    // $ is locally scoped, so you can use it safely
    // Your code that don't depends on DOM can go here

    $(document).ready(function(){

         // Your code that depends on DOM goes here

    });
})(jQuery);