| Standalone Java Application [message #1006999] |
Sun, 03 February 2013 13:18  |
D Q Messages: 3 Registered: January 2013 |
Junior Member |
|
|
Hi,
I've exported my eclipse project to a runnable JAR and have built the standalone java application by following http://wiki.eclipse.org/Xtext/FAQ#How_do_I_load_my_model_in_a_standalone_Java_application.C2.A0.3F
My problem now is whenever I compile the standalone java application, with the runnable JAR included in the classpath, my platform is always set to "../..". It will only compile if I put this java application file in the src folder of my eclipse project, which means I still need the eclipse project to run the standalone Java application!
Is there any way to actually make it "standalone"?
Thanks!
|
|
|
|
| Re: Standalone Java Application [message #1007003 is a reply to message #1007000] |
Sun, 03 February 2013 13:53   |
D Q Messages: 3 Registered: January 2013 |
Junior Member |
|
|
Hi Christian,
So let's say I copy the code in the link to a file called Test.java, I've also exported my Eclipse Xtext project to a runnable JAR (call it dsl.jar).
When I run
javac -cp dsl.jar Test.java
I receive the following even though I've removed "org.eclipse.emf.mwe.utils.StandaloneSetup().setPlatformUri("../");"
0 INFO StandaloneSetup - Registering platform uri 'some uri'
Then the compile will fail unless I put Test.java in the Eclipse project src folder.
Thanks
[Updated on: Sun, 03 February 2013 13:54] Report message to a moderator
|
|
|
| Re: Standalone Java Application [message #1007004 is a reply to message #1007003] |
Sun, 03 February 2013 14:02  |
Christian Dietrich Messages: 4419 Registered: July 2009 |
Senior Member |
|
|
Hi,
is still do not get the point. maybe there is a missunderstanding on your side.
id expected you would do something like
java -jar xxx.jar my.Test test.mydsl
So why do you want to compile the class test?????
you usually do the build using techs like tycho, buckminister etc
the articles on "standalone" are on "reading the model"
and not "compile the model reading class"
|
|
|
Powered by
FUDForum. Page generated in 0.14831 seconds