• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

classpath (what?, why? and how?)

 
Prithiraj Sen Gupta
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello.

1. What is classpath?
2. Why Should we use classpath?
3. How should we declare the classpath?
4. What is the difference in...


AND


5. How should I set the classpath so that my Java Program should read it?

6. Suppose I have to import oracle thin client "classes12.jar" in my java programme what should I have to do after downloading the jar file.

I am ASP.NET programmer.. But never done a project in Java. So I am learnging java and doing a Project. I dont have knowledge about adding things to the library. I would be happy if I get a response.

7. I am doing a project in java swing. Later, when I have to make .exe of my project how should I add the jar files (e.g classes12.jar) to it. should I have to copy and and paste the jar files separately so that my class files will able to read that?

I will be more happy on getting hyperlinks related to my Queries..

Thanks & Regards

Prithiraj Sen Gupta
[ December 20, 2007: Message edited by: Prithiraj Sen Gupta ]
 
Prithiraj Sen Gupta
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if Possible answer 7th question.

Thanks & Regards

Prithiraj Sen Gupta
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Per the spec and Sun implementations, Java doesn't generate exe files. You can find tools that do ... Google for "Java to exe" for examples.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15448
41
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Prithiraj Sen Gupta:
7. I am doing a project in java swing. Later, when I have to make .exe of my project how should I add the jar files (e.g classes12.jar) to it. should I have to copy and and paste the jar files separately so that my class files will able to read that?

classes12.jar doesn't have anything to do with Swing. Swing is part of the standard Java API and you don't need any third-party JAR files to use Swing. classes12.jar sounds like the Oracle JDBC driver.

Normally, you don't create an .exe file when you program in Java. You just create a JAR file that contains the compiled classes of your program. If your program needs extra libraries, you'll have to distribute them together with your application and make sure they're in the classpath when the program is run.

For more information on packaging your application in a JAR file, see:
The Java Tutorial - Packaging Programs in JAR Files
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic