0

I am trying to install java and eclipse for the 2nd time on the same computer. I downloaded the java file from here: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html and eclipse from here: https://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/lunasr1 When setting the environment variable something goes wrong. The system variable "path" is totally different from the one in the tutorial that I watched, and I don't know how to go from here. Also I couldn't find any similar problem on this forum...

File path looks like this:

C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x64;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Java\jdk

In eclipse when I try to compile my work, this pops up:

The selection cannot be launched, and there are no recent launches.

So, what is it that i've done wrong, could it be some old files from the previous java installation causing all this trouble maybe? Or is it the environment variable? (btw i use windows 8 on bootcamp)

Thanks in advance!

Valise

seenukarthi
  • 8,241
  • 10
  • 47
  • 68
Valise
  • 1
  • 3
  • possible duplicate of ["Selection cannot be launched and there are no recent launches” when Eclipse for Android Project Dev](http://stackoverflow.com/questions/9240333/selection-cannot-be-launched-and-there-are-no-recent-launches-when-eclipse-for) – Ryanas Sep 28 '14 at 08:46
  • 1
    You might consider removing the first Java and Eclipse installs before attempting to install them again. There's no telling based on the information you've provided what your problem actually is. Showing us the contents of your PATH isn't sufficient on its own. You should verify that you have only one javac and java runtime. Then come back with letting us know where that tutorial you watched is located. – WineSoaked Sep 28 '14 at 08:54
  • Thanks Ryan for pointing that out. I found that thread earlier today, but couldn't quite understand how to do it properly. I clicked on run -> run configurations and there my project name was written under "project:", but I had no idea as to what i was supposed to write under "Main class:"...So, the question remains, could it be my environment variable being incorrect, because i find it very strange that it is completely different from the 2 videos from other people on youtube. – Valise Sep 28 '14 at 08:56
  • @WineSoaked here are the links to the 2 tutorials i have watched: http://www.youtube.com/watch?v=CijsBUrIkw4 and http://www.youtube.com/watch?v=Hl-zzrqQoSE&list=PLFE2CE09D83EE3E28 and there is only one instance each of javac and runtime :). – Valise Sep 28 '14 at 09:01

1 Answers1

0

In eclipse when I try to compile my work

Try to RUN, no?

Right click on your project -> Run As.. -> Java Application

Otherwise, Eclipse does not known what you when to do ;)

ben.12
  • 51
  • 2
  • When clicking on "run as" there are no alternatives showing, it says "(none applicable)" – Valise Sep 28 '14 at 09:00
  • You must create a Java Project with a class containing main method. public class MainClass { public static void main(String[] args){} } – ben.12 Sep 28 '14 at 09:05
  • Thanks for replying! Now i get some errors instead: Warning: The environment variable HOME is not set. The following directory will be used to store the Git Warning: The environment variable HOME is not set. The following directory will be used to store the Git I'll try to deal with this later this afternoon, but thanks for all the help this far! – Valise Sep 28 '14 at 09:19