Solved

Export Java JAR file doesn't execute

Posted on 2013-05-13
4
522 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 500 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
A short article about problems I had with the new location API and permissions in Marshmallow
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now