Hello,
I have created a java application, app.jar, which calls VenDLL32.dll. I'm preparing to distribute it to some users, who have installed Vensim Model Reader. I tried to create a .vpa file which contains the application file (.jar), the model file (.vpm), and some data file (.vdf). When I try to open the .vpa file using model reader, the .jar file did get extracted but did not run. Could anyone provide some suggestions to what's going on? (My guess is either the way I package those files is wrong or issues regarding to the paths written in the application file.)
Many thanks.
maxin454
Application Distribution
-
- Super Administrator
- Posts: 4827
- Joined: Wed Mar 05, 2003 3:10 am
I'm not sure you are doing things correctly here.
Your users need the Vensim Model Reader installed purely to supply VenDLL32.dll. You need to give the user the .jar file and the .vpa. The user opens the .jar file, which in turn opens the .vpa.
Do not package the .jar within the .vpa.
Have a go at that and see if it works ok, report back if it works.
Tony
Your users need the Vensim Model Reader installed purely to supply VenDLL32.dll. You need to give the user the .jar file and the .vpa. The user opens the .jar file, which in turn opens the .vpa.
Do not package the .jar within the .vpa.
Have a go at that and see if it works ok, report back if it works.
Tony
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
Actually you have set things up correctly and if the jar file is extracted it should get launched. You should have one of the people you sent it to double click on the extracted jar file. I suspect they have not got their computers set up to have this automatically launch Java. If it does not they can probably just reinstall Java.
Thank you, both Tony and Bob.
First, I tried Tony's method to run the java application and it did not work.
Let me try to explain my questions in more details (I apologize if it seems long, just try to record every step I did).
Step 1: I created a java application to control my model using "vensim.command("SPECIAL>LOADMODEL|MyModel.vpm");". I did not specify the directory of the model because I assume when the user receives the package file (.vpa), all the paths will be taken care of. Is "not specifying the path" correct?
Step2: I packaged four files into a .vpa file including my application (.jar), my model file (.vpm) which is referred by my java, the same model file (.vmf) since somehow I need it to publich, and a data file (.vdf). I used a machine which is installed model reader only to open the .vpa file. If the .vpa file is put in the same directory as my java project, then the .jar file got extracted and launched automatically and worked correctly. However, if I put the .vpa file in other directory, then the .jar file still got extracted but did not run (even if you double click the .jar file again). What happens here?
Besides those two questions, I just want to double check the following:
To run the java application, is it true that either Vensim DSS or Model Reader must be installed on the machine? Can the application be run just having the VenDLL32.dll on the machine?
Thanks.
First, I tried Tony's method to run the java application and it did not work.
Let me try to explain my questions in more details (I apologize if it seems long, just try to record every step I did).
Step 1: I created a java application to control my model using "vensim.command("SPECIAL>LOADMODEL|MyModel.vpm");". I did not specify the directory of the model because I assume when the user receives the package file (.vpa), all the paths will be taken care of. Is "not specifying the path" correct?
Step2: I packaged four files into a .vpa file including my application (.jar), my model file (.vpm) which is referred by my java, the same model file (.vmf) since somehow I need it to publich, and a data file (.vdf). I used a machine which is installed model reader only to open the .vpa file. If the .vpa file is put in the same directory as my java project, then the .jar file got extracted and launched automatically and worked correctly. However, if I put the .vpa file in other directory, then the .jar file still got extracted but did not run (even if you double click the .jar file again). What happens here?
Besides those two questions, I just want to double check the following:
To run the java application, is it true that either Vensim DSS or Model Reader must be installed on the machine? Can the application be run just having the VenDLL32.dll on the machine?
Thanks.
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
It is true you don't need to write the path for the model, Vensim will always open the .vpa file from which the application was extracted.
But I guess I still don't understand what is happening in your case. When you say put the java files do you just mean the .jar file or are
there additional files? The expectation is that everything is in a single .jar file. If other files are necessary I would not expect it to work.
But I guess I still don't understand what is happening in your case. When you say put the java files do you just mean the .jar file or are
there additional files? The expectation is that everything is in a single .jar file. If other files are necessary I would not expect it to work.