0

I am a newbie on Nokia development. I tried to create a Service like in https://projects.developer.nokia.com/notificationsapi/wiki/ServiceSampleJava but I have more problem about that. I tried to compile MyService? .java like this:

java -cp .:httpclient-4.0.1.jar:apache-mime4j-0.6.jar:commons-codec-1.3.jar:commons-logging-1.1.1.jar:httpcore-4.0.1.jar:/lib/httpmime-4.0.1.jar MyService? "payload:Test Notification from REST API" "jid:nnapi_testuser@ovi.com" “application_id:com.example” “service_id:example.com” “service_secret:WcbOlf05YCSyy0d4I9nBHSkE+vXRGJxjw90E/KpXLJ0=”

I have result errors like this:

Exception in thread "main" java.lang.NoClassDefFoundError?: :apache-mime4j-0/6/jar Caused by: java.lang.ClassNotFoundException?: :apache-mime4j-0.6.jar

at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController?.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader?.loadClass(ClassLoader?.java:321) at sun.misc.Launcher$AppClassLoader?.loadClass(Launcher.java:294) at java.lang.ClassLoader?.loadClass(ClassLoader?.java:266)

Could not find the main class: :apache-mime4j-0.6.jar. Program will exit.

What can I do to fix these errors?

Brock Adams
  • 90,639
  • 22
  • 233
  • 295
SanScript
  • 1
  • 2

1 Answers1

0

You're using a colon : to separate your libs. You need to use a semi-colon ;. You might have other errors as well, but let's start there.

Per tools doc -cp classpath Specify a list of directories, JAR archives, and ZIP archives to search for class files. Class path entries are separated by semicolons (;). Specifying -classpath or -cp overrides any setting of the CLASSPATH environment variable.

Preston
  • 3,273
  • 4
  • 26
  • 35
  • Ok.. i was successfully about my code. this compile error cause i'am using this (”), should this code using (") no (”). Thanks about your attention sir. – SanScript Aug 29 '11 at 21:37
  • Great to hear. Throw it in an answer and accept it so the question closes. – Preston Aug 29 '11 at 21:59