javacompiler-users Mailing List for javaCompiler (Page 11)
Status: Beta
Brought to you by:
soapy
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(15) |
Aug
(12) |
Sep
(57) |
Oct
(14) |
Nov
(23) |
Dec
(15) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(17) |
Feb
(35) |
Mar
(18) |
Apr
|
May
(4) |
Jun
(2) |
Jul
|
Aug
(12) |
Sep
(15) |
Oct
(15) |
Nov
(8) |
Dec
(4) |
2008 |
Jan
|
Feb
|
Mar
(6) |
Apr
|
May
(2) |
Jun
|
Jul
(6) |
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(5) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
(9) |
Dec
(7) |
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(1) |
Aug
(4) |
Sep
|
Oct
(2) |
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2012 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Marco T. <mt...@gm...> - 2006-09-21 20:47:23
|
Joe Osborne wrote: > Dear Marco >=20 > Your last reply was probably less than an hour. I > greatly appreciate that. You've almost got me > converting to SWT but I would still like to exhaust > the alternatives if at all possible. Actually, you won't do anything else when working on swingWT... But=20 you're welcome to contribute to swingWT! >> swingWT mapps AWT/Swing to SWT. But not everything >> is mapped... >> http://javacompiler.mtsystems.ch/frame_faq.html, >> second question >> >>> So this is where I need help.=20 >>> >>> This is what I am guessing I have to do:=20 >>> 1-Get these classes as java source codes.=20 >>> 2-Get the swingWT as source.=20 >>> 3-Put the classes somewhere in the swingWT >> directory >>> hierarchy. (src folder) >>> 4-Add something to the swingWT main class so they >> are >>> seen.=20 >>> 5-Compile them to a jar.=20 >>> 6-Compile the jar to an object file.=20 >>> 7-Replace the original swingWT object and jar >> files >>> with the ones I modified.=20 >>> >>> Is this what I have to do? >> No. You have to get the swingWT source and add all >> classes/methods you=20 >> still need. Internally you will work with SWT, but >> you simulate the=20 >> AWT/Swing API to outside. >> Change directly to SWT... It's easier... >=20 > I am confused.=20 > You say 'No' but then you seem to imply 'yes' in the > sentence that follows. > Doesn't my (1,2,3)=3D=3DYour"You have to get the swingWT > source and add all classes/methods you still need" > Which ones are right/wrong 1,2,3,4,5,6,7? 1, 3, 4 and maybee 5. An example: You want to do: aJButton.setBackground(Color.RED); But swingWT doesn't have this method. So you download the swingWT=20 source, go to the JButton source file and add the method: public void setBackground(Color c) { privateButton.setBackground(new Color(Display.getCurrent(), c.getRed(),=20 c.getGreen(), c.getBlue()); } While now privateButton is a org.eclipse.swt.widgets.Button and Color is=20 a org.eclipse.swt.graphics.Color. As I said, you fake the AWT/Swing API=20 to the outside and map that internally to SWT. When you have done that, compile swingWT to a jar and overwrite the one=20 from JavaCompiler. > I think the part I need clarification on is the word > "add". > Add the ones that have the "cannot find symbol"? Withhout the example modification I described above, you would get=20 something like "cannot find symbol: swingWT.awt.JButton.setBackground()". > I am not a professional programmer. > I just learned JSwing and NetBeans and have been > programming Java for only 6 months. > Before that I did C and Fortran nearly 20 years ago. > It's taken me 6 months to write only 3500 lines of > code and a lot of that is either IDE auto generated or > templates from Java Almanac. So you can see I am a > beginner. Then this is probably not what you should try to do... Do you really=20 need to compile your program? You might try this as well: http://www.excelsior-usa.com/landing/jet-nc.h= tml > Let me rephrase my understanding of what you are > saying. >=20 > Say the compilation tells me there are "cannot find > symbol" errors for 6 classes that I am using. > I go and get those 6 class files - say from Sun's JDK > or wherever thay are. > I put them in the swingwt-all.jar file which is in the > swingWT-0.87 directory. > Is that right? Where do I put them exactly. > Can you be more specific considering I am relatively > new at this. No, that part of taking existing classes wasn't about AWT or Swing. That=20 was about stuff like sun.audio.AudioConverter and similar that JMF uses=20 but GCJ doesn't (yet) privide. > I had a look at the SwingWT site and I read this: > "Unlike Swing, SwingWT drives native peer widgets for > your platform from SWT" - Ich verstehe dieses ganz > weniger als ich Chinesen verstehe.=20 Chinese is funny: Nin hao ma? Wo shi ruishi ren! Wo jiao Marco. I learned a little chinese at the university :-) But back to the point: If you don't understand that, you shouldn't do=20 what you're doing right now... Use SWT directly or don't compile your=20 program to native. > You have said it's easier to convert my program to > SWT. At the rate I go that may take months. Ich bin so > langsam wie eine Schildkr=F6te, die in Schnapps > schwimmt. Debugging is a killer. If all I have to do > is get some class files, put them in the right place > and that's it then that seems a lot faster in concept. No, you have to do a lot more and need deep AWT/Swing&SWT knowledge to=20 get swingWT working for your needs. > Ah please don't write instructions back to me in > German. I haven't used that language in 20 years > either. Your English is so good, even when I saw your > spelling of "sure" I didn't realize your first > language was not English. Stupid spelling mistakes. I really should install a english spell=20 checker. Hey, wait a minute. There's a button in the toolbar where I can=20 switch between english and german! Great... > I thought it was new slang. > I teach English to Koreans here. They find it so > difficult to learn. That's what my program is for, > learning English for Koreans. Doesn't sound like you need to compile it to native if you ask me... > Have you heard of Excelsior Jet? Yes ;-) > Jet and your program > are the only two in the whole world that compile java > to exe for Windows. Actually, Excelsior Jet and GCJ. I just put GCJ together into a user=20 friendly form. > These are the prices for Jet: >=20 > Enterprise $4,500 =20 > Professional $2,300 =20 > Standard $1,200=20 > > Pretty expensive isn't it? Yes. Think I could ask for 100$ for JavaCompiler and still be good of... Marco |
From: Joe O. <joe...@ya...> - 2006-09-21 20:22:17
|
Dear Marco Your last reply was probably less than an hour. I greatly appreciate that. You've almost got me converting to SWT but I would still like to exhaust the alternatives if at all possible. > swingWT mapps AWT/Swing to SWT. But not everything > is mapped... > http://javacompiler.mtsystems.ch/frame_faq.html, > second question > > > So this is where I need help. > > > > This is what I am guessing I have to do: > > 1-Get these classes as java source codes. > > 2-Get the swingWT as source. > > 3-Put the classes somewhere in the swingWT > directory > > hierarchy. (src folder) > > 4-Add something to the swingWT main class so they > are > > seen. > > 5-Compile them to a jar. > > 6-Compile the jar to an object file. > > 7-Replace the original swingWT object and jar > files > > with the ones I modified. > > > > Is this what I have to do? > > No. You have to get the swingWT source and add all > classes/methods you > still need. Internally you will work with SWT, but > you simulate the > AWT/Swing API to outside. > Change directly to SWT... It's easier... I am confused. You say 'No' but then you seem to imply 'yes' in the sentence that follows. Doesn't my (1,2,3)==Your"You have to get the swingWT source and add all classes/methods you still need" Which ones are right/wrong 1,2,3,4,5,6,7? I think the part I need clarification on is the word "add". Add the ones that have the "cannot find symbol"? Add them how exactly. If not like I wrote above then how? Add them where? To the swingwt-all.jar Can you give me more details? I am not a professional programmer. I just learned JSwing and NetBeans and have been programming Java for only 6 months. Before that I did C and Fortran nearly 20 years ago. It's taken me 6 months to write only 3500 lines of code and a lot of that is either IDE auto generated or templates from Java Almanac. So you can see I am a beginner. Let me rephrase my understanding of what you are saying. Say the compilation tells me there are "cannot find symbol" errors for 6 classes that I am using. I go and get those 6 class files - say from Sun's JDK or wherever thay are. I put them in the swingwt-all.jar file which is in the swingWT-0.87 directory. Is that right? Where do I put them exactly. Can you be more specific considering I am relatively new at this. I had a look at the SwingWT site and I read this: "Unlike Swing, SwingWT drives native peer widgets for your platform from SWT" - Ich verstehe dieses ganz weniger als ich Chinesen verstehe. You have said it's easier to convert my program to SWT. At the rate I go that may take months. Ich bin so langsam wie eine Schildkröte, die in Schnapps schwimmt. Debugging is a killer. If all I have to do is get some class files, put them in the right place and that's it then that seems a lot faster in concept. Ah please don't write instructions back to me in German. I haven't used that language in 20 years either. Your English is so good, even when I saw your spelling of "sure" I didn't realize your first language was not English. I thought it was new slang. I teach English to Koreans here. They find it so difficult to learn. That's what my program is for, learning English for Koreans. Six months ago I was looking for an IDE to use. I bypassed JBuilder and Eclipse in favor of NetBeans because I thought it was much easier and faster to get used to. I thought even Oracle's Java IDE was better than JBuilder and Eclipse. I guess now I still should have chosen Eclipse and SWT. At the time I wasn't aware there were different GUI libraries like SWT and Swing. Have you heard of Excelsior Jet? Jet and your program are the only two in the whole world that compile java to exe for Windows. These are the prices for Jet: Enterprise $4,500 Professional $2,300 Standard $1,200 Pretty expensive isn't it? Joe ____________________________________________________ On Yahoo!7 Messenger - Make free PC-to-PC calls to your friends overseas. http://au.messenger.yahoo.com |
From: Marco T. <mt...@gm...> - 2006-09-21 18:00:30
|
Joe Osborne wrote: >> Joe Osborne wrote: >>> Hello Mark > > Sorry about that Marco. > I work on my program until the sun comes up and things > look a bit hazy on the screen by that time. ;) No problem... > <snip> > > Here is the compilation output: > - compiling sources for Java 1.5 preprocessing > > C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\JavaCompilerTempa2jenm.out\MainWindow\MainList.java:24: > cannot find symbol > symbol : class ProgressMonitor > location: package swingwtx.swing > import swingwtx.swing.ProgressMonitor; > > There are 16 of these for various classes. > I take it these are the classes that I am using that > swingWT doesn't have equivalents for in it's library. swingWT mapps AWT/Swing to SWT. But not everything is mapped... http://javacompiler.mtsystems.ch/frame_faq.html, second question > So this is where I need help. > > This is what I am guessing I have to do: > 1-Get these classes as java source codes. > 2-Get the swingWT as source. > 3-Put the classes somewhere in the swingWT directory > hierarchy. (src folder) > 4-Add something to the swingWT main class so they are > seen. > 5-Compile them to a jar. > 6-Compile the jar to an object file. > 7-Replace the original swingWT object and jar files > with the ones I modified. > > Is this what I have to do? No. You have to get the swingWT source and add all classes/methods you still need. Internally you will work with SWT, but you simulate the AWT/Swing API to outside. Change directly to SWT... It's easier... >> I downloaded JMF and tried a little: >> - It needs sun classes that are not yet in gcj. You >> could add them manually. > > Where do I put them? > Do I need to make changes to any of the gcj files to > take acount of the files I add? No. Put them in a jar and add the jar to your project in JavaCompiler. This will work with most of the classes... >> - The player window uses AWT or Swing, so I guess it >> will be hard to get >> that working with swingWT. But you could try... > > Fortunately I am not using the player window. > I just create an instance of the player bean object. Even better... Marco |
From: Joe O. <joe...@ya...> - 2006-09-21 17:12:50
|
> Joe Osborne wrote: > > Hello Mark Sorry about that Marco. I work on my program until the sun comes up and things look a bit hazy on the screen by that time. ;) > If you create an unmanaged project, you use the GNU > classpath AWT/Swing. > That doesn't work on windows and it currently > doesn't work on linux > either. You have to use a managed AWT/Swing project > and there the > problem starts > (http://javacompiler.mtsystems.ch/frame_faq.html; > second > question) I got rid of JMF and I will have a go at using mplayer. My app only plays sound and no video and no control interface so I didn't use the JMF player window. I just created an instance of the media player bean javax.media.bean.playerbean.MediaPlayer. It plays mp3 files and that's all I need. Ok so I have the following configuration: -Create managed AWT or Swing application project. -add my .java files as a directory (also tried jar but you recommended adding class or java in your mail list) -add one jar file which may program uses as an import which reads an excel spredsheet jxl.jar -select my main class .java file -enable java 1.5 preprocessing (also tried without) -CNI is default (also tried JNI) -don't check "ignore missing references in jars" Here is the compilation output: - compiling sources for Java 1.5 preprocessing C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\JavaCompilerTempa2jenm.out\MainWindow\MainList.java:24: cannot find symbol symbol : class ProgressMonitor location: package swingwtx.swing import swingwtx.swing.ProgressMonitor; There are 16 of these for various classes. I take it these are the classes that I am using that swingWT doesn't have equivalents for in it's library. So this is where I need help. This is what I am guessing I have to do: 1-Get these classes as java source codes. 2-Get the swingWT as source. 3-Put the classes somewhere in the swingWT directory hierarchy. (src folder) 4-Add something to the swingWT main class so they are seen. 5-Compile them to a jar. 6-Compile the jar to an object file. 7-Replace the original swingWT object and jar files with the ones I modified. Is this what I have to do? > I downloaded JMF and tried a little: > - It needs sun classes that are not yet in gcj. You > could add them manually. Where do I put them? Do I need to make changes to any of the gcj files to take acount of the files I add? > - The player window uses AWT or Swing, so I guess it > will be hard to get > that working with swingWT. But you could try... Fortunately I am not using the player window. I just create an instance of the player bean object. > If you invest some time, you will get it working. > But in my opinion, > you're really better off with mplayer. It plays all > existing codecs and > is stable. Thanks for this tip. I am going to check it out. > Check a early release of my current > project: > http://home.zhwin.ch/~trudemar/tmp/VideoAlbum-0.3a win.zip I ran your video album. My system is Windows 2000 2.66GHz 500Mb RAM. It worked with no problems. I know it's an early release but if you would like some feedback I tested it on wmv,mpg,rm and avi. -Explorer only sees mpg and wmv files. -Player plays all 4 but rm didn't have video. It had sound only. My PC doesn't have RealPlayer installed. -mov,mpg,wmv snaps forward or back except wmv doesn't snap forward to exactly the tip of the mouse, it overshoots forward by 10 about seconds -The pause button didn't release -rm didn't snap to -Explorer filters out non video files but video album sees all file types when you add files. I selected a bmp and wav and it froze. You might want to use a file filter for the open file dialog. > If you're interested, I could send you the jar for > the bluetooth remote > control (you need a midp 2.0 device with jsr82 > support (e.g. Nokia > 6230)) ;-) So you can control your PC with a cell phone and see what's on the PC screen on the cell phone display? If I said I wasn't aware of that technology that would reveal my age! I don't know any more about my phone other than how to talk, sms and take pictures and video. I am in South Korea and I haven't seen any Nokia, Sony or anything other than Korean brands so I probably couldn't use this. I am hardly ever far from the PC anyway. But thanks for the offer. Joe ____________________________________________________ On Yahoo!7 Break a world record with Total Girl's Worlds Largest Slumber Party http://www.totalgirl.com.au/slumberparty |
From: Marco T. <mt...@gm...> - 2006-09-20 22:20:46
|
Joe Osborne wrote: > Hello Mark Hello Jack ;-) > Many thanks for your incredibly quick reply and the > detailed help you have given me. > > I am using GridBagLayout in my JSwing now. > javaCompiler doesn't complain about the code anymore. If you create an unmanaged project, you use the GNU classpath AWT/Swing. That doesn't work on windows and it currently doesn't work on linux either. You have to use a managed AWT/Swing project and there the problem starts (http://javacompiler.mtsystems.ch/frame_faq.html; second question) > It doesn't like jmf.jar(Java Media Framework) but I > will work on it. I downloaded JMF and tried a little: - It needs sun classes that are not yet in gcj. You could add them manually. - The player window uses AWT or Swing, so I guess it will be hard to get that working with swingWT. But you could try... If you invest some time, you will get it working. But in my opinion, you're really better off with mplayer. It plays all existing codecs and is stable. Check a early release of my current project: http://home.zhwin.ch/~trudemar/tmp/VideoAlbum-0.3a-win.zip If you're interested, I could send you the jar for the bluetooth remote control (you need a midp 2.0 device with jsr82 support (e.g. Nokia 6230)) ;-) > I can't use 'mplayer' as you are > doing because I am on Windows 2000. Why? Works perfectly on windows, linux and mac... > I will stay with JSwing and NetBeans for now. I've > looked into it and I think it would take me a long > while to change to SWT. But that's currently the only real chance to get GUI applications compiled for windows. Marco |
From: Joe O. <joe...@ya...> - 2006-09-20 20:06:07
|
Hello Mark Many thanks for your incredibly quick reply and the detailed help you have given me. I am using GridBagLayout in my JSwing now. javaCompiler doesn't complain about the code anymore. It doesn't like jmf.jar(Java Media Framework) but I will work on it. I can't use 'mplayer' as you are doing because I am on Windows 2000. I will stay with JSwing and NetBeans for now. I've looked into it and I think it would take me a long while to change to SWT. Using the 'unmanaged' option I got successful compilation and an executable without errors (only a warning) but when I run the x.exe I get this: ********** C:\proj>x Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit: gnu.java. awt.peer.gtk.GtkToolkit at java.awt.Toolkit.getDefaultToolkit(x.exe) at java.awt.EventQueue.invokeLater(x.exe) Caused by: java.lang.ClassNotFoundException: gnu.java.awt.peer.gtk.GtkToolkit no t found in gnu.gcj.runtime.SystemClassLoader{urls=[file:.\,file:.\,file:.\,file: .\,file:.\,file:.\,file:.\,file:.\,file:.\,file:C:\PROGRA~1\JMF21~1.1E\lib\sound .jar,file:C:\PROGRA~1\JMF21~1.1E\lib\jmf.jar,file:C:\PROGRA~1\JMF21~1.1E\lib\,fi le:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}} at java.lang.Class.forName(x.exe) at java.awt.Toolkit.getDefaultToolkit(x.exe) ...1 more C:\proj> ********** I am not using any such class as gnu.java. awt.peer.gtk.GtkToolkit in my app and the messy string amongst the above is my classpath as you can see. A windows executable is trying to load a GTK library it can't find in a Windows classpath. It doesn't make sense to me. I get this minor stuff during compilation which I wouldn't think would cause the above error: ************** creating JFrame1-win.exe - compiling sources for Java 1.5 preprocessing Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. - Java 1.5 file (*.class) preprocessing [RetroWeaver] Processing 96 classe(s) [RetroWeaver] 96 classe(s) weaved. - Java 1.5 preprocessing: jxl.jar [RetroWeaver] Processing 482 classe(s) [RetroWeaver] 482 classe(s) weaved. - processing jxl.jar-weaved.jar - main compilation step MainWindow/TableSorter.java: In class 'MainWindow.TableSorter': MainWindow/TableSorter.java: In method 'MainWindow.TableSorter.getComparator(int)': MainWindow/TableSorter.java:0: warning: assignment to final static field 'class$java$lang$Comparable' not in class initializer done ************* Using the 'managed' option I got a fail: ************ creating JFrame1-win.exe - processing jxl.jar - main compilation step C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/JavaCompilerTempqzfzgd.out/MainWindow/MainList.java:25: error: Class or interface 'swingwtx.swing.ProgressMonitorInputStream' not found in import. import swingwtx.swing.ProgressMonitorInputStream; ^ C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/JavaCompilerTempqzfzgd.out/MainWindow/MultiHighlight.java:20: error: Class or interface 'swingwtx.swing.text.Highlighter' not found in import. import swingwtx.swing.text.Highlighter; ^ 2 errors failed... *********** Any ideas would be greatly appreciated. Best Regards Joe ____________________________________________________ On Yahoo!7 Break a world record with Total Girl's Worlds Largest Slumber Party http://www.totalgirl.com.au/slumberparty |
From: Marco T. <mt...@gm...> - 2006-09-20 07:20:37
|
Hello Joe Joe Osborne wrote: > I am trying to compile a jar I created using Netbeans > 5.5 and JDK 1.5. > > It uses Swing components available in Netbeans. One of > them is "org.jdesktop.layout.GroupLayout". I > discovered that the compiler uses swingWT and may not > have GroupLayout in it's library because I get a > 'class file not found' error. Read the FAQ, second question: http://javacompiler.mtsystems.ch/frame_faq.html And check the archives as well. There were some AWT/Swing disucssions. Basically, you could summarize it like this: - swingWT is (at least in my opinion) useless out of the box. You've to work on it for your project. No one does, so there's no progress. - GNU classpath AWT/Swing is probably much better, but doesn't work on windows So, if it's a good GUI you wan't, go with SWT. It better protects the GUI thread and looks better (more native) than Swing and AWT anyway (in my opinion). > I am also using Java Media Framework from Sun > (JMF2.1.1e) to play sound. Then you've to compile that into the executable too... > After I redesign my project with swingWT will I > discover that javaCompiler will not compile my project > because it doesn't support JMF? I don't know if JMF compiles. I never used JMF for real applications because its too unstable for me. Instead, I wrapped mplayer into my app ;-) Create a little command line application that does some "hello world" JMF stuff and try to compile it. As I said, you've to compile JMF too because it's an external library... > Can I use the Sun source for JMF to compile to > overcome this? If it's nothing more than some jars and native libs, shure. > Also maybe I can get away with just replacing > GroupLayout - will javaCompiler accept the other Swing > layouts like GridBag, Grid, Border, Box etc? Some of them, yes. But don't expect too much from swingWT. The best thing - as I said -is to write your GUIs in SWT. Actually I'm thinking about removing swingWT from the next version. > How can I find a list of Swing components that have > been mapped to the SwingWT library? Check resources/swingWT-0.87/swingwt-all.jar. Version 0.88 is out by now. But I didn't find better compatibility with it. Marco |
From: Joe O. <joe...@ya...> - 2006-09-20 07:00:25
|
I am trying to compile a jar I created using Netbeans 5.5 and JDK 1.5. It uses Swing components available in Netbeans. One of them is "org.jdesktop.layout.GroupLayout". I discovered that the compiler uses swingWT and may not have GroupLayout in it's library because I get a 'class file not found' error. I am also using Java Media Framework from Sun (JMF2.1.1e) to play sound. After I redesign my project with swingWT will I discover that javaCompiler will not compile my project because it doesn't support JMF? Can I use the Sun source for JMF to compile to overcome this? Also maybe I can get away with just replacing GroupLayout - will javaCompiler accept the other Swing layouts like GridBag, Grid, Border, Box etc? How can I find a list of Swing components that have been mapped to the SwingWT library? ____________________________________________________ On Yahoo!7 Photos: Unlimited free storage keep all your photos in one place! http://au.photos.yahoo.com |
From: <r.b...@co...> - 2006-09-17 20:48:27
|
Jesper Juul wrote: > I am having problems getting a DLL to work with JavaCompiler 0.7 and=20 > 0.8, and I wonder if somebody has a suggestion for how to get it to wor= k. >=20 > I hope someone has an idea of whether this is a known gcj problem, or=20 > I am missing some parameter to make it work. >=20 > **** The problem: ***** >=20 > The actual program I am working on is too big to post here, but I=20 > have made a very simple test case with two classes, Test and TestB: >=20 >=20 > public class Test > { >=20 > public static void main(String args[]) > { > TestB t=3Dnew TestB(); > t.hi(); > } > } >=20 > * >=20 > public class TestB > { >=20 > public void hi() > { > System.out.println("Yes!"); > } > } >=20 > * > I compile them like this > gcj -shared -I. TestB.java -o TestB.dll > gcj -I. Test.java TestB.dll --main=3DTest -o Test.exe >=20 > Compilation gives this info/warning: > Info: resolving TestB::class$ by linking to __imp___ZN5TestB6class= $E (auto > import) >=20 > If I run the Test.exe program, I get this error (JavaCompiler 0.7) > Exception in thread "main" java.lang.NoClassDefFoundError: TestB > at 0x562408(Unknown Source) >=20 > For JavaCompiler 0.8: > Exception in thread "main" java.lang.NoClassDefFoundError: TestB > at java.lang.Class.initializeClass(Test.exe) > Caused by: java.lang.NullPointerException > <<No stacktrace available>> Shared libraries are not supported in gcj 4.x for Windows. It's a long standing problem, you can see many messages about it in the g= cj list and also some info at http://www.thisiscool.com/gcc_mingw.htm --=20 Ren=E9 Berber |
From: Marco T. <mt...@gm...> - 2006-09-17 18:31:24
|
Hey Jesper Sorry, I never created dlls myself. You should ask the gcj guys directly... Marco Jesper Juul / Soup Games wrote: > Hi > > I am having problems getting a DLL to work with JavaCompiler 0.7 and > 0.8, and I wonder if somebody has a suggestion for how to get it to work. > > I hope someone has an idea of whether this is a known gcj problem, or > I am missing some parameter to make it work. > > Thanks! > -Jesper > > **** The problem: ***** > > The actual program I am working on is too big to post here, but I > have made a very simple test case with two classes, Test and TestB: > > > public class Test > { > > public static void main(String args[]) > { > TestB t=new TestB(); > t.hi(); > } > } > > * > > public class TestB > { > > public void hi() > { > System.out.println("Yes!"); > } > } > > * > I compile them like this > gcj -shared -I. TestB.java -o TestB.dll > gcj -I. Test.java TestB.dll --main=Test -o Test.exe > > Compilation gives this info/warning: > Info: resolving TestB::class$ by linking to __imp___ZN5TestB6class$E (auto > import) > > If I run the Test.exe program, I get this error (JavaCompiler 0.7) > Exception in thread "main" java.lang.NoClassDefFoundError: TestB > at 0x562408(Unknown Source) > > For JavaCompiler 0.8: > Exception in thread "main" java.lang.NoClassDefFoundError: TestB > at java.lang.Class.initializeClass(Test.exe) > Caused by: java.lang.NullPointerException > <<No stacktrace available>> > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > javaCompiler-users mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/javacompiler-users > > |
From: Jesper J. / S. G. <je...@so...> - 2006-09-17 18:05:01
|
Hi I am having problems getting a DLL to work with JavaCompiler 0.7 and 0.8, and I wonder if somebody has a suggestion for how to get it to work. I hope someone has an idea of whether this is a known gcj problem, or I am missing some parameter to make it work. Thanks! -Jesper **** The problem: ***** The actual program I am working on is too big to post here, but I have made a very simple test case with two classes, Test and TestB: public class Test { public static void main(String args[]) { TestB t=new TestB(); t.hi(); } } * public class TestB { public void hi() { System.out.println("Yes!"); } } * I compile them like this gcj -shared -I. TestB.java -o TestB.dll gcj -I. Test.java TestB.dll --main=Test -o Test.exe Compilation gives this info/warning: Info: resolving TestB::class$ by linking to __imp___ZN5TestB6class$E (auto import) If I run the Test.exe program, I get this error (JavaCompiler 0.7) Exception in thread "main" java.lang.NoClassDefFoundError: TestB at 0x562408(Unknown Source) For JavaCompiler 0.8: Exception in thread "main" java.lang.NoClassDefFoundError: TestB at java.lang.Class.initializeClass(Test.exe) Caused by: java.lang.NullPointerException <<No stacktrace available>> |
From: <r.b...@co...> - 2006-09-14 19:38:55
|
Igor.Vatolkin: >> Hello Marco, >> >> I use the 0.8 version of JavaCompiler. I tried to minimize the example= >> that leads to exception. Starting "ReadLines.exe fftshorttmp2.dat 16" >> worked but "ReadLines.exe fftshorttmp2.dat 17" not any more.=20 >> But after I copied the files from my network drive to C: the program=20 >> worked without exceptions!! However it didn't work on C: with another = =2Edat and the >> number of lines about 2000 (as described in my first email).=20 >> One aspect which could probably explain the first test is that the net= work >> connection from my pc is slowly. But why doesn't it work from C: with >> greater line number then? I use Java 1.4 and Windows XP SP2.=20 >> If I start the ReadLines from Eclipse (under Linux) no problems occur.= =20 >> It seems for me that Windows may read the data too slow on my pc, but = then I would >> expect not "NullPointerException" but "OutOfTime" or anything else.. >> Maybe you can try to start ReadLines.exe once with the=20 >> attached file and tell me if it works fine on your system? It runs fine(*) on my PC, the NullPounterException only appears if I try = to read more lines than the file has. (*) But there is something strange going on here, if you use Windows Task= Manager to monitor CPU and memory used there is a big change between rea= ding 16 and reading 17 lines, both the CPU and memory reading jump. Also= between the first and subsequent runs, the executable is 2.4M (and I hav= e 1G of RAM) so this is also strange. I tried to test with a larger file, 2500 lines with the same second value= , and the program flies through that file with no big CPU & memory jump. = So my guess is that the java tokenizer is the one causing strange behavi= our (at first I thought it was the file size, or the DOS terminators CR-L= F, but that was not it). I'm not sure where the problem (causing the jump in memory used) is; but = it's not the java compiler, must be a library. --=20 Ren=E9 Berber |
From: Marco T. <mt...@gm...> - 2006-09-14 19:23:25
|
ext...@no... wrote: > Hello Marco, > > I use the 0.8 version of JavaCompiler. I tried to minimize the example > that leads to exception. Starting "ReadLines.exe fftshorttmp2.dat 16" > worked but "ReadLines.exe fftshorttmp2.dat 17" not any more. But after I > copied the files from my network drive to C: the program worked without > exceptions!! However it didn't work on C: with another .dat and the > number of lines about 2000 (as described in my first email). Can you send me the source code and the .dat? Please minimize the source code. I can't help you if I can't reproduce the problem... Marco > One aspect > which could probably explain the first test is that the network > connection from my pc is slowly. But why doesn't it work from C: with > greater line number then? I use Java 1.4 and Windows XP SP2. If I start > the ReadLines from Eclipse (under Linux) no problems occur. It seems for > me that Windows may read the data too slow on my pc, but then I would > expect not "NullPointerException" but "OutOfTime" or anything else.. > Maybe you can try to start ReadLines.exe once with the attached file and > tell me if it works fine on your system? > > Greetings > Igor > >> -----Original Message----- >> From: jav...@li... >> [mailto:jav...@li...] On >> Behalf Of ext Marco Trudel >> Sent: Friday, 25. August 2006 17:09 >> To: A mailing list for general questions and discussions. >> Subject: Re: [javaCompiler-users] Error on reading data >> >> Hello Igor >> >> It works for me with JavaCompiler 0.8 on Windows with a >> textfile that has 3780 times the line "12.34 56.78". >> I uncomented the System.out.printlns and tried with 1000, 2000 >> and 3000. >> >> From your stacktrace, I assume you use an older version of >> JavaCompiler. Please update and try again. If you've the >> latest version and it (still) fails, please provide >> informations about your JavaCompiler settings, the OS and the textfile. >> It would be great if you could minimize the example that leads >> to the exception... >> >> >> regards >> Marco >> >> >> ext...@no... wrote: >>> Hello, >>> >>> I have a strange error using a program compiled with Java >> Compiler. My >>> code is quite easy and it should only read some data from a >> text file >>> which has two numbers on every line. The java code is: >>> >>> ------------------- >>> import java.io.FileReader; >>> import java.io.BufferedReader; >>> import java.util.StringTokenizer; >>> >>> public class ReadLines { >>> >>> public static void main(String[] args) { >>> double [] realInput = new double[new >>> Integer(args[1]).intValue()]; >>> double [] imaginaryInput = new double[new >>> Integer(args[1]).intValue()]; >>> >>> // Read the file >>> try { >>> FileReader fr = new FileReader(args[0]); >>> BufferedReader bf = new BufferedReader(fr); >>> >>> // Read the lines >>> for(int i=0;i<new Integer(args[1]).intValue();i++) { >>> // (1) System.out.println("i: " + i); >>> String value = new String(); >>> value = bf.readLine(); >>> StringTokenizer st = new >> StringTokenizer(value); >>> st.nextToken(); >>> // (2) System.out.println("Reading >> the value.."); >>> realInput[i] = new >>> Double(st.nextToken()).doubleValue(); >>> // (3) System.out.println("Value set: " + >>> realInput[i]); >>> imaginaryInput[i] = new >> Double(0).doubleValue(); >>> // (4) System.out.println("Zero set.."); >>> } >>> bf.close(); >>> fr.close(); >>> } catch(Exception e) { >>> e.printStackTrace(); >>> } >>> } >>> } >>> ------------------- >>> The program can be started with e.g. "ReadLines.exe data.txt 2000" >>> which means "read 2000 lines from data.txt" >>> If I start program from Eclipse, or jar, it works. >>> If I start exe made by JavaCompiler, I receive error message >>> "java.lang.NullPointerException <<No stacktrace >> available>>", but only >>> if the number of lines is above about 2000. For smaller line numbers >>> it works fine. >>> >>> BUT: if I uncomment the System.out.println - lines (which >> are numbered >>> in code as (1)-(4)), I receive no error messages and the >> program works >>> perfectly for line numbers above 2000!! >>> >>> Can you please help me and suggest the solution to this problem? >>> >>> Sincerely yours, >>> Igor Vatolkin >>> >>> PS I'm on vacation from the next Monday so maybe I will read the >>> answer(s) not until the mid of September! >>> >>> >>> >> ---------------------------------------------------------------------- >>> -- >>> >>> >> ---------------------------------------------------------------------- >>> --- Using Tomcat but need to do more? Need to support web services, >>> security? >>> Get stuff done quickly with pre-integrated technology to >> make your job >>> easier Download IBM WebSphere Application Server v.1.0.1 based on >>> Apache Geronimo >>> >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=1216 >>> 42 >>> >>> >>> >> ---------------------------------------------------------------------- >>> -- >>> >>> _______________________________________________ >>> javaCompiler-users mailing list >>> jav...@li... >>> https://lists.sourceforge.net/lists/listinfo/javacompiler-users >> --------------------------------------------------------------- >> ---------- >> Using Tomcat but need to do more? Need to support web >> services, security? >> Get stuff done quickly with pre-integrated technology to make >> your job easier Download IBM WebSphere Application Server >> v.1.0.1 based on Apache Geronimo >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&d >> at=121642 >> _______________________________________________ >> javaCompiler-users mailing list >> jav...@li... >> https://lists.sourceforge.net/lists/listinfo/javacompiler-users >> >> >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------- >> Using Tomcat but need to do more? Need to support web services, security? >> Get stuff done quickly with pre-integrated technology to make your job easier >> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> javaCompiler-users mailing list >> jav...@li... >> https://lists.sourceforge.net/lists/listinfo/javacompiler-users |
From: <ext...@no...> - 2006-09-14 13:16:40
|
Hello Marco, I use the 0.8 version of JavaCompiler. I tried to minimize the example that leads to exception. Starting "ReadLines.exe fftshorttmp2.dat 16" worked but "ReadLines.exe fftshorttmp2.dat 17" not any more. But after I copied the files from my network drive to C: the program worked without exceptions!! However it didn't work on C: with another .dat and the number of lines about 2000 (as described in my first email). One aspect which could probably explain the first test is that the network connection from my pc is slowly. But why doesn't it work from C: with greater line number then? I use Java 1.4 and Windows XP SP2. If I start the ReadLines from Eclipse (under Linux) no problems occur. It seems for me that Windows may read the data too slow on my pc, but then I would expect not "NullPointerException" but "OutOfTime" or anything else.. Maybe you can try to start ReadLines.exe once with the attached file and tell me if it works fine on your system? Greetings Igor >-----Original Message----- >From: jav...@li...=20 >[mailto:jav...@li...] On=20 >Behalf Of ext Marco Trudel >Sent: Friday, 25. August 2006 17:09 >To: A mailing list for general questions and discussions. >Subject: Re: [javaCompiler-users] Error on reading data > >Hello Igor > >It works for me with JavaCompiler 0.8 on Windows with a=20 >textfile that has 3780 times the line "12.34 56.78". >I uncomented the System.out.printlns and tried with 1000, 2000=20 >and 3000. > > From your stacktrace, I assume you use an older version of=20 >JavaCompiler. Please update and try again. If you've the=20 >latest version and it (still) fails, please provide=20 >informations about your JavaCompiler settings, the OS and the textfile. >It would be great if you could minimize the example that leads=20 >to the exception... > > >regards >Marco > > >ext...@no... wrote: >> Hello, >>=20 >> I have a strange error using a program compiled with Java=20 >Compiler. My=20 >> code is quite easy and it should only read some data from a=20 >text file=20 >> which has two numbers on every line. The java code is: >>=20 >> ------------------- >> import java.io.FileReader; >> import java.io.BufferedReader; >> import java.util.StringTokenizer; >>=20 >> public class ReadLines { >>=20 >> public static void main(String[] args) { >> double [] realInput =3D new double[new=20 >> Integer(args[1]).intValue()]; >> double [] imaginaryInput =3D new double[new=20 >> Integer(args[1]).intValue()]; >> =20 >> // Read the file >> try { >> FileReader fr =3D new FileReader(args[0]); >> BufferedReader bf =3D new BufferedReader(fr); >> =20 >> // Read the lines >> for(int i=3D0;i<new Integer(args[1]).intValue();i++) = { >> // (1) System.out.println("i: " + i); >> String value =3D new String(); >> value =3D bf.readLine(); >> StringTokenizer st =3D new=20 >StringTokenizer(value); >> st.nextToken(); >> // (2) System.out.println("Reading=20 >the value.."); >> realInput[i] =3D new=20 >> Double(st.nextToken()).doubleValue(); >> // (3) System.out.println("Value set: " +=20 >> realInput[i]); >> imaginaryInput[i] =3D new=20 >Double(0).doubleValue(); >> // (4) System.out.println("Zero set.."); >> } >> bf.close(); >> fr.close(); >> } catch(Exception e) { >> e.printStackTrace(); >> } >> } >> } >> ------------------- >> The program can be started with e.g. "ReadLines.exe data.txt 2000"=20 >> which means "read 2000 lines from data.txt" >> If I start program from Eclipse, or jar, it works. >> If I start exe made by JavaCompiler, I receive error message=20 >> "java.lang.NullPointerException <<No stacktrace=20 >available>>", but only=20 >> if the number of lines is above about 2000. For smaller line numbers=20 >> it works fine. >>=20 >> BUT: if I uncomment the System.out.println - lines (which=20 >are numbered=20 >> in code as (1)-(4)), I receive no error messages and the=20 >program works=20 >> perfectly for line numbers above 2000!! >>=20 >> Can you please help me and suggest the solution to this problem? >>=20 >> Sincerely yours, >> Igor Vatolkin >>=20 >> PS I'm on vacation from the next Monday so maybe I will read the >> answer(s) not until the mid of September! >>=20 >>=20 >>=20 >---------------------------------------------------------------------- >> -- >>=20 >>=20 >---------------------------------------------------------------------- >> --- Using Tomcat but need to do more? Need to support web services,=20 >> security? >> Get stuff done quickly with pre-integrated technology to=20 >make your job=20 >> easier Download IBM WebSphere Application Server v.1.0.1 based on=20 >> Apache Geronimo >>=20 >http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D= 1216 >> 42 >>=20 >>=20 >>=20 >---------------------------------------------------------------------- >> -- >>=20 >> _______________________________________________ >> javaCompiler-users mailing list >> jav...@li... >> https://lists.sourceforge.net/lists/listinfo/javacompiler-users > >--------------------------------------------------------------- >---------- >Using Tomcat but need to do more? Need to support web=20 >services, security? >Get stuff done quickly with pre-integrated technology to make=20 >your job easier Download IBM WebSphere Application Server=20 >v.1.0.1 based on Apache Geronimo >http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&d >at=3D121642 >_______________________________________________ >javaCompiler-users mailing list >jav...@li... >https://lists.sourceforge.net/lists/listinfo/javacompiler-users > |
From: Marco T. <mt...@gm...> - 2006-09-07 06:52:08
|
> Marco" > > I wasn't sure if it existed either for gcj but then I > manually compiled a program and it accepted the flag. > Right away I noticed the optimized binary was 2 mb > less than the non optimized one. What? But then you didn't strip, right? If I strip and upx my current project, it will get: - with no -O, 3.96 - with -O2, 3.84 (sometimes 3.94) - with -Os, 3.94 This are the best resulst. The binaries will not always have the same size. I guess upx is trying some random compressing methods... So, I think -O2 will be the best because it doesn't really affect the size but the performance will be really better... > The optimized binary > also performs nearly 300% quicker in parsing a 25k xml > document (from 1205 ms to 430ms). cool :-) > I think it would be nice to remove the xml stuff from > the binary in all situations since most people will > typically want to use their own xml parser. As far as > the AWT/Swing stuff, I believe what that guy at > thisiscool.com did was to compile different versions > of "libgcj". One with Swing/AWT stripped out and one > with that "SwingWT" library included. Here's a quote > from his site: "To integrate SwingWT, I first > surgically removed the GNU AWT and Swing sources from > the libgcj build (see noawt.diff in the patch list > below)." > Not sure how difficult it would be to do that. Yes, he removed AWT/Swing. But what he did doesn't work with gcj 4.2. If I've some time left, I'll try to do it myself... I'm really interested how much the binaries will shrink... 0.5mb? 1mb? That would be great... Marco |
From: Marco T. <mt...@gm...> - 2006-09-07 06:21:15
|
Ivan Ooi wrote: > wow.... means.... it able to execute anythings that in java class format > ? I don't know if a compiled executable is able to run a .java or .class file, but I would be surprised. But a compiled executable supports reflection within the executable and from shared libraries... Why don't you just try it? > Does it able to dynamically compile > jar files into dll? Who? gcj? what do you mean by dynamically? gcj can compile java code to shared libraries. But built executables don't (it's an executable, not a compiler). > Anybody successfully compile jdbc ? No... Just try it... There shouldn't be a problem. Marco |
From: Ivan O. <oli...@gm...> - 2006-09-07 00:54:24
|
wow.... means.... it able to execute anythings that in java class format ? Does it able to dynamically compile jar files into dll ? Anybody successfully compile jdbc ? Thanks On 9/7/06, Marco Trudel <mt...@gm...> wrote: > > Yes, it will... > > > > Ivan Ooi wrote: > > Hi, > > > > I just wonder will classLoader work in gcj ? > > > > Thanks > > > > > > ------------------------------------------------------------------------ > > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, > security? > > Get stuff done quickly with pre-integrated technology to make your job > easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > javaCompiler-users mailing list > > jav...@li... > > https://lists.sourceforge.net/lists/listinfo/javacompiler-users > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > javaCompiler-users mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/javacompiler-users > |
From: Marco T. <mt...@gm...> - 2006-09-06 18:07:57
|
Yes, it will... Ivan Ooi wrote: > Hi, > > I just wonder will classLoader work in gcj ? > > Thanks > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > ------------------------------------------------------------------------ > > _______________________________________________ > javaCompiler-users mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/javacompiler-users |
From: john s. <kmk...@ya...> - 2006-09-06 17:19:44
|
"john sonal wrote: > I have one more feature request... > > -> Add an optimization option. To do this you just > pass -O2 after each compile command. ie. gcj -c > blah.jar -O2 Crap. I looked that up, but it didn't seem to exist; so I didn't use it. Either I screw that up or it just wasn't there with GCJ 3.x. Thanks, I'll add that. > It usually makes a difference in binary size (smaller) Really? I have different experience. As higher the optimisation, as bigger the executables... Depends on the strengh of the optimisation. Anyway, it doesn't make big changes :-) What we really need is the ability to remove AWT/Swing and XML from the binaries when not needed. That would drastically reduce the binary size... > and makes a big difference in performance. Yes, -O2 should really have been there... Marco" I wasn't sure if it existed either for gcj but then I manually compiled a program and it accepted the flag. Right away I noticed the optimized binary was 2 mb less than the non optimized one. The optimized binary also performs nearly 300% quicker in parsing a 25k xml document (from 1205 ms to 430ms). About optimization and the binary size. According to gcc's site: "-O2: Optimize even more. GCC performs nearly all supported optimizations that do not involve a space-speed tradeoff." Based on that it would seem that binary size should not increase but if it does, only slightly. I had read somewhere else that -O2 usually shrinks the binary. -O3 on the other hand will make it bigger. There's also -Os which might be the best solution to use with GCJ: "Optimize for size. -Os enables all -O2 optimizations that do not typically increase code size. It also performs further optimizations designed to reduce code size." I haven't tried -Os yet. I'll do that today and see how much of a difference in binary size it makes. I think it would be nice to remove the xml stuff from the binary in all situations since most people will typically want to use their own xml parser. As far as the AWT/Swing stuff, I believe what that guy at thisiscool.com did was to compile different versions of "libgcj". One with Swing/AWT stripped out and one with that "SwingWT" library included. Here's a quote from his site: "To integrate SwingWT, I first surgically removed the GNU AWT and Swing sources from the libgcj build (see noawt.diff in the patch list below)." Not sure how difficult it would be to do that. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: Ivan O. <oli...@gm...> - 2006-09-06 17:10:25
|
Hi, I just wonder will classLoader work in gcj ? Thanks |
From: john s. <kmk...@ya...> - 2006-09-06 16:30:13
|
" john sonal wrote: > So I finally figured out the problem I was having with > compiling with xml parsers (compiler was throwing > "multiple definition errors"). It seems that there is > a quick workaround for this problem that works > perfectly. If you pass -Wl,--allow-multiple-definition > to the compiler, the program will compile successfully > and the specified xml parser* will be used at program > execution. > > * Ex. SAXBuilder builder = new > SAXBuilder("com.bluecast.xml.Piccolo"); Ah, ok. Didn't know about the "--allow-multiple-definition" flag. There are so many of them... > My feature request is to add a check box to the final > screen before compilation, that if checked, will pass > "-Wl,--allow-multiple-definition" to the compiler. If > not this, than maybe just the ability to pass along > any other parameters the user wants. I'm sorry if this > already exists. I'll provide an input box to enter own flags and arguments for gcj. There will be a release at the latest around middle of october. Marco" I'm sure you know this already but that flag above should only be included in the final compiliation step. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: Marco T. <mt...@gm...> - 2006-09-06 08:05:27
|
john sonal wrote: > I have one more feature request... > > -> Add an optimization option. To do this you just > pass -O2 after each compile command. ie. gcj -c > blah.jar -O2 Crap. I looked that up, but it didn't seem to exist; so I didn't use it. Either I screw that up or it just wasn't there with GCJ 3.x. Thanks, I'll add that. > It usually makes a difference in binary size (smaller) Really? I have different experience. As higher the optimisation, as bigger the executables... Depends on the strengh of the optimisation. Anyway, it doesn't make big changes :-) What we really need is the ability to remove AWT/Swing and XML from the binaries when not needed. That would drastically reduce the binary size... > and makes a big difference in performance. Yes, -O2 should really have been there... Marco |
From: Marco T. <mt...@gm...> - 2006-09-06 07:02:52
|
john sonal wrote: > So I finally figured out the problem I was having with > compiling with xml parsers (compiler was throwing > "multiple definition errors"). It seems that there is > a quick workaround for this problem that works > perfectly. If you pass -Wl,--allow-multiple-definition > to the compiler, the program will compile successfully > and the specified xml parser* will be used at program > execution. > > * Ex. SAXBuilder builder = new > SAXBuilder("com.bluecast.xml.Piccolo"); Ah, ok. Didn't know about the "--allow-multiple-definition" flag. There are so many of them... > My feature request is to add a check box to the final > screen before compilation, that if checked, will pass > "-Wl,--allow-multiple-definition" to the compiler. If > not this, than maybe just the ability to pass along > any other parameters the user wants. I'm sorry if this > already exists. I'll provide an input box to enter own flags and arguments for gcj. There will be a release at the latest around middle of october. Marco |
From: john s. <kmk...@ya...> - 2006-09-06 04:16:21
|
I have one more feature request... -> Add an optimization option. To do this you just pass -O2 after each compile command. ie. gcj -c blah.jar -O2 It usually makes a difference in binary size (smaller) and makes a big difference in performance. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: john s. <kmk...@ya...> - 2006-09-05 19:38:41
|
So I finally figured out the problem I was having with compiling with xml parsers (compiler was throwing "multiple definition errors"). It seems that there is a quick workaround for this problem that works perfectly. If you pass -Wl,--allow-multiple-definition to the compiler, the program will compile successfully and the specified xml parser* will be used at program execution. * Ex. SAXBuilder builder = new SAXBuilder("com.bluecast.xml.Piccolo"); My feature request is to add a check box to the final screen before compilation, that if checked, will pass "-Wl,--allow-multiple-definition" to the compiler. If not this, than maybe just the ability to pass along any other parameters the user wants. I'm sorry if this already exists. Anyway, keep up the good work Marco. It's much appreciated. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |