Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

i have this package.m that i am trying to call to from within java code using netbeans, however it does not seem to be responding. how can i test to see that i am actually connecting to Mathematica? can it have to do with the location of package.m, if so any recomendations?

share|improve this question

put on hold as off-topic by bobthechemist, Öskå, Michael E2, Mr.Wizard 5 hours ago

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question cannot be answered without additional information. Questions on problems in code must describe the specific problem and include valid code to reproduce it. Any data used for programming examples should be embedded in the question or code to generate the (fake) data must be included." – Mr.Wizard
If this question can be reworded to fit the rules in the help center, please edit the question.

    
can one call mathematica from Java?? Wow, I had no idea. Do you have a link that talks about how to do this? –  Nasser Mar 9 at 5:23
    
Post the code you've tried and any relevant results. –  rasher Mar 9 at 7:29
    
@Nasser It's in the docs. –  Pickett Mar 9 at 10:00

1 Answer 1

You can try asking the kernel to open the .m file for you. I haven't tried this yet, but I think it will work. Just try :

(* Call in Java *)
.evaluate(string);
(* and pass the argument *)
UsingFrontEnd[NotebookOpen["xxxx.m"]] 

It opens from the kernel, so I guess it will open from Java too.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.