Solved

Export Java JAR file doesn't execute

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

803 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