Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with javac since security update



Suggestions as to how this can be fixed would be appreciated.

-------------------------------------------------------

I have a Mac G4 PowerBook with
  System Version:       Mac OS X 10.3.7 (7S215)
   Kernel Version:      Darwin 7.7.0.  Java info:  


A security patch was recently installed to fix a problem with Java applets, I believe.

Since that patch, the behavior of Java has changed dramatically and to the point of no longer being usable.  The specific features that no longer work properly on my Mac are all failing on Java applications.  None of these issues relates to applets or browsers in any way.

        1.  javac abc.java no longer initiates a compile of abc.java.  Instead a multi line diag is issued starting with:
        javac: no source files
  Usage: javac <options> <source files>
        where possible options include:
Changing the compile line to
        javac -verbose abc.java
will initiate the compile, but only if abc is self-contained, the compiler fails to find class files in the directory where the file abc.java = the directory where the compile was initiated.   An example is appended to this email.

        2.  The javac -verbose abc.java correctly imports libraries, but does not find other classes in the same directory, even if they are already compiled.  A workaround for this is to compile with
        javac -verbose *.java.
Obviously this is an inefficient nuisance.

        3.  Execution of java codes that access files using FileDialog no longer works.  From within a Java program, opening a file using
        FileDialog fd = new FileDialog( ...  ) ;
leaves
        fd.getFile() == null
even after the file xyz.data is opened.  I have not found any work-around for this problem except not to use a GUI for file selection.  A sample code snippet and output is:
Code snippet:
         fd = new FileDialog(this, "Select File to Convert", FileDialog.LOAD);          fileName = fd.getFile();          System.out.println ("Right after getFile: "+sl1f+" "+fd);          fd.setFilenameFilter(this);          fd.setDirectory(System.getProperty("user.dir"));          fd.show();          oneCB.setState(true);          System.out.println (fileName + " file selected.");
Output:
Right after getFile: Select one File java.awt.FileDialog[filedlg0,4,22,0x0,invalid,hidden,modal,title=Select File to Convert,dir= null,file= null,load]
null file selected.

Explanation:
String sl1f = "Select one File";
In the file dialog box that opened, a file was selected and Open was clicked.  Immediately after clicking on Open, the output line above was printed to the console.


Example of compile problem:  (comments added to console dialog in bold italic):
>dir
total 264
-rwx------  1 higbie  staff   8119 25 Mar 14:28 F77ToF90.class
-rwx------  1 higbie  staff   9872 28 Mar 08:08 F77ToF90.java
-rw-r-----  1 higbie  staff   1674 25 Mar 14:28 MultiFile.class
-rwx------  1 higbie  staff   2590 25 Mar 14:23 MultiFile.java
drwx------  5 higbie  staff    170 28 Mar 08:08 backup
-rwx------  1 higbie  staff  42228 24 Mar 09:02 fpret
-rwx------  1 higbie  staff  48747 24 Mar 09:02 fpret.c
-rwx------  1 higbie  staff   1672 28 Mar 07:53 fpret.ftn
-rwx------  1 higbie  staff   2157 24 Mar 09:02 fpret.tex
-rwx------  1 higbie  staff   1672 24 Mar 09:02 fpret.txt
drwx------  3 higbie  staff    102 24 Mar 11:02 zrchives
corvus-e0 /Users/higbie/Documents/programs/java/pretty}
>javac F77ToF90.java            <= file name pasted here
javac: no source files 
Usage: javac <options> <source files>
where possible options include:
  -g                        Generate all debugging info
  -g:none                   Generate no debugging info
  -g:{lines,vars,source}    Generate only some debugging info
  -nowarn                   Generate no warnings
  -verbose                  Output messages about what the compiler is doing
  -deprecation              Output source locations where deprecated APIs are used
  -classpath <path>         Specify where to find user class files
  -sourcepath <path>        Specify where to find input source files
  -bootclasspath <path>     Override location of bootstrap class files
  -extdirs <dirs>           Override location of installed extensions
  -d <directory>            Specify where to place generated class files
  -encoding <encoding>      Specify character encoding used by source files
  -source <release>         Provide source compatibility with specified release
  -target <release>         Generate class files for specific VM version
  -help                     Print a synopsis of standard options

corvus-e0 /Users/higbie/Documents/programs/java/pretty}
>javac *java            <= illegal character in name above?
corvus-e0 /Users/higbie/Documents/programs/java/pretty}
>dir                   
total 264
-rwx------  1 higbie  staff   8119 25 Mar 14:28 F77ToF90.class
-rwx------  1 higbie  staff   9872 28 Mar 08:08 F77ToF90.java
-rw-r-----  1 higbie  staff   1674 28 Mar 08:10 MultiFile.class
-rwx------  1 higbie  staff   2590 25 Mar 14:23 MultiFile.java
drwx------  5 higbie  staff    170 28 Mar 08:08 backup
-rwx------  1 higbie  staff  42228 24 Mar 09:02 fpret
-rwx------  1 higbie  staff  48747 24 Mar 09:02 fpret.c
-rwx------  1 higbie  staff   1672 28 Mar 07:53 fpret.ftn
-rwx------  1 higbie  staff   2157 24 Mar 09:02 fpret.tex
-rwx------  1 higbie  staff   1672 24 Mar 09:02 fpret.txt
drwx------  3 higbie  staff    102 24 Mar 11:02 zrchives
corvus-e0 /Users/higbie/Documents/programs/java/pretty}
>javac -verbose F77ToF90.java   <= If so, added flag lets javac see the file!
F77ToF90.java:155: cannot resolve symbol
symbol  : class MultiFile       <= even so, MultiFile.class wasn't found
location: class F77ToF90
         MultiFile mf = new MultiFile(this, outTF.getText());
         ^
F77ToF90.java:155: cannot resolve symbol
symbol  : class MultiFile
location: class F77ToF90
         MultiFile mf = new MultiFile(this, outTF.getText());
                            ^
2 errors
corvus-e0 /Users/higbie/Documents/programs/java/pretty}
>javac -verbose *java           <= note time stamp below: MultiFile not recompiled, chmod 700 * does not change diag above
corvus-e0 /Users/higbie/Documents/programs/java/pretty}
>dir
total 264
-rwx------  1 higbie  staff   7899 28 Mar 08:12 F77ToF90.class
-rwx------  1 higbie  staff   9872 28 Mar 08:08 F77ToF90.java
-rw-r-----  1 higbie  staff   1674 28 Mar 08:12 MultiFile.class
-rwx------  1 higbie  staff   2590 25 Mar 14:23 MultiFile.java
drwx------  5 higbie  staff    170 28 Mar 08:08 backup
-rwx------  1 higbie  staff  42228 24 Mar 09:02 fpret
-rwx------  1 higbie  staff  48747 24 Mar 09:02 fpret.c
-rwx------  1 higbie  staff   1672 28 Mar 07:53 fpret.ftn
-rwx------  1 higbie  staff   2157 24 Mar 09:02 fpret.tex
-rwx------  1 higbie  staff   1672 24 Mar 09:02 fpret.txt
drwx------  3 higbie  staff    102 24 Mar 11:02 zrchives
corvus-e0 /Users/higbie/Documents/programs/java/pretty}
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.