Link to home
Start Free TrialLog in
Avatar of Larry Brister
Larry BristerFlag for United States of America

asked on

Export Java JAR file doesn't execute

New to this...
I installed Eclipse and JDK

Imported m5.jar file
Changed one class to display a different message

Exported to a project folder.

To execute I run from a command prompt from my Java\jre7\bin folder
I renamed the old m5.jar to _m5.jar
Pasted in the new m5.jar
when I try and run this...
java -cp m5.jar org.m5.sdk.hostedconnect.v1.ScreenPop  https://hostedconnect.m5net.com 1234567890 12345

I get the old message.

The changes aren't seen.

Do I need to restart something?
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

I would double check everything
If you export properly (setting the name of the main class) then all you should need is

java -jar m5.jar org.m5.sdk.hostedconnect.v1.ScreenPop  https://hostedconnect.m5net.com 1234567890 12345

Open in new window

Not a good idea to work in the jdk bin directory btw - put that directory in PATH and put your code/jars elsewhere
Use Java decompiler and check whether the created jar has the proper java class
ASKER CERTIFIED SOLUTION
Avatar of Valeri
Valeri
Flag of Bulgaria 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
Avatar of Larry Brister

ASKER

That did it.
Thanks