Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Export Java JAR file doesn't execute

Posted on 2013-05-13
4
Medium Priority
?
559 Views
Last Modified: 2013-05-14
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?
0
Comment
Question by:lrbrister
4 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 39162086
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
0
 
LVL 12

Expert Comment

by:basav_com
ID: 39162308
Use Java decompiler and check whether the created jar has the proper java class
0
 
LVL 16

Accepted Solution

by:
Valeri earned 2000 total points
ID: 39165220
don't rename the above mentioned jar file, just remove it from there and try again. if the result is the same, then the file is "linked" somehow, but I think the result will be different.
0
 

Author Closing Comment

by:lrbrister
ID: 39165811
That did it.
Thanks
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Why do some people recommend buying business VoIP from an ISP? What are the benefits to my company? What are the costs?
The viewer will learn how to implement Singleton Design Pattern in Java.
Simple Linear Regression
Suggested Courses

916 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