Re: [jnc-users] Reference not found
Status: Beta
Brought to you by:
soapy
From: Marco T. <mt...@gm...> - 2007-03-30 11:03:16
|
-------- Original-Nachricht -------- Datum: Fri, 30 Mar 2007 03:04:07 -0700 (PDT) Von: Jerome Benezech <jbe...@ya...> An: Marco Trudel <mt...@gm...>, jbe...@bi... CC: jav...@li... Betreff: Re: [jnc-users] Reference not found > Thanks Marco for your very quick replied. > I use JNC 1.1.1. > > So I tried to put all the external jars into 1 single jar and now get > problems with log4J: That's bad. It means that you need an API that doesn't yet exist respectively is not complete. There has been a lot of work on javax.management lately, so it might work with the current GCJ trunk. But of course that is no help right know. Try adding "-findirect-dispatch" as custom GCJ flag and hope you don't need the missing class at runtime. Another thing that you might try is to remove the log4j jar from the compilation. I think log4j comes with GCJ/GNU classpath already. Marco > creating "UpdateLauncher.exe" for Windows > - processing AdCafeLibs.jar > [D:\Software\Programming\gcc-119844-win\bin\gcj > -fjni > -O2 > -Ilibs/win/gui/gui.jar > -c > C:\MesDocuments\_dev\CocoonWorkspace\NewCafeClient\lib\AdCafeLibs.jar > -o > > C:\MesDocuments\_dev\CocoonWorkspace\NewCafeClient\lib\AdCafeLibs-win.jar.o > > -IC:\MesDocuments\_dev\CocoonWorkspace\NewCafeClient\distribution\AdCafe-updater.jar] > org/apache/log4j/jmx/AbstractDynamicMBean.java:0: error: cannot find file > for class javax.management.MBeanRegistration > org/apache/log4j/jmx/AbstractDynamicMBean.java:0: error: cannot find file > for class javax.management.MBeanRegistration > org/apache/log4j/jmx/AbstractDynamicMBean.java:0: error: cannot find file > for class javax.management.MBeanRegistration > org/apache/log4j/jmx/AbstractDynamicMBean.java:0: error: cannot find file > for class javax.management.MBeanServer > org/apache/log4j/jmx/AbstractDynamicMBean.java:0: error: cannot find file > for class javax.management.MBeanServer > org/apache/log4j/jmx/AbstractDynamicMBean.java:0: error: cannot find file > for class javax.management.MBeanServer > org/apache/log4j/jmx/AbstractDynamicMBean.java:0: error: cannot find file > for class javax.management.MBeanRegistration > org/apache/log4j/jmx/AbstractDynamicMBean.java:0: error: cannot find file > for class javax.management.MBeanRegistration > org/apache/log4j/jmx/Agent.java: In class 'org.apache.log4j.jmx.Agent': > org/apache/log4j/jmx/Agent.java: In method > 'org.apache.log4j.jmx.Agent.start()': > org/apache/log4j/jmx/Agent.java:0: error: cannot find file for class > com.sun.jdmk.comm.HtmlAdaptorServer > org/apache/log4j/jmx/Agent.java:0: confused by earlier errors, bailing > out > failed... > > > Marco Trudel <mt...@gm...> wrote: > Jerome Benezech wrote: > > Hi all, > > > > I tried to compile my java (1.5) project into a Win32 (XP) executable > > and get the error listed below. I compile a jar file with a main class > > that references other jar files (of my project or external like log4J). > > I use GCJ 4.2.0. > > Which JNC version? > > > > Any idea my this does not work ? > > Probably because you set most jars to only import needed references. > With multiple jars, there will probably occur linking problems. > Technical explanation: This creates archives from your jars. At the > linking step, some jars might need objects from an archive which has > already been processed. So you get the missing references because the > objects can no longer be found/imported. > This is already in my todo list... > > What you can do about it: > - Extract all jars into a dir and create a new jar from this dir. That's > what I usually do. > - Compile the complete jars. > > > > creating "UpdateLauncher.exe" for Windows > > [snip] > > - processing jdic-native.jar > > Warning: Nothing imported, JAR unused! > > I guess this jar needs to be compiled completely?! > > > Hope that helps > Marco > > > > Jerome Benezech > jbe...@ya... -- "Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ... Jetzt GMX ProMail testen: http://www.gmx.net/de/go/promail |