Description of problem: The java-gcj-compat java wrapper does not pass vm arguments with spaces (surrounded by quotes) to gij properly. It appears like the quotes are stripped causing launching problems with gij. Version-Release number of selected component (if applicable): java-1.4.2-gcj-compat-1.4.2.0-40jpp_7rh java-gcj-compat-1.0.19 How reproducible: Every time. Steps to Reproduce: 1. For a given java app SimpleTest.class 2. try launching App using the command: 3. java -DmyArg="Foo Bar" SimpleTest Actual results: [jeff@venture dev]$ /usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre/bin/java -DmyArg="Foo Bar" SimpleTest Exception in thread "main" java.lang.NoClassDefFoundError: Bar at gnu.java.lang.MainThread.run() (/usr/local/lib/libgcj.so.6.0.0) Caused by: java.lang.ClassNotFoundException: Bar not found in gnu.gcj.runtime.SystemClassLoader{urls=[], parent=gnu.gcj.runtime.VMClassLoader{urls=[core:/], parent=null}} at java.net.URLClassLoader.findClass(java.lang.String) (/usr/local/lib/libgcj.so.6.0.0) at java.lang.ClassLoader.loadClass(java.lang.String, boolean) (/usr/local/lib/libgcj.so.6.0.0) at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/local/lib/libgcj.so.6.0.0) at gnu.java.lang.MainThread.run() (/usr/local/lib/libgcj.so.6.0.0) Expected results: SimpleTest should run properly, with the system property myArg set to "Foo Bar". Additional info: I compiled java-gcj-compat-1.0.19 myself rather than installing from rpm, so it's quite possible that I've screwed something up. Please let me know if this is reproducible.
Created attachment 112639 [details] Simple test class
It looks like FC4 Test 1 is using the package java-1.4.2-gcj-compat-1.4.2.0-40jpp_7rh whereas FC3 used the working version java-1.4.2-gcj-compat-1.4.2.0-11jpp Comparing these two, it appears the problematic line in java.in in version 40jpp_7rh is line 47: vm_params="$vm_params $1" In version 11jpp, the equivalent (working) line is 32: params="$params \"`echo $1 |sed -e 's,",\\\\",g'`\""
I committed a patch to gcc CVS Friday that makes gij command-line compatible with the java command. When that patch lands in the Rawhide gcc rpms we'll be able to remove this wrapper script and symlink java directly to gij.
Fixed in Rawhide.