Note that there are some explanatory texts on larger screens.

plurals
  1. POcom.apple.eawt.Application not working after obfuscation
    primarykey
    data
    text
    <p>I have written an application in Java for both Mac OSx and Windows, but I've developed it on Windows. Therefore I used <code>java.lang.reflect.*</code> in order to implement the 'About' and 'Quit' handler without receiving exceptions.</p> <p>I've exported it as an Executable Jar and everything works fine on both operating systems. However, I want to obfuscate the application and I'm using ProGaurd to do so. I've specified the necessary libraries for it to work on Windows (rt.jar, jsse.jar, jce.jar) and it still does work fine on Windows, however ProGaurd is telling me that there is two unresolved dynamic references to classes or interfaces, and the obfuscated application no longer works properly on Mac (the About and Quit Handler don't work).</p> <p>I read somewhere that the <code>ui.jar</code> was required, so I copied it accross from my Mac and specified it in ProGaurd but that did not seem to solve the problem! Any solutions appreciated then...</p> <p>Thanks in advance</p> <p><strong>UPDATE</strong></p> <p>I have now used AppleJavaExtensions in order to implement the handlers using <code>com.apple.eawt.Application</code> rather than reflect. However, I'm still getting the exact same problem! Here is the code that I am currently using:</p> <pre><code>package ap; import com.apple.eawt.AboutHandler; import com.apple.eawt.AppEvent; import com.apple.eawt.AppEvent.QuitEvent; import com.apple.eawt.Application; import com.apple.eawt.QuitHandler; import com.apple.eawt.QuitResponse; import com.gui.Tabs; public class xa implements AboutHandler, QuitHandler { // Constructor to register/install the necessary handler's public xa(){ Application.getApplication().setAboutHandler(this); Application.getApplication().setQuitHandler(this); } // Implemented method to catch the About menu item @Override public void handleAbout(AppEvent.AboutEvent e) { Tabs.switchAbout(); } // Implemented method to catch the Quit menu item @Override public void handleQuitRequestWith(QuitEvent arg0, QuitResponse arg1) { Tabs.quit(); } } </code></pre> <p>AND I am using the ProGuard GUI to obfuscate my application. In Obsfucation 'tab' at the bottom I've added class <code>ap.xa</code> and specified that it extends/implements <code>AboutHandler, QuitHandler</code>. I've also added the Class <code>com.gui.Tabs</code> but it the problem still occurs.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload