I have an unusual (although not unheard of) situation where I need to pass a parameter to a Java program that is running under wine. My command looks something like: wine ../../Java/j2re1.4.1_01/bin/java.exe \ -classpath $LOCALCLASSPATH com.jet.jdbc.server.JETProxyServer \ -config $CONFIG_FILE Note that the "-classpath" parm should be passed to java.exe and the "-config" parm should be passed to the JETProxyServer Java program. Problem is that both parameters get passed to the java.exe. It appears that the way wine passes program arguments has been refactored so that this may no longer possible. I am using CVS development version 20040505. Note that I know this was possible in earlier versions of Wine. I am following an excellent HowTo by Florian Wunderlich (http://www.winehq.org/hypermail/wine-devel/2004/04/0804.html) on how to get Jdbc/Odbc/MSAccess working on Linux. TIA.
On Thu, 10 Jun 2004 08:57:25 -0400 (EDT), you wrote:> I have an unusual (although not unheard of) situation where I need to pass > a parameter to a Java program that is running under wine. My command > looks something like: > > wine ../../Java/j2re1.4.1_01/bin/java.exe \ > -classpath $LOCALCLASSPATH com.jet.jdbc.server.JETProxyServer \ > -config $CONFIG_FILE > > Note that the "-classpath" parm should be passed to java.exe and the > "-config" parm should be passed to the JETProxyServer Java program. > Problem is that both parameters get passed to the java.exe.That is how it should be. Actually even JETProxyServer is for wine just a parameter to pass to the java.exe.> > It appears that the way wine passes program arguments has been refactored > so that this may no longer possible. I am using CVS development version > 20040505.The recent change is that the '--' is not required and not allowed anymore. But you already seem to have figured that out. Rein. -- Rein Klazes rklazes@xs4all.nl
On Fri, 11 Jun 2004 08:29:34 -0400 (EDT), you wrote:> >> > >> If I take wine out of the picture and call Java using the following > >> command it works properly: > >> > >> java -cp $LOCALCLASSPATH com.jet.jdbc.server.JETProxyServer -config > >> $CONFIG_FILE > >> > ... > > > > Things would be nicely explained if LOCALCLASSPATH is not set, or if it > > contains bad stuff like spaces. Did you check that? For instance try the > > command line with "wine" replaced by "echo". > > I have verified the environment vars and even replaced them with actual > values to no avail. Note that "Unrecognized option: -config" is > definately coming from java.exe.Sure. And the question is why it complains about it instead of silently passing it to com.jet.jdbc.server.JETProxyServer. Is it possible hat there is something wrong with that parameter or the processing of that parameter? In the end you may have to debug this thing. Run wine with "WINEDEBUG=+relay wine ..."; direct the output to a file; load it in an editor and look for the first occurrence of "Unrecognized option:"; from that point upward look what the program is doing and reasons for failure. Rein. -- Rein Klazes rklazes@xs4all.nl
> > Sure. And the question is why it complains about it instead of silently > passing it to com.jet.jdbc.server.JETProxyServer. Is it possible hat > there is something wrong with that parameter or the processing of that > parameter? > > In the end you may have to debug this thing. Run wine with > "WINEDEBUG=+relay wine ..."; direct the output to a file; load it in an > editor and look for the first occurrence of "Unrecognized option:"; from > that point upward look what the program is doing and reasons for > failure. >I did this, but frankly cannot make much sense of the output. I do get the following: 002a:Ret ntdll.RtlEnterCriticalSection() retval=00000000 ret=406c24b6 002a:Call kernel32.WriteFile(0000000c,406f5040,00000048,4066fbc0,00000000) ret=406c1f1d 002a:Call ntdll.NtWriteFile(0000000c,00000000,00000000,00000000,4066f698,406f5040,00000048,00000000,00000000) ret=4049743c Unrecognized option: -config Could not create the Java virtual machine. I am pretty convinced this is a recently introduced problem with how wine processes command-line arguments. The following posting indicates this used to work on wine20040309. http://www.winehq.org/hypermail/wine-devel/2004/04/0804.html Any ideas? Thanks -John
On Fri, 11 Jun 2004 19:45:44 -0400 (EDT), you wrote:> I did this, but frankly cannot make much sense of the output. I do get the > following:[...] Expect to search some hundreds of lines preceding this.> I am pretty convinced this is a recently introduced problem with how wine > processes command-line arguments.There seems NOT to be a problem with commandline arguments.> The following posting indicates this > used to work on wine20040309.Did you try with wine20040309? Rein. -- Rein Klazes rklazes@xs4all.nl