This week's book giveaway is in the Functional programming forum.
We're giving away four copies of Functional Design and Architecture and have Alexander Granin on-line!
See this thread for details.
Win a copy of Functional Design and Architecture this week in the Functional programming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Create an executable

 
Ranch Hand
Posts: 191
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to show that I can launch a Java script from VBScript/UFT.  

I have a working hello world type script in eclipse/java.  

A) How can I run a script from outside of Eclipse?  Can I launch a script inside of Eclipse from  the command line in the CMD window?

I am requesting to have the Java JDK installed.   After that I'd like to compile the code.  B) Would I be better using an exe or java extension?

C)Can an entire selenium script using TestNG be put into an executable file?  

Thanks,

Kevin
 
Sheriff
Posts: 8064
569
Mac OS X VI Editor BSD Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Didn't get absolutely anything. Could you please rephrase all you have said?

Or clarify at first. In which language you have the code? Java <-> JavaScript <-> TypeScript <-> VBScript ?
 
Sheriff
Posts: 7111
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe one of the things you are asking is how to run a Java program (not script) from the command line.  This Wiki will help:

https://coderanch.com/wiki/659740/create-Java-program

The basic steps are:

* Download the JDK
* Set up your environment
* Compile your code (program)
* Launch your program

 
author & internet detective
Posts: 40746
827
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What version of Java are you using? The answer is different in Java 9+
 
kevin Abel
Ranch Hand
Posts: 191
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Liutauras, Knute, Jeanne,
I appreciate your responses.  I don't know how to respond to a specific post. I'd appreciate someone telling me how to do this.  

I am using java version 1.8.0_221    I get this from java -version.

Thanks,

Kevin

 
kevin Abel
Ranch Hand
Posts: 191
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My plan is to launch a bat batch file using vbscript inside of UFT Testing tool.  The batch file will call the java executable using

java -classpath . MooseGreetings

I will see how my experiment goes shortly
 
Knute Snortum
Sheriff
Posts: 7111
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

kevin Abel wrote: I don't know how to respond to a specific post. I'd appreciate someone telling me how to do this.  


* Find the post you want to respond to
* Press the Quote button.
* Edit the quoted text if necessary for clarity.
* (optional but recommended) Press the Preview button (next to the Submit button) to make sure everything looks the way it should.
 
Knute Snortum
Sheriff
Posts: 7111
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

kevin Abel wrote:My plan is to launch a bat batch file using vbscript inside of UFT Testing tool.  The batch file will call the java executable using

java -classpath . MooseGreetings

I will see how my experiment goes shortly


For a simple project like this you can leave off the "-classpath ." part.  You will be using classpaths when you start using jar files and other resources. "-classpath" can also be shortened to "-cp".
 
kevin Abel
Ranch Hand
Posts: 191
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Knute Snortum wrote:

kevin Abel wrote:My plan is to launch a bat batch file using vbscript inside of UFT Testing tool.  The batch file will call the java executable using

java -classpath . MooseGreetings

I will see how my experiment goes shortly


For a simple project like this you can leave off the "-classpath ." part.  You will be using classpaths when you start using jar files and other resources. "-classpath" can also be shortened to "-cp".



Appreciated.

Thanks,

Kevin
 
Note to self: don't get into a fist fight with a cactus. Command this tiny ad to do it:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic