Jump to content

can't run java project in intellij

technovore
Go to solution Solved by technovore,

thanks for the quick response everyone.
Sadly I must dissapoint you, I did not find the solution, but a guy from my team bundles our code all over again and now it works if I do the git clone thingy.

Hi, I'm a computer science student and I'm using intellij (not my choice, I prefer netbeans) for a java project.

I can run other projects just fine (with the necessary jre fiddling).

 

But for this project I can't click the RUN button. QDJOD2L.png

 

 

 

java is set up just fine

R5GcBk4.pngI get this annoying bugger if I click the run button.

8JBn5py.png

Grammar nazis are people too!
Treat your local grammar nazi nicely and he might teach you a thing or two. (Note that I'm Belgian and not a native English speaker.)
Chivalry isn't dead!

Link to comment
Share on other sites

Link to post
Share on other sites

It could be up to the code itself.

Link to comment
Share on other sites

Link to post
Share on other sites

It could be up to the code itself.

it runs for my friends

Grammar nazis are people too!
Treat your local grammar nazi nicely and he might teach you a thing or two. (Note that I'm Belgian and not a native English speaker.)
Chivalry isn't dead!

Link to comment
Share on other sites

Link to post
Share on other sites

Also intellij wants you to set up run configurations. You're getting that popup because it doesn't have any configurations yet. Add a configuration with main claas, jvm arguments etc.

Link to comment
Share on other sites

Link to post
Share on other sites

Right click the class with the main in the project structure and select run from there.

Link to comment
Share on other sites

Link to post
Share on other sites

Your SDK is set to 1.7 but your language is set to 1.6

Pretty sure that's valid in IntelliJ. I guess there could be problems if he's using any 1.7 only feature but I expect that would be a compiler error. 

Link to comment
Share on other sites

Link to post
Share on other sites

Pretty sure that's valid in IntelliJ. I guess there could be problems if he's using any 1.7 only feature but I expect that would be a compiler error. 

 

Regardless of if he was using any 1.7 features I'm pretty sure code compiled for JDK 1.7 won't run on JRE 6. The other way round maybe but not that situation.

Link to comment
Share on other sites

Link to post
Share on other sites

thanks for the quick response everyone.
Sadly I must dissapoint you, I did not find the solution, but a guy from my team bundles our code all over again and now it works if I do the git clone thingy.

Grammar nazis are people too!
Treat your local grammar nazi nicely and he might teach you a thing or two. (Note that I'm Belgian and not a native English speaker.)
Chivalry isn't dead!

Link to comment
Share on other sites

Link to post
Share on other sites

thanks for the quick response everyone.

Sadly I must dissapoint you, I did not find the solution, but a guy from my team bundles our code all over again and now it works if I do the git clone thingy.

 

The solution is to set up run configurations. How is intellij going to know what to run if you don't tell it?

Link to comment
Share on other sites

Link to post
Share on other sites

The solution is to set up run configurations. How is intellij going to know what to run if you don't tell it?

I tried RMB on my startup class which has a main method...same problem

but as stated before, it's now magically fixed

Grammar nazis are people too!
Treat your local grammar nazi nicely and he might teach you a thing or two. (Note that I'm Belgian and not a native English speaker.)
Chivalry isn't dead!

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×