Click here to Skip to main content
15,886,088 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
My application is client server application where I should set the ipaddress of server side in client side properties file
Posted
Comments
Zoltán Zörgő 29-Oct-15 16:17pm    
Question text is not related to the title...

You cannot "convert" it. This is not how Java works.

Essentially, JAR is a zipped set of Java class files. And Java class code has nothing to do with PE (Portable Executable) code used on Windows. Java compiled code is bytecode which operates only on JVM, while EXE is based on CPU instruction set. (On Microsoft Systems, PE files can also target CLR system, which is also based on something similar to Java bytecode, CIL code, but CIL also has nothing to do with JVM, it operates on CLR, so you can just forget this fact.) JVM has its own API with big set of resources unavailable in the native runtime system.

See also:
https://en.wikipedia.org/wiki/Bytecode[^],
https://en.wikipedia.org/wiki/Java_virtual_machine[^],
https://en.wikipedia.org/wiki/Java_%28programming_language%29[^] (yes, read it too, don't assume that you understand what Java is, you really don't),
https://en.wikipedia.org/wiki/JAR_%28file_format%29[^].

Overall, your whole idea of "converting" JAR is totally useless. Perhaps you can get more help if you explain your ultimate goals.

—SA
 
Share this answer
 
v2
Comments
Member 11823391 29-Oct-15 20:02pm    
I need to launch my application from desktop rather than going every time to net beans (I mean an IDE and launching it)
Sergey Alexandrovich Kryukov 29-Oct-15 22:32pm    
This is irrelevant. I explained you all about you idea. Not passing. Learn at least something about Java.
—SA
F-ES Sitecore 30-Oct-15 6:36am    
Install the Java Run Time Environment on the machine and the jar becomes executable, just double-click it.
Member 11823391 30-Oct-15 21:12pm    
Yup my server side got launched by double clicking server.jar file but my client is getting launched but not connecting to server side. I checked config.properties file too it has the same ip as server
I gave you the answer in your repost of this question. In future please do not repost.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 30-Oct-15 9:16am    
And, in turn, you please put references to your "real" answers in such cases, so it would be easier to find them. :-)
—SA
Richard MacCutchan 30-Oct-15 12:09pm    
Why? OP can easily find the question.
Sergey Alexandrovich Kryukov 30-Oct-15 12:59pm    
Well, for me, it was to vote with doing less clicks; at that moment, I used much slower Internet access. Adding direct links always helps.
Thank you for understanding.
—SA
Richard MacCutchan 30-Oct-15 13:02pm    
Uunderstanding what? My comment was directed purely to the OP. I don't understand what your issue is.
Sergey Alexandrovich Kryukov 30-Oct-15 13:43pm    
If you don't understand it, it's fine. You are not obliged to do what I ask you to do, not to worry.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900