Tapping JAVA web application
Hi All,
I would like to ask expert solution on this.
I have developed a JAVA application which is used for some calculation purpose within our organization.
As the calculation scenarios are very difficult and hard to read,we have also developed an EXCEL based UI to allow user to view and edit formulas accordingly.Using this EXCEL Ui ,the user calls the JAVA application with few input parameters like input file path,location of output file etc....
This excel UI will be distributed among all the users in the company,who will use it for different purposes.
Now we need a mechanism where we can deploy the JAVA application in web server and the EXCEL can tap the web application.
is their any such mechanism where we can achieve this ...we also need to pass the arguments from the EXCEL application.
Please let me what could be the possible way to achieve this.
Regards
ashesh
Re: Tapping JAVA web application
Oh god why would you use excel and then try to tie it into a java app? If you're going through all the trouble of building a java app, just build a java app and skip the excel part. You could even make a web front end if you don't want to have local java clients running.
Re: Tapping JAVA web application
Hi ,
Thanx for the alternative solution.
I am using an Excel UI as the file which user willl be accessing is an excel file,it is much more userfriendly and effective to use an EXCEL VBA functionality to trace and rectify errors than using Java.....
The java applications is just a standalone app which requires an input file from the Excel UI and generates the output ( A .txt file).
I was thinking to achieve this using JNLP webstart functionality.
I have generated a JNLP file and coresponding JAR of my java application.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+"
codebase="http://myipaddress/webStart"
href="stdf_v3.1_jdk6_new.jnlp">
<information>
<title>STDFViewer version 3.1 (February 2010)</title>
<vendor>ashesh-TD NTP System Engineering</vendor>
<offline-allowed/>
</information>
<resources>
<!-- Application Resources -->
<j2se version="1.6+"
href="http://java.sun.com/products/autodl/j2se"/>
<jar href="JIBM2CalParaListConv.jar" main="true" />
</resources>
<application-desc
name="STDFViewer version 3.1 (February 2010)"
main-class="jcp.JIBM2CalParaListConv">
</application-desc>
<update check="background"/>
</jnlp>
This is my JNLP file, i would like to create a batch file to call this JNLP located at remote server from my Local PC.
I tried calling the application using below command :
Code:
javaws http://myipaddress/webStart/stdf_v3.1_jdk6_new.jnlp
The application runs fine,But no output is generated as No argument is passed.
Can someone guide me on how to pass Arguments from Local system to Rempte JNLP file,
the arguments are along with Flags like -i <Input file> -c <Output file>
I need something like
Code:
Javaws -i <Input file location in local system> -c <Outfile path in local system > http://myipaddress/webStart/stdf_v3.1_jdk6_new.jnlp
Regards
Ashesh
Re: Tapping JAVA web application
You can use the -open options when using javaws, this option will pass the argument to your jnlp from the command line.
Code:
javaws -open arg1 arg2 arg2 http://localhost/my.jnlp
See here for more information on javaws command line: javaws Command Line
Re: Tapping JAVA web application
Hi wsaryada,
I have tried this command initially,but didnot help me.
Code:
javaws -open "c:/inputfilename.txt" http://myremotehost/webStart/***.jnlp
But this dosenot generate any output,I could see the Java application is kickstart but it dosenot generate any output.
This application generates the output in the same directory as of Input file.
Regards
Ashesh
Re: Tapping JAVA web application
Have you check whether the argument received in your program main class? How do you read this argument from your application?