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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
Nagendra Pratap SinghDesktop Applications SpecialistCommented:
Please attach execmgr.log and output of set command
0
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

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
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Michael LPr. SysadminAuthor Commented:
Works! Thanks, Nagendra :)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Server Software

From novice to tech pro — start learning today.