Thread: Trying to create Jar with IntelliJ

Results 1 to 6 of 6
  1. #1 Trying to create Jar with IntelliJ 
    Registered Member
    Join Date
    Mar 2019
    Posts
    4
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Hello Rune-Server, I am trying to create a jar file to be able to open up my client using IntelliJ. The client will run within IntelliJ but it wont open on my Desktop. When you click the client it literally doesn't do anything.
    I'm new to this program so I haven't got everything figured out yet, if anyone could give me some pointers that would be great!

    Attached image

    Attached image
    Reply With Quote  
     

  2. #2  
    Registered Member
    TheChosenOne's Avatar
    Join Date
    Jan 2013
    Posts
    967
    Thanks given
    47
    Thanks received
    161
    Rep Power
    366
    Open up the command line/terminal window (in windows: <windows key> + <r> and run 'cmd').
    Then run the jar with: 'java -jar <full file name including directory and .jar extension>'.

    This will run the jar in the command line and you'll be able to see any exceptions that pop up.
    That might give a clue about why it doesn't work.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Mar 2019
    Posts
    4
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    This is what it's showing. Even though I have the most recent java update...

    "C:\Users\josht>java -jar C:\Users\josht\Desktop\RSPS\client\out\artifacts\K aos_jar\client.jar
    'java' is not recognized as an internal or external command,
    operable program or batch file."
    Reply With Quote  
     

  4. #4  
    ¦¦¦ RuneTimes ¦¦¦

    RainDropzZ's Avatar
    Join Date
    Oct 2010
    Posts
    389
    Thanks given
    31
    Thanks received
    108
    Rep Power
    556
    Quote Originally Posted by Kaos Rsps View Post
    This is what it's showing. Even though I have the most recent java update...

    "C:\Users\josht>java -jar C:\Users\josht\Desktop\RSPS\client\out\artifacts\K aos_jar\client.jar
    'java' is not recognized as an internal or external command,
    operable program or batch file."

    That means you need to set your enviroment variables for java.
    Reply With Quote  
     

  5. #5  
    Registered Member
    TheChosenOne's Avatar
    Join Date
    Jan 2013
    Posts
    967
    Thanks given
    47
    Thanks received
    161
    Rep Power
    366
    What RainDropzZ said is true but not required. And not related to the problem.
    Either you add java to your system environment variables (in Windows 10 search for 'environment variables' it should suggest 'Edit the system environment variables'. Click that and then click on the 'Environment Variables...' button.
    The screen that opens up should be divided in 2 sections. The lower section (the one with 'System Variables') is the one you need.
    Click 'New...' and type 'JAVA' as 'Variable name' and the path to your java application in the 'Variable value' section.
    The path is the one where you placed your JRE (Java Runtime Environment) OR you JDK (Java Development Kit) is located.
    Mine is located at 'D:\Program Files\Java\jdk-11.0.2\bin'.

    After you've clicked on 'Ok' (and prehaps after a restart) the command should work.
    Alternatively you write the full path in front of the 'java' command instead.
    Don't forget to put it between quotes if you have spaces in your path name:

    "D:\Program Files\Java\jdk-11.0.2\bin\java" -jar C:\Users\josht\Desktop\RSPS\client\out\artifacts\K aos_jar\client.jar

    If that's successful you should see the output on the command line. And that will probably tell you what's wrong.
    Reply With Quote  
     

  6. #6  
    Super Donator

    Join Date
    Dec 2014
    Posts
    71
    Thanks given
    19
    Thanks received
    12
    Rep Power
    41
    Quote Originally Posted by Kaos Rsps View Post
    This is what it's showing. Even though I have the most recent java update...

    "C:\Users\josht>java -jar C:\Users\josht\Desktop\RSPS\client\out\artifacts\K aos_jar\client.jar
    'java' is not recognized as an internal or external command,
    operable program or batch file."
    try writting in the cmd "path [your java bath in C:\]" then do the jar command that TheChosenOne told you about.. might work
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. When trying to create a class file..
    By PvMLegacyTyler in forum Help
    Replies: 2
    Last Post: 10-15-2012, 10:22 AM
  2. Replies: 17
    Last Post: 05-22-2012, 07:43 PM
  3. Partner to create server with
    By Classic Matt in forum Requests
    Replies: 8
    Last Post: 07-14-2011, 05:53 PM
  4. Replies: 21
    Last Post: 03-18-2009, 06:51 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •