Solved

Export Java JAR file doesn't execute

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

This is about my first experience with programming Arduino.
Skype is a P2P (Peer to Peer) instant messaging and VOIP (Voice over IP) service – as well as a whole lot more.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
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 …

758 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

21 Experts available now in Live!

Get 1:1 Help Now