1

I've started a new project and I have a .bat file to run my application. I happen to use linux, so I can't use .bat files (and I'd prefer not to make a .sh file unless I have to). Could someone show me how to set up my run configurations so that my application will run through IntelliJ 12? I've tried a couple things and I keep getting this error:

    Error: Could not find or load main class com.intellij.rt.execution.application.AppMain

Here is the line from the .bat file:

    java -Xmx1500m -XX:+DisableExplicitGC -noverify -cp bin;libs/* com.rs2.Server localhost 43594 600

And this is what I've tried in IntelliJ:

(I can't post pictures sorry, here's the link) https://i.stack.imgur.com/eOp4o.jpg

Kuto
  • 21
  • 1
  • 5
  • I'm a little confused as to what you're trying to accomplish. If you have the source code, you don't *need* to run your application through any convoluted script - you can just make and run and you're good to go. If you don't, then editing the source code in any IDE, let alone IntelliJ, would be really painful. Perhaps letting us know what you're trying to use IntelliJ for would help. – Makoto Dec 22 '12 at 20:59
  • I'm using IntelliJ to write my code in? I don't understand what your saying. This specific program is a server. – Kuto Dec 22 '12 at 21:05
  • If it's a server, and you don't have the source code, then why do you need an IDE? – Makoto Dec 22 '12 at 21:09

1 Answers1

1

The semi-colon is a path separator on Windows machines only. If you want to add things to your path in *Nix (including Mac), then you want to use the colon character.

Here's what your configuration would look like:

java -Xmx1500m -XX:+DisableExplicitGC -noverify -cp bin:libs/* com.rs2.Server localhost 43594 600
Makoto
  • 104,088
  • 27
  • 192
  • 230
  • This worked, although now I'm getting errors with my libraries. Is there no possible way of running this through IntelliJ? – Kuto Dec 22 '12 at 21:17
  • Depends on what the errors are. Remember, you do have to have all of the appropriate JARs and libraries somewhere on your path, if they require third party JARs/libraries before you can compile and run code. – Makoto Dec 22 '12 at 21:18