Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when run mkit.bat #39

Open
tigerhaolu727 opened this issue Jul 19, 2017 · 3 comments
Open

Exception when run mkit.bat #39

tigerhaolu727 opened this issue Jul 19, 2017 · 3 comments

Comments

@tigerhaolu727
Copy link

I am using ant 1.10.1 to run mkit.bat. I got the following error. Any hint will be appriciated

`[ant-antlr3] ANTLR Parser Generator Version 3.2 Sep 23, 2009 12:02:23
[ant-antlr3] D:\Bitbucket\cs2j-master\CSharpTranslator\src\CSharpParser\cs.g
[ant-antlr3] error(10): internal error: Can't get property indirectDelegates using method get/isIndirectDelegates from org.antlr.tool.Grammar instance : java.lang.NullPointerException
[ant-antlr3] java.util.Objects.requireNonNull(Objects.java:203)
[ant-antlr3] java.util.ArrayList.removeAll(ArrayList.java:689)
[ant-antlr3] org.antlr.tool.CompositeGrammar.getIndirectDelegates(CompositeGrammar.java:222)
[ant-antlr3] org.antlr.tool.Grammar.getIndirectDelegates(Grammar.java:2620)
[ant-antlr3] sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ant-antlr3] sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ant-antlr3] sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ant-antlr3] java.lang.reflect.Method.invoke(Method.java:498)
[ant-antlr3] org.antlr.stringtemplate.language.ASTExpr.invokeMethod(ASTExpr.java:564)
[ant-antlr3] org.antlr.stringtemplate.language.ASTExpr.rawGetObjectProperty(ASTExpr.java:515)
[ant-antlr3] org.antlr.stringtemplate.language.ASTExpr.getObjectProperty(ASTExpr.java:417)
[ant-antlr3] org.antlr.stringtemplate.language.ActionEvaluator.attribute(ActionEvaluator.java:351)
[ant-antlr3] org.antlr.stringtemplate.language.ActionEvaluator.expr(ActionEvaluator.java:136)
[ant-antlr3] org.antlr.stringtemplate.language.ActionEvaluator.templateApplication(ActionEvaluator.java:216)
[ant-antlr3] org.antlr.stringtemplate.language.ActionEvaluator.expr(ActionEvaluator.java:126)
[ant-antlr3] org.antlr.stringtemplate.language.ActionEvaluator.action(ActionEvaluator.java:84)
[ant-antlr3] org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:149)
[ant-antlr3] org.antlr.stringtemplate.StringTemplate.write(StringTemplate.java:705)
[ant-antlr3] org.antlr.stringtemplate.language.ASTExpr.writeTemplate(ASTExpr.java:750)
[ant-antlr3] org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:680)
[ant-antlr3] org.antlr.stringtemplate.language.ASTExpr.writeAttribute(ASTExpr.java:660)
[ant-antlr3] org.antlr.stringtemplate.language.ActionEvaluator.action(ActionEvaluator.java:86)
[ant-antlr3] org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:149)
[ant-antlr3] org.antlr.stringtemplate.StringTemplate.write(StringTemplate.java:705)
[ant-antlr3] org.antlr.stringtemplate.language.ASTExpr.writeTemplate(ASTExpr.java:750)
[ant-antlr3] org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:680)
[ant-antlr3] org.antlr.stringtemplate.language.ASTExpr.writeAttribute(ASTExpr.java:660)
[ant-antlr3] org.antlr.stringtemplate.language.ActionEvaluator.action(ActionEvaluator.java:86)
[ant-antlr3] org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:149)
[ant-antlr3] org.antlr.stringtemplate.StringTemplate.write(StringTemplate.java:705)
[ant-antlr3] org.antlr.stringtemplate.language.ASTExpr.writeTemplate(ASTExpr.java:750)
[ant-antlr3] org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:680)
[ant-antlr3] org.antlr.stringtemplate.language.ASTExpr.writeAttribute(ASTExpr.java:660)
[ant-antlr3] org.antlr.stringtemplate.language.ActionEvaluator.action(ActionEvaluator.java:86)
[ant-antlr3] org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:149)
[ant-antlr3] org.antlr.stringtemplate.StringTemplate.write(StringTemplate.java:705)
[ant-antlr3] org.antlr.stringtemplate.language.ASTExpr.writeTemplate(ASTExpr.java:750)
[ant-antlr3] org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:680)
[ant-antlr3] org.antlr.stringtemplate.language.ASTExpr.writeAttribute(ASTExpr.java:660)
[ant-antlr3] org.antlr.stringtemplate.language.ActionEvaluator.action(ActionEvaluator.java:86)
[ant-antlr3] org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:149)
[ant-antlr3] org.antlr.stringtemplate.StringTemplate.write(StringTemplate.java:705)
[ant-antlr3] org.antlr.codegen.CodeGenerator.write(CodeGenerator.java:1281)
[ant-antlr3] org.antlr.codegen.Target.genRecognizerFile(Target.java:94)
[ant-antlr3] org.antlr.codegen.CodeGenerator.genRecognizer(CodeGenerator.java:466)
[ant-antlr3] org.antlr.Tool.generateRecognizer(Tool.java:641)
[ant-antlr3] org.antlr.Tool.process(Tool.java:454)
[ant-antlr3] org.antlr.Tool.main(Tool.java:91)

BUILD FAILED
D:\Bitbucket\cs2j-master\CSharpTranslator\build\build.xml:174: ANTLR returned: 1

Total time: 4 seconds`

@lafleurh
Copy link

I was having a lot of trouble running the tool, but I switched my JDK to 1.7 and that seemed to allow everything to run.

@aelio
Copy link

aelio commented May 29, 2024

Where do you switch? I cant find any jdk reference in build project and I have no system java installed

@aelio
Copy link

aelio commented May 29, 2024

Ok i find out by myself.. java comes from JAVA_HOME also there is another thing- msbuild.exe is referenced without drive letter, so the build won't run on drives other than C:/.
To fix this, append windows drive letter in CSharpTranslator\build\build.properties :
win.msbuild.dir=C:/WINDOWS/Microsoft.NET/Framework/${win.net.number}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants