Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Create an executable

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • 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
 
Marshal
Posts: 7178
491
Mac OS X VI Editor BSD Linux
  • Mark post as helpful
  • send pies
  • 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: 6266
167
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • 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: 39530
776
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What version of Java are you using? The answer is different in Java 9+
 
kevin Abel
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • 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: 83
  • Mark post as helpful
  • send pies
  • 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: 6266
167
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • 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: 6266
167
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • 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: 83
  • Mark post as helpful
  • send pies
  • 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
 
money grubbing section goes here:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!