Launch application Java

I made an application using bluetooth and so I had to use external libraries (bluecove). I am now looking to create a single executable to be able to give it to testers. I tested the executable JAR and it does not work, so I flip on a basic script.

I created a folder with all the java files inside and my external library and a folder with my pictures in it.

when I compile I have no error:

javac-cp bluecove-2.1.0.jar *. java

But in execution:

java -cp bluecove-2.1.0.jar Main

it gives me "error: Could not find or load main class Main"! I'm sur that my class contain my Main function Main.

What strange me is that in eclipse everything goes perfectly but not outside.

All those who have an idea and a hand to me is to thank in advance;)


java -cp "bluecove-2.1.0.jar;." Main


java -cp "bluecove-2.1.0.jar:." Main

Note the . which indicates the current directory, it must be also on the classpath so that your class Main can be loaded.

Need Your Help

Deploy OSX application compiled using GCC 4.6

c++ osx gcc libstdc++

I'm trying to port a project of mine on Mac OS-X.

Symfony2 (doctrine2) native sql insert

symfony2 doctrine doctrine2 persistence

How to insert data in symfony2 doctrine2 on native sql?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.