123 Replies
⌛ This post has been reserved for your question.
Hey @lip! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
Where do you got that jar from?
the jar doesnt tell java which class its supposed to run
you need to either specify the class manually
java -cp CurrencyTranslator.jar the.main.Class or get a jar that is properly set upi built it
Well, you need to build it different. How do you build it? Maven?
I just compiled it
And took the JAR
With Maven
You are using mvn package?
What is the class name and package of your Main-Methode?
you could use a maven plugin for building the jar correctly.
mvn package on it's own isn't going to make it executable.
check out maven-assembly-plugin (https://maven.apache.org/plugins/maven-assembly-plugin/)Is this a plugin
yes
go to the usage page for details (https://maven.apache.org/plugins/maven-assembly-plugin/usage.html)
Do i need to install it from my IDE or its default plugin
you add it to your pom.xml
if you don't know how plugins work, I suggest learning about that first.
From where
I dont understand anything
well do you have a pom.xml?
Yep
so the usage page walks you through adding the plugin to your pom.xml
just read the whole thing and ask any questions if you're stuck
Why is it inside of build section
because that's the rules lol
I didnt understand <descriptorRefs>
I understand the other ones but not this one
are you looking for a justification as to why it's there?
Yep
Is it like the thing which compiles project and dependencies
it's just semantics
the
<descriptorRef>jar-with-dependencies</descriptorRef> is a "prefabricated assembly descriptor" and you're just using those tags so the plugin knows thatWhy console responds me like this when i use mvn

because you haven't installed maven
try the maven wrapper in your project instead

So what is the right jar
try it
it gives exception

show your manifest tags

so can you show that class?
ahh
so with JavaFx there is an extra step
you need to make a new class with a main method and have that call CurrencyTranslator's main method
I usually call it
Launcher
then that would be your main class
like that?
yes
but didnt work
once again
make sure you updated your pom with this as the new class
oh
I overlooked the fact you're using the command uncorrectly
this I think is still a necessary step though

run
./mvnw clean package and try again
how do install this
./mvnw
the ./ is important
hmmm
well I guess just use your IDE to run the commands
yep i did it

like that
yes
i do it like that but still didnt work
the same error?
can you show your entire pom.xml file?
I don't see anything wrong there. if you're up to sending the entire codebase I can look at it
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
GitHub
GitHub - limpeex/Currency-Conversion: An application where you can ...
An application where you can convert three different foreign exchange rates: TRY, USD and EUR. - limpeex/Currency-Conversion
It is this except pom is old
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Intellij ide
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
yep
with maven
clean and package
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
That is the old one i didnt even use maven to compile it i just was up to run it via IDE
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
No i somehow was able to make it executable one time but i copy pasted it and dont remember when i did it
i moslty used it for dependencies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
i tried it
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View

I think it is about javafx
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
yep
no checked
is shading still available on maven?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View

Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I'm going to send a pull request
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I created a working fork
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View

What is this i ddnt get this
that's for creating an image
it's like to create native images
not jars
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
but seriously, merge my fork and you good.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
wdym
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
add me to the project so I can create a pull request and you can merge it
I configured it for you
my username is Carter907
how do i do that
i sent
there I merged it for you
now run
mvn clean package and run the jar in the target folder
I set it to jdk 18 if that's not what you're using. use something different but you have everything you need to create an execuable jar file now.Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
can you try to do it
it still didnt work for me
what did you do exactly?
opened the project and did clean and package
and then java -jar <file>
from ide terminal
what is the error?
make sure you actually pulled from the remote repository
I updated the remote repository
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
It says unable to access jarfile
nope
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View

Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
ah wait
worked
yep you solved it
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
wait lemme try it from cmd
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
yep i was in the wrong directory
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
but how am i going to open it up by double click
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View

Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
wdym newfile
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
yeah it works but how do i open it by double clicking
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Okay thanks let me watch
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
@KyfStore
@Kar.Jar
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Thank you both for helping and your time
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.