I have written some small programs and I am attempting to make my first runnable JAR file. The program will run fine within Netbeans and Eclipse. However, when I create my runnable JAR, the resultant JAR gives me an error saying that the program can't find my main class when I try and execute it. What I don't understand is how the compiler can find my main class to compile the program and yet the final executable code can't find it to run it? Is there some file I can open up and type my class locations into by hand?
Also, on a related not, I was hoping someone might be able to help me with something. So far, the books I have found about Java programming only talk about coding and not a lot about how to configure my settings in the IDE (which consume about 95% of my time spent on the subject). So far, I like coding and grinding out a solution in code and feel that I haven't struggled nearly as much on the material in the books I've worked through as I have on battling with configurations and IDE settings and such, yet I find it a lot easier to find reading material and instructional posts about coding than I do about the more difficult issues.
Can anoyone here recommend any good books on Eclipse or Netbeans?
If you are new to Java™, you would do better to forget IDEs and get a decent text editor (eg gedit, NotePad2, NotePad++). Set its options to automatic indentation (change 1 tab to 4 spaces), bracket and syntax highlighting. Use that to edit your Java™ text and run it from the command line. That way you won’t spend 95% of your time on the IDE.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com