[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Programming question ,how do I combine a bunch of jar files

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 54
Thread images: 2

File: java.jpg (107KB, 1280x768px) Image search: [Google]
java.jpg
107KB, 1280x768px
Programming question ,how do I combine a bunch of jar files into one exe?
>>
>jar
>exe

Meme
>>
>>56478666
please pajeet, it's a serious question, go be autistic somewhere else.
>>
>>56478629
you don't. are you stupid?
>>
>>56478690

Here's the thing Raj, you fucking don't you autistic sperg. Write in a good language like C++.
>>
Just out of curiosity, why would you do that in the first place?
>>
make a C wrapper for your Java thing

that will include making this choice
>shipping the JVM along with your program
>making an installer for your program that downloads Java
>>
>>56478782
>>56478755
oh God, why does every single dumb fuck must post in threads they don't have a clue about?

>>56478801
>>56478783
so far I'm able to produce an exe based on the main jar, but there's like 40 jars lying all around inside the directory, I want to combine them into one exe.

>>56478801
how do I do it automatically?
>>
>>56478782
SoapUI is in Java, yet runs using an .exe

what now?
>>
>>56478849
>>56478850
Don't be niggers. Java is trash. If you ever want to seriously get into programming, trying using a language that natively compiles into an EXE. That way you don't have to use some shitter extension or hack.
>>
>>56478879
fucking Christ you autistic fuck, I just want to get this one job done, I don't care about programming languages, did you even read the OP?
>>
>>56478930

Don't get mad at me because you're missing a chromasome and decided to write a program in Java and now are running into issues.
>>
>>56478879
>t. forever unemployed NEET retard
>>
>>56478945
I didn't even write the program , where do you get of with all that, I just asked a simple question.
>chromasome
fucking third worlders , get outta my thread and quit spamming my thread with stupid shit
>>
>>56478999

nice trips fag

>>56479018

Hur dur "It's just a question bro." Go fucking jump off a bridge. There's the solution to your problem.
>>
>>56478849
>how do I do it automatically?
you probably need a makefile or some shit like that

wouldn't know, I've never really had to do this
>>
>>56479046
hmm, there's one possible solution of using a packager

>>56479042
now the suicidal thoughts kick in, life must be really rough outside the Wes world.
>>
>>56479042
>There's the solution to your problem.
>the solution is to rewrite the whole thing in a different language
wew, sure makes me wonder why all the financial institutions that still run on COBOL haven't done this

such a brilliant solution
>>
>>56479113

At least I'm not getting railed by the kikes and taking it :)
>>
>>56479138
good for you
>>
Well OP just break down the problem of a jar file. Ultimately they are javas response to the zip file with a configuration to act as executable, within the jvm anyway. That means that while they can be run, they are essentially folders with a specific compression set up and so can store other folders in them. You can then use the root directory jar to call on the other jars as necessary through a coded class or something.
>>
>>56478629

Install Gentoo
>>
>>56479137
>COBOL
Sheez, you don't know a thing about programming, do you? COBOL stays because it is a good programming language, go back to your C, script kiddie! Let's see what you do when you have to learn a real language!
>>
>>56479230
>Sheez
stop reading right here
>>
7zip can compress to the .exe format
>>
>>56478629
>>56478629
I'm just a noob hobby programmer, but I'm pretty sure that only C/C++ code compiles into .exe and java executables are .jar files. There is no way to make a single or multiple .jar into a .exe, but it should be possible to make your program into a single .jar, you just have to do it at compile. No idea what you made or how tho, so I cant be more precise.
>>
>>56479257

>IM NOT LISTENING CAUSE YOU SAID A WORD
go back to tumblr fag
>>
>>56479296
>(You)
stopped here because I already won
>>
>>56478629
Zip them and rename it something.exe!
>>
>>56478690
Jar is javas shit form of exe
>>
>>56478629
Don't be a special snowflake, OP. 99% of Java software just uses ant/maven and a .bat or shell script.

Don't work against the system just to prevent Linux users from running your project.
>>
>>56479563
>ant/maven
it's current year, at least use Gradle

coincidentally, this apparently exists
https://github.com/TheBoegl/gradle-launch4j
>>
>>56478629
GUYS!!!! PLEASE HELP ME!! HOW DO I CONVERT JAVASCRIPT INTO EXE????
>>
>>56478629
Jwrapper probably can do this I think.
>>
>>56478629
Wouldn't you have to distribute the JVM somehow too in that case? Seems like a dumb idea

If you don't want your users to be required to download Java then use a different programming language.
>>
>>56478629
kys
>>
HOW TO CONVERT PHP TO EXE?
>>
>>56480024
>Wouldn't you have to distribute the JVM somehow too in that case? Seems like a dumb idea
this is literally how Java, C# and other bytecode and/or interpreted languages ship their programs 90% of the time

when was the last time you downloaded a plain jar from somewhere?
>>
>>56480093
>when was the last time you downloaded a plain jar from somewhere?
Never because I don't think I have any Java applications installed
>>
>>56478629
I don't know but I will try to find out and document the process as I go.

a jar file is a zip archive containing many .class files that contain bytecode. this bytecode is then JIT compiled by the JVM into machine code your processor can execute.

.NET is very similar to Java, and the .exe files that Visual Studio generate basically bundle the CIL compiled code so that this CLR can basically do the same thing with it.

naturally, I would expect a java executable on windows to behave the same. bundle the necessary .class files into a .exe file, extract its contents into memory and call upon the JVM execute that shit.

Java code doesn't link against Windows shared objects so that's definitely not a problem.

if you wanted to implement something like this yourself, you would then write a program (in C or whatever) that does what I just described. but thankfully somebody's already done it for you.

http://launch4j.sourceforge.net/
>>
That .jar extension just looks like shit. The moment I see it I know I'm in for a standard shitty default gradient java GUI design.
>>
>>56480370
>the extension looks like shit
nice autism you got there
>>
>>56480370
Java is a backend language

anybody using or programming Java GUI desktop applications should stop
>>
>>56480370
>use Python
>use fucking tkinter and ttk
>looks native
Java is a joke
>>
/g/ is getting weirder every day, be it the Pajeets, sandniggers, chonkies, slavs, or other vile creatures from the third world.
>>
>>56480209
>Never because I don't think I have any Java applications installed
You would be surprised, wrappers are a magical thing.
>>
File: sega.jpg (27KB, 318x447px) Image search: [Google]
sega.jpg
27KB, 318x447px
>>56478801
>>
>>56480774
...said retard from fourth world...
>>
>>56478849
maybe you should get comfortable with maven. I guess the 40 jars that are lying around are third party libs. They shouldn't be lying around, they should be managed by maven or any other build managers like gradle or even ant if you are a fag.

Then you should ask yourself if you really need an .exe and what for. The only reason I can see, is if you have a product and you want to bundle a specific jvm with it. Otherwise just use the jar's directly. As far as I can tell most of these .exe wrappers aren't free and a bit of a pain to use.
>>
>>56478629
If you want to be lazy about it, google JarSplice.

It should be said that making an EXE from a JAR kind of defeats the purpose of Java but whatever.
>>
>>56479230
If COBOL is a good programming language, why isn't any new code being written in it?
>>
Write a c program that checks for Java if it exists then make a syscall at jre to run the Java class
>>
>>56478629
use launch4j
>>
>>56478629
post in the sqt instead of shitting up the board
Thread posts: 54
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.