From: <hka...@go...> - 2011-04-28 08:27:02
|
Hello Arno, currently I am again struggeling with xmlvm. I gived the xmlvm now the second try and I am falling again... My goal: I just want to get C/C++ code from Java. I cannot even get a simple example running. 1. I checked out trunk. 2. I created a test class, a pretty, pretty simple one Here my test class: package test; public class HelloWorld { public static void main(String[] args) { System.out.println("hello world"); } } 3. I created a launch config Here my launch params: --in=${workspace_loc:xmlvm-test}/bin --out=${workspace_loc:xmlvm-test-cpp}/generated/posix/src --target=posix --app-name=xmlvm-test now I get: Exception in thread "main" java.lang.NullPointerException at org.xmlvm.proc.CompilationBundle.addResources(CompilationBundle.java:44) at org.xmlvm.proc.out.RecursiveResourceLoadingProcess.processPhase1(RecursiveResourceLoadingProcess.java:63) at org.xmlvm.proc.XmlvmProcessImpl.forwardOrProcessPhase1(XmlvmProcessImpl.java:209) at org.xmlvm.proc.XmlvmProcessImpl.forwardOrProcessPhase1(XmlvmProcessImpl.java:206) at org.xmlvm.proc.XmlvmProcessImpl.forwardOrProcessPhase1(XmlvmProcessImpl.java:206) at org.xmlvm.proc.XmlvmProcessImpl.forwardOrProcessPhase1(XmlvmProcessImpl.java:206) at org.xmlvm.proc.XmlvmProcessImpl.forwardOrProcessPhase1(XmlvmProcessImpl.java:206) at org.xmlvm.proc.XmlvmProcessImpl.forwardOrProcessPhase1(XmlvmProcessImpl.java:206) at org.xmlvm.proc.XmlvmProcessor.process(XmlvmProcessor.java:157) at org.xmlvm.proc.XmlvmProcessor.process(XmlvmProcessor.java:137) at org.xmlvm.Main.main(Main.java:53) 4. okay try the c target here my launch params --in=${workspace_loc:xmlvm-test}/bin --out=${workspace_loc:xmlvm-test-cpp}/generated/posix/src --target=c --app-name=xmlvm-test 5. now I get [04/28/11 10:23:51.892] ERROR: Vtable for java.io.PrintStream not found! Can you imaging, that is really frustrating trying something and the simpliest things aren't running? Please provide simple examples AND a running launch config. I think this would do a easy kick start for users like me. And I can tell you I have mulitple years of experience in programming. But I have not the time to struggle around to get the simpliest things - from user view point - running. Currently I am evaluating, if xmlvm could be a possible "invest" for my team. But in that project state of xmlvm... Maybe it is a missing documentation, maybe it is the missing simple example or maybe both. But I am sure, if you just invest 30 min of your current effort in the place to get new users started, new users wouldn't turn around and giving up so fast. So hopefully the developers of this list would here my crying and try to fix the issues. And maybe you should freeze a running version by tagging/branching or providing a zip/tag.gz for the users. best regards, Hans On 04/07/2011 09:32 PM, Arno Puder wrote: > unfortunately the documentation is out of sync with the actual > implementation. The cpp target does not exist anymore. We are working on > adding a target for C (which is a subset of C++). If you select > --target=c, you will get portable C code. If you select --target=posix, > you get a ready to use Makefile plus all dependent classes. > > Arno > > > On 4/7/11 12:04 PM, hka...@go... wrote: >> Hello list, >> >> sorry new try (hopefully without html-tags). >> >> today I did my first steps with XMLVM, but I failed completely. I tried >> to run an crosscompile from java (class) to C++. >> So please help me, just only to start a simple Hello World cross compile! >> >> What I did: >> - I checked out the trunk >> - started eclipse >> - created a own project xmlvmDemoTests >> - create a test class in the project >> *package*com.dummy.xmlvm.demo;** >> * public**class*Test { >> *public**static**void*main(String[] args) { >> System./out/.println("hello world"); >> } >> } >> - created a launch configuration with: >> project=xmlvm >> Main class=org.xmlvm.Main >> Program arguments=--debug=all >> --in=${project_loc:/xmlvmDemoTests}/bin/ >> --out=${project_loc:/xmlvmDemoTests}/xmlvm-gen --target=cpp >> >> I started the launch config and now I get cpp is an unkown target??? But >> the documentation says: |cpp|: The input files are cross-compiled to C++. >> >> - okay I do not give up so easily, now I tried to crosscompile against >> XMLVMjvm. Changed launch configuration programm arguments to: >> Program arguments=--debug=all >> --in=${project_loc:/xmlvmDemoTests}/bin/ >> --out=${project_loc:/xmlvmDemoTests}/xmlvm-gen --target=jvm >> >> Now I get: Could not create target process for target JVM. But the >> documentations says: jvm: The input files are cross-compiled to XMLVMJVM. >> >> - okay even now I do not give up easily, I tried to crosscompile against >> xmlvm. Changed launch configuration programm arguments to: >> Program arguments=--debug=all >> --in=${project_loc:/xmlvmDemoTests}/bin/ >> --out=${project_loc:/xmlvmDemoTests}/xmlvm-gen --target=xmlvm >> >> Now I get the following console-output: >> [04/07/11 20:25:58.189] DEBUG: Instantiated: >> org.xmlvm.proc.in.InputProcess$ClassInputProcess >> [04/07/11 20:25:58.189] DEBUG: Instantiated: >> org.xmlvm.proc.in.InputProcess$ClassInputProcess for >> "C:\Projects\xmlvm\trunk\xmlvmDemoTests\bin\com\dummy\xmlvm\demo\Test.class" >> [04/07/11 20:25:58.189] DEBUG: Instantiated: >> org.xmlvm.proc.out.XmlvmOutputProcess >> [04/07/11 20:25:58.189] DEBUG: Instantiated: >> org.xmlvm.proc.out.RecursiveResourceLoadingProcess >> [04/07/11 20:25:58.204] DEBUG: Adding preprocess >> org.xmlvm.proc.out.RecursiveResourceLoadingProcess to process >> org.xmlvm.proc.out.XmlvmOutputProcess >> [04/07/11 20:25:58.236] DEBUG: UniversalFileCreator: Could not find >> either resource: (One-JAR resource: /redlist.txt / file system resource: >> lib/redlist.txt) >> [04/07/11 20:25:58.236] DEBUG: Instantiated: >> org.xmlvm.proc.out.DEXmlvmOutputProcess >> java.lang.reflect.InvocationTargetException >> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native >> Method) >> at >> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) >> at >> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) >> at java.lang.reflect.Constructor.newInstance(Constructor.java:513) >> at >> org.xmlvm.proc.XmlvmProcessImpl.createInputInstances(XmlvmProcessImpl.java:127) >> at >> org.xmlvm.proc.XmlvmProcessor.buildProcessingPipeline0(XmlvmProcessor.java:241) >> at >> org.xmlvm.proc.XmlvmProcessor.buildProcessingPipeline0(XmlvmProcessor.java:241) >> at >> org.xmlvm.proc.XmlvmProcessor.buildProcessingPipeline(XmlvmProcessor.java:217) >> at org.xmlvm.proc.XmlvmProcessor.process(XmlvmProcessor.java:152) >> at org.xmlvm.proc.XmlvmProcessor.process(XmlvmProcessor.java:137) >> at org.xmlvm.Main.main(Main.java:53) >> Caused by: java.lang.NullPointerException >> at >> org.xmlvm.proc.out.DEXmlvmOutputProcess.initializeRedList(DEXmlvmOutputProcess.java:461) >> at >> org.xmlvm.proc.out.DEXmlvmOutputProcess.<init>(DEXmlvmOutputProcess.java:264) >> at >> org.xmlvm.proc.out.DEXmlvmOutputProcess.<init>(DEXmlvmOutputProcess.java:238) >> ... 11 more >> [04/07/11 20:25:58.251] DEBUG: Instantiated: >> org.xmlvm.proc.out.ExeToXmlvmProcess >> [04/07/11 20:25:58.251] DEBUG: Adding preprocess >> org.xmlvm.proc.out.ExeToXmlvmProcess to process >> org.xmlvm.proc.out.RecursiveResourceLoadingProcess >> [04/07/11 20:25:58.251] DEBUG: Instantiated: >> org.xmlvm.proc.out.XmlvmToXmlvmProcess >> [04/07/11 20:25:58.251] DEBUG: Adding preprocess >> org.xmlvm.proc.out.XmlvmToXmlvmProcess to process >> org.xmlvm.proc.out.RecursiveResourceLoadingProcess >> java.lang.NoSuchMethodException: >> org.xmlvm.proc.in.InputProcess$ExeInputProcess.<init>(org.xmlvm.main.Arguments) >> at java.lang.Class.getConstructor0(Class.java:2706) >> at java.lang.Class.getConstructor(Class.java:1657) >> at >> org.xmlvm.proc.XmlvmProcessImpl.createInputInstances(XmlvmProcessImpl.java:127) >> at >> org.xmlvm.proc.XmlvmProcessor.buildProcessingPipeline0(XmlvmProcessor.java:241) >> at >> org.xmlvm.proc.XmlvmProcessor.buildProcessingPipeline0(XmlvmProcessor.java:241) >> at >> org.xmlvm.proc.XmlvmProcessor.buildProcessingPipeline0(XmlvmProcessor.java:241) >> at >> org.xmlvm.proc.XmlvmProcessor.buildProcessingPipeline(XmlvmProcessor.java:217) >> at org.xmlvm.proc.XmlvmProcessor.process(XmlvmProcessor.java:152) >> at org.xmlvm.proc.XmlvmProcessor.process(XmlvmProcessor.java:137) >> at org.xmlvm.Main.main(Main.java:53) >> java.lang.NoSuchMethodException: >> org.xmlvm.proc.in.InputProcess$XmlvmInputProcess.<init>(org.xmlvm.main.Arguments) >> at java.lang.Class.getConstructor0(Class.java:2706) >> at java.lang.Class.getConstructor(Class.java:1657) >> at >> org.xmlvm.proc.XmlvmProcessImpl.createInputInstances(XmlvmProcessImpl.java:127) >> at >> org.xmlvm.proc.XmlvmProcessor.buildProcessingPipeline0(XmlvmProcessor.java:241) >> at >> org.xmlvm.proc.XmlvmProcessor.buildProcessingPipeline0(XmlvmProcessor.java:241) >> at >> org.xmlvm.proc.XmlvmProcessor.buildProcessingPipeline0(XmlvmProcessor.java:241) >> at >> org.xmlvm.proc.XmlvmProcessor.buildProcessingPipeline(XmlvmProcessor.java:217) >> at org.xmlvm.proc.XmlvmProcessor.process(XmlvmProcessor.java:152) >> at org.xmlvm.proc.XmlvmProcessor.process(XmlvmProcessor.java:137) >> at org.xmlvm.Main.main(Main.java:53) >> [04/07/11 20:25:58.251] ERROR: There are still 1 processes left. >> [04/07/11 20:25:58.251] ERROR: Something went wrong during processing. >> >> So please help a new user to get started. |