Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Standalone Java Application
Standalone Java Application [message #1006999] Sun, 03 February 2013 13:18 Go to next message
Eclipse UserFriend
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 13:24 Go to previous messageGo to next message
Eclipse UserFriend
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 13:53 Go to previous messageGo to next message
Eclipse UserFriend
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] by Moderator

Re: Standalone Java Application [message #1007004 is a reply to message #1007003] Sun, 03 February 2013 14:02 Go to previous message
Eclipse UserFriend
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: Sun Jul 06 09:15:30 EDT 2025

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

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

Back to the top