71 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./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
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 upUnknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Well, you need to build it different. How do you build it? Maven?
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
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/)Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
yes
go to the usage page for details (https://maven.apache.org/plugins/maven-assembly-plugin/usage.html)
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
you add it to your pom.xml
if you don't know how plugins work, I suggest learning about that first.
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
well do you have a pom.xml?
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
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
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
because that's the rules lol
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
are you looking for a justification as to why it's there?
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
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 thatUnknown User•16mo ago
Message Not Public
Sign In & Join Server To View
because you haven't installed maven
try the maven wrapper in your project instead
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
try it
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
show your manifest tags
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
so can you show that class?
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
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 classUnknown User•16mo ago
Message Not Public
Sign In & Join Server To View
yes
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
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
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
run
./mvnw clean package
and try againUnknown User•16mo ago
Message Not Public
Sign In & Join Server To View
./mvnw
the ./ is importantUnknown User•16mo ago
Message Not Public
Sign In & Join Server To View
hmmm
well I guess just use your IDE to run the commands
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
yes
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
the same error?
can you show your entire pom.xml file?
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
I don't see anything wrong there. if you're up to sending the entire codebase I can look at it
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
I'm going to send a pull request
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
I created a working fork
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
that's for creating an image
it's like to create native images
not jars
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
but seriously, merge my fork and you good.
Unknown User•16mo 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
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
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•16mo ago
Message Not Public
Sign In & Join Server To View
what did you do exactly?
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
what is the error?
make sure you actually pulled from the remote repository
I updated the remote repository
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
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.
Unknown User•16mo 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.