[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Only Java Run Time

Posted on 2011-03-25
7
Medium Priority
?
366 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 1000 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 332 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 1000 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 47

Assisted Solution

by:for_yan
for_yan earned 332 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 1000 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 336 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

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
The viewer will learn how to implement Singleton Design Pattern in Java.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

656 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