As you point out, yes H2 is on *my* classpath and it is able to see com.sun.tools.javac.Main (otherwise we'd see no compiler output).
IIUC the problem is really the classpath given to com.sun.tools.javac.Main. Or most likely the lack thereof. I dont think calls to com.sun.tools.javac.Main inherit the classpath of the caller (aside maybe from any classpath set as environmental variables). I am using the Oracle Java 7 JDK for Linux. On Tuesday, June 26, 2012 12:18:28 PM UTC-5, Thomas Mueller wrote: > > Hi, > > I'm not sure, but I guess it's a JVM / classpath problem. Which JVM do you > use? > > The database tries to compile the class using the class > "com.sun.tools.javac.Main" if available (which means the H2 jar file is > most likely in the classpath). If it is not available, then it will try > using a new process, "javac -sourcepath ... ", in which case the H2 jar > file most likely isn't available. I guess it should use > javax.tools.JavaCompiler if available... > > Of could you could use the "old style" user defined function, in which > case the user defined function needs to be in the classpath of the database > engine: > > create alias findUser for "com.acme.udf.FindUser" > > Regards, > Thomas > > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To view this discussion on the web visit https://groups.google.com/d/msg/h2-database/-/URS2aCoS1osJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
