Windows command line Error(SOLVED),but how to add LWJGL?

I am trying to create a runnable jar file. I am using multiple classes and packages.

Windows 7 32-bit. jdk1.7.0_17. jre7.

I am using windows prompt, because i guess there is no other way to create runnable jar file with multiple classes. Right now i am getting this:
C:\Users\Admin\LudumDareDone\bin>java -jar “ludum.jar”
Error: Could not find or load main class Main

i have this manifest:
Manifest-Version: 1.0
Created-By:
Main-Class: Main.java

i applied it with this command:
jar cfm ludum.jar manifest.mf

What i should do? Maybe there is other way to create runnable jar file with multiple classes? I searched answer in Google, but i cant find anything usefull, please give me direct links or answer.

IDEs have the option to generate a runnable jar from Your project.
Your current issue is that You need to define a fully qualified class name: “com.my.package.Main”
Class is the the class object, the structure You are using within Your program, as such “Main.java” is not what is needed in that location.

Sorry for stupid question, but i think i am doing something wrong here. What is fully qualified class name?
Currently, i have this:
MyJavaProject
----src
--------(default package)
------------Main.java

How fully qualified class name should look like?

EDIT:
i am using eclipse

Hi

Rather put that into your manifest:

[quote]Main-Class: Main
[/quote]
Whatever your IDE is, try to understand what happens under the hood.

Fully qualified class name consist of package name and class name. As in my previous post “com.my.package” is package name and “Main” is the class name.
Package translates 1:1 to the folder structure, so for the given package “com.my.package” the folder structure would be like this

Project
|_ src
|_ com
|_ my
|package
|
Main.java

In Your example, You are not using package so Your fully qualified class name is the same as the simple form “Main”

Why package names ? It’s a form of namespace. Imagine using 7 different libraries, non using packages and everyone having a “Main” class. How would You tell Your program, which one to use ?
That’s why there are packages. All libraries and programs in java world are in packages. There are also other benefits
http://docs.oracle.com/javase/tutorial/java/package/index.html

I just meant that “.java” has nothing to do in the manifest attribute “Main-Class”.

try a manifest:


Manifest-Version: 1.0
Class-Path: .
Main-Class: Main

using the manifest name

MANIFEST.MF
in the folder META-INF

Now i think i have another problem:

Exception in thread “main” java.lang.NoClassDefFoundError: org/lwjgl/LWJGLExcept
ion
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2451)
at java.lang.Class.getMethod0(Class.java:2694)
at java.lang.Class.getMethod(Class.java:1622)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)

Caused by: java.lang.ClassNotFoundException: org.lwjgl.LWJGLException
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
… 6 more

EDIT:
What i should do? Where is problem? Or maybe there is another way to create runnable jar file with multiple classes?

I think i finaly done that, but i tried simple program with pure java. I want to add lwjgl. How i should do that?

It’s explained here:
http://docs.oracle.com/javase/tutorial/deployment/jar/downman.html

[quote]Class-Path: MyUtils.jar
[/quote]
Edit.: Don’t forget to do something for the native libraries.

Maybe you, or somebody else know other tutorial? I would like more examples and maybe something what i can try instant.