• Post Reply Bookmark Topic Watch Topic
  • New Topic

AOT Compilation with GCJ  RSS feed

 
Trevor Whitney
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, I'm trying to compile a JAR down to a native windows object file using GCJ. This is my first experience with AOT compilation, so when something went wrong, I was lost. Hopefully someone here can help. When attempting to compile, I get an error that GCJ "cannot find file for class sun.security.action.GetPropertyAction". This is called for in a library I'm using, "org.jauddiotagger.logging.LogFormatter", which is a part of the jAudioTagger library for reading audio file metadata. My understanding of why this doesn't work is that since GCJ uses an open source JVM, it doesn't include all the same libraries as Sun's JVM, and this security package is one of the things it must be missing. My questions are:

1. Do I understand the problem here correctly?

2. What are my options to work around this?


Thanks!
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Code that uses that class is trying to cover the case where a SecurityManager is blocking access to reading system properties. It's generally easy to just take that part out and access the property directly. Since you're compiling to native code, it's unlikely this security issue is relevant to you anyway. So I'd just do a little hack on the offending source and then try again.
 
Trevor Whitney
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ernest! A little tweak to the offending source fixed that problem. Still getting some complaints about the SWT code in there, but I've found a few resources for that one, so we'll see how things go.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!