Solved

Only Java Run Time

Posted on 2011-03-25
7
362 Views
Last Modified: 2012-05-11
If I have a Java application,
and I want to run it on an OS (e.g., Linux, HP Unix, etc)
I am NOT allowed to install Java Run Time on it.

Which environment variables am I need to set in order to make the application can be executed?
PATH? JAVA_HOME? or other variables?

Thanks!
0
Comment
Question by:mawingho
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 8

Accepted Solution

by:
colr__ earned 250 total points
ID: 35216287
If you cant install JVM, then you arent going to get this working. PATH is used to make the java bin directory commans available to the command line, JAVA_HOME is used by some applications, like apache tomcat, to point to the java installation root. However if you arent able to install java, then pointing these anywhere wont make any difference - you need to install java to run a java app!
0
 
LVL 12

Assisted Solution

by:enachemc
enachemc earned 83 total points
ID: 35216333
neither
just call the java.exe using the full path
provide correct classpath and all should run OK on your JRE copy
0
 
LVL 8

Assisted Solution

by:colr__
colr__ earned 250 total points
ID: 35216386
Are you able to copy the jre to the computer as enachemc suggested? This would work - I had assumed you meant you couldnt put the jre on the machine at all.
0
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 
LVL 47

Assisted Solution

by:for_yan
for_yan earned 83 total points
ID: 35216623
If you are not allowed to install JRE yourself, there is a good chance
you have java pre-installed on your machine.
Did you try to run

java -version

0
 
LVL 8

Assisted Solution

by:colr__
colr__ earned 250 total points
ID: 35219202
Java may be installed but not available in the path, in which case java - version wont work. Youd need to determine from the add/remove programs if it is installed, then find the location and add it to the PATH. That way you can then run your java programs
0
 
LVL 2

Assisted Solution

by:calboronster
calboronster earned 84 total points
ID: 35225057
Your question is a bit confusing with less details so let me answer it in question form -

1. By Java application do you mean .class/.jar file. And how do you try to execute it?
(Or is it web application, which makes the answer a bit more difficult)

to run .class file you execute
<java location>/bin/java.exe -cp <libraries path> abc.class

Open in new window

in your class folder
to run packaged .jar file you execute  
<java location>/bin/java.exe -jar abc.jar

Open in new window

in your jar folder

2. If the jar file is setup (on windows) to open with javaw, then double click on the same should do exactly as the last two commands. Albeit the java location (upto /bin) should be mentioned in windows environment variable.

3. Most of the applications inherently find the java location based on variable JAVA_HOME (which refers to java installable, not bin folder but its parent). Try this for all java apps to execute without additional questions from the app.
0
 

Author Closing Comment

by:mawingho
ID: 35305463
thanks
0

Featured Post

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question