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!
Michael LPr. SysadminAsked:
Who is Participating?
 
Nagendra Pratap SinghDesktop Applications SpecialistCommented:
It needs to know where your jave.exe is

maybe giving the full path will help

Copying from an older comment

"C:\Program Files\Java\jre7\bin\java.exe -jar JAR_Filename.jar"
0
 
Nagendra Pratap SinghDesktop Applications SpecialistCommented:
What are the switches you are using?
0
 
Raheman M. AbdulSenior Infrastructure Support Analyst & Systems DeveloperCommented:
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

0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
Nagendra Pratap SinghDesktop Applications SpecialistCommented:
Please attach execmgr.log and output of set command
0
 
gheistCommented:
You can use javaw.exe
0
 
Michael LPr. SysadminAuthor Commented:
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?
0
 
Nagendra Pratap SinghDesktop Applications SpecialistCommented:
Try java.exe -jar JAR_Filename.jar
0
 
Michael LPr. SysadminAuthor Commented:
It worked with PS :)
Gonna test it through SCCM, though. I'll let you know tomorrow, how it goes. Thanks!
0
 
Michael LPr. SysadminAuthor Commented:
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

0
 
Michael LPr. SysadminAuthor Commented:
Works! Thanks, Nagendra :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.