Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Standalone Java Application
Standalone Java Application [message #1006999] Sun, 03 February 2013 18:18 Go to next message
D Q is currently offline 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 #1007000 is a reply to message #1006999] Sun, 03 February 2013 18:24 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6315
Registered: July 2009
Senior Member
Hi,

i do not understand what you are actually doing.
what do you mean with

"compile the standalone java application, with the runnable JAR included in the classpath"

and "my platform is always set to "../.."."
Re: Standalone Java Application [message #1007003 is a reply to message #1007000] Sun, 03 February 2013 18:53 Go to previous messageGo to next message
D Q is currently offline 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 18:54]

Report message to a moderator

Re: Standalone Java Application [message #1007004 is a reply to message #1007003] Sun, 03 February 2013 19:02 Go to previous message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6315
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"
Previous Topic:DSL showing attributes based on its content value
Next Topic:Unique key constrain in json
Goto Forum:
  


Current Time: Mon Sep 22 04:34:23 GMT 2014

Powered by FUDForum. Page generated in 0.01816 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software