Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
running java with -D flags

Subject: running java with -D flags

From: Kirk

Date: 17 Nov, 2009 15:10:41

Message: 1 of 2

Hi,
I would like to run a java class but need to have java run it with certain -D flags.

For example, the command in DOS would be something like...

java -Djava.endorsed.dirs=@JACORB_HOME@/lib -Djacorb.home=@JACORB_HOME@ -Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB -Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton className

(the @JACORB_HOME@ tag is used here for brevity)

How would one translate this to a MATLAB java call? I can see how to pass args to the class that I want to instantiate (using javaObject), but my question is how to pass flags to the java runtime environment?

Thanks in advance,
Kirk

Subject: running java with -D flags

From: Yair Altman

Date: 17 Nov, 2009 17:39:20

Message: 2 of 2

"Kirk " <kscott@alionscience.com> wrote in message <hduedh$t8u$1@fred.mathworks.com>...
> Hi,
> I would like to run a java class but need to have java run it with certain -D flags.
>
> For example, the command in DOS would be something like...
>
> java -Djava.endorsed.dirs=@JACORB_HOME@/lib -Djacorb.home=@JACORB_HOME@ -Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB -Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton className
>
> (the @JACORB_HOME@ tag is used here for brevity)
>
> How would one translate this to a MATLAB java call? I can see how to pass args to the class that I want to instantiate (using javaObject), but my question is how to pass flags to the java runtime environment?
>
> Thanks in advance,
> Kirk

See here: http://blogs.mathworks.com/desktop/2009/07/06/calling-java-from-matlab/#comment-6605

Yair Altman
http://UndocumentedMatlab.com
 

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us