Java .jar question help please?
-
Ok so I know a fair amount of Java and have decided to take into learning to make applets and also connecting to databases. I have xampp with mySQL on my computer and Eclipse too. I can use the database a little (still learning sql commands but I'm getting there). I made a simple applet that gets a single value from a database and increases it by one, displays it as the number of hits on the site, and then puts the increased value back into the db. Anyways, I can get the program to run fine with the little "applet viewer" on eclipse because I have the Connector/J external .jar in the build path but when I compile with cmd, obviously it isn't in the build path. I have looked at a few things on how to compile with external .jars but none seemed to work. can you please give me the EXACT command I would type to compile it (just say file.jar and file.java) Oh and the .jar is in the same folder.
-
Answer:
Creating a jar File in Command Prompt (1) Start Command Prompt. (2) Navigate to the folder that holds your class files: C:\>cd \mywork (3) Compile your class(es): C:\mywork> javac *.java (4) Create a manifest file: C:\mywork> echo Main-Class: YOUR_CLASS_NAME >manifest.txt (5) Create a jar file: C:\mywork> jar cvfm YOUR_CLASS_NAME.jar manifest.txt *.class (6) Test your jar: C:\mywork> YOUR_CLASS_NAME.jar
.#include <keperkjr> at Yahoo! Answers Visit the source
Related Q & A:
- I did something really bad and now i need help please help me.Best solution by Yahoo! Answers
- The accounting cycle? Help please?Best solution by Yahoo! Answers
- Psp custom firmware help. please?Best solution by Yahoo! Answers
- Msn signing in help please?Best solution by Yahoo! Answers
- Ice Skating Spin Help Please?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.