Виртуальная песочница (тм)

Wednesday, June 16, 2010

How to create executable jar in NetBeans IDE

Why use a Eclipse if you can use a well-suited, fast and optimized out-of-the-box-IDE?
Вот и у меня тоже такие вопросы очень часто возникают... Действительно, why? И почему Eclipse всё ещё настолько широко используется для Java проектов?..

Easy as pie: (Netbeans 5.5)
right-click your project, "set main project", select your project,
"File", "PROJECTNAME Properties", "Run",
set your main class,
"Libraries", "Add JAR/Folder", select your wanted libs,
do a CLEAN build,
enter the build-path, enter /dist and be amazed --> DONE!

No Modifications/Hacks/buggy DiY-IDE´s, no cry

Вся фишка в том, чтобы сделать clean build - тогда оно само всё создаёт, и каталог, и архив. Read more...

Simulated Annealing (Алгоритм имитации отжига)

"Example. Given 100 workers and 500 jobs, find which workers should do what jobs to minimize the distance driven by all 100 workers. The location of jobs and starting location of all workers will have available their longitude and latitude, and a simple equation exists to calculate distance between longitude and latitude. Other constraints include skills, varying length of jobs, return to starting point with 8 hours, and several others. The Simulated Annealing technique (алгоритм имитации отжига) is a common way to solve this type of problem."

"На форуме, имхо, давно используется алгоритм имитации отжига. Постится хрень и идет расчет на то что - а вдруг она сойдет за отжиг? Мда. Было давно и всегда." :)

См. также

Read more...