Link to home
Start Free TrialLog in
Avatar of Michael L
Michael LFlag for United States of America

asked on

SCCM 2007: JAR Install Failing (Bad Environment)

Experts,

I'm trying to deploy some software, but the installer is a JAR file. Double-clicking to install is not an issue, but when I try to deploy it through SCCM 2007, I get the Failed: Bad Environment error. I tried to execute it using the path to our DP and I'm met with a prompt to choose a program to open the selected file with.

Are there some switches I can use or something else I can do to have SCCM tell the client workstation to use Java to run the installer? All client workstations on my domain have the latest JREs.

Thanks!
Avatar of Nagendra Pratap Singh
Nagendra Pratap Singh
Flag of Australia image

What are the switches you are using?
What cmd line you are using in the SCCM ?
use:  
"C:\Program Files\Java\jre7\bin\java.exe -jar JAR_Filename.jar"

Open in new window

Please attach execmgr.log and output of set command
You can use javaw.exe
Avatar of Michael L

ASKER

Sorry for the delay!

It's on another network and I cannot export logs, unfortunately. What I used previously is:

\\server\software$\production\jre7\bin\java.exe -jar JAR_Filename.jar

How do you mean use javaw.exe?
Try java.exe -jar JAR_Filename.jar
It worked with PS :)
Gonna test it through SCCM, though. I'll let you know tomorrow, how it goes. Thanks!
When I run this through PowerShell, the install initiates just fine:

java.exe -jar \\server\software$\production\jar_install\bin\JAR_Filename.jar

Open in new window


But when I run the advert in Run Advertised Programs, I get Failed: Bad Environment.

My command line argument in the package is
java.exe -jar JAR_Filename.jar

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Nagendra Pratap Singh
Nagendra Pratap Singh
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Works! Thanks, Nagendra :)