i want to know how to make a jar app which will run on java mobile platform using class file of java.
i know basics of java like inheritance,interface,string…..I tried this thing by compiling my java program of simple input/output and then converting it to jar using -jar in cmd.but i dont know why it is not working on mobile showing invalid file.
plz help me.
i want to know how to make a jar app which will run on
Share
If you want to create a jar application, starting from a java class,you don’t have to use
java -jar filename.jar, this is only for execution.Try this:
jar cf your_jar_app.jar your_class_file.classcoption is needed to create file andfoption is needed because you want an output file.Then you can execute typing:
java -jar your_jar_app.jarHope this can help you.
For documentation: Oracle Documentation for creating JAR file
If you are using NetBeans IDE, take a look to: NetBeans Packaging and Deploying Java Applications