Is Jni4Net support Groovy?

23 views
Skip to first unread message

Alon

unread,
Aug 7, 2018, 11:19:51 AM8/7/18
to jni4net
Is Jni4Net support Groovy?
I get the below error when trying to build using a very basic Groovy Class

proxygen.exe .\InJars\MyGroovyCalc.jar -wd outlib -cp .\InJars\groovy-all-2.5.0.jar;.\InJars\ivy-2.4.0.jar
jni4net.proxygen - Copyright (C) 2009 Pavel Savara - licensed under GPLv3
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
will generate CLR groovyclass
will generate CLR package1.groovycalc
proxygen done

C:\dev\Jni4Net\CSharp\SampleGroovy\ProxyGen>cd C:\dev\Jni4Net\CSharp\SampleGroovy\ProxyGen\outlib

C:\dev\Jni4Net\CSharp\SampleGroovy\ProxyGen\outlib>build.cmd
compile classes
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
jvm\GroovyClass_.java:19: error: illegal start of expression
        return .GroovyClass_.staticType;
               ^
jvm\GroovyClass_.java:19: error: not a statement
        return .GroovyClass_.staticType;
                            ^
jvm\GroovyClass_.java:23: error: illegal start of expression
        .GroovyClass_.staticType = staticType;
        ^
3 errors

My Groovy class is:
package package1

class GroovyCalc {

public int addInt(int a, int b){
return a+b;
}
public String getMessage(){
return "Hello from Groovy Class";
}
}


Alon

unread,
Aug 7, 2018, 11:19:51 AM8/7/18
to jni4net

Hi, I am trying to generate a DLL from a very simple Groove code that been exported to Java JAR file

After executing Proxygen I get the below error when running Build.bat file

 

C:\dev\Jni4Net\CSharp\SampleGroovy\ProxyGen>proxygen.exe .\InJars\MyGroovyCalc.jar -wd outlib -cp .\InJars\groovy-all-2.5.0.jar;.\InJars\ivy-2.4.0.jar

jni4net.proxygen - Copyright (C) 2009 Pavel Savara - licensed under GPLv3

Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true

will generate CLR groovyclass

will generate CLR package1.groovycalc

proxygen done

 

C:\dev\Jni4Net\CSharp\SampleGroovy\ProxyGen>cd C:\dev\Jni4Net\CSharp\SampleGroovy\ProxyGen\outlib

 

C:\dev\Jni4Net\CSharp\SampleGroovy\ProxyGen\outlib>build.cmd

compile classes

Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true

jvm\GroovyClass_.java:19: error: illegal start of expression

        return .GroovyClass_.staticType;

               ^

jvm\GroovyClass_.java:19: error: not a statement

        return .GroovyClass_.staticType;

                            ^

jvm\GroovyClass_.java:23: error: illegal start of expression

        .GroovyClass_.staticType = staticType;

        ^

3 errors

Any help is more than welcome




Any help is more than welcome

Groovy.PNG

Alon Dura

unread,
Aug 9, 2018, 6:05:13 AM8/9/18
to jni...@googlegroups.com
Hi, You may drop this thread as I found out the solution by now...

Thanks

--
--
You received this message because you are subscribed to jni...@googlegroups.com
http://groups.google.com/group/jni4net?hl=en-GB?hl=en-GB
http://jni4net.sf.net/

---
You received this message because you are subscribed to the Google Groups "jni4net" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jni4net+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages