This question already has answers here:
How to import a jar in Eclipse?
(11 answers)
Closed 4 years ago.
I have JDBC driver connected to my Eclipse project. According to MS manual I need to set claspath for JDBC. How to do this in Eclipse? I suppose it should be somewhere in run configuration, but I can't find it. Where I can set classpath in Eclipse?
I need to set CLASSPATH environment variable and not just add jar file. I can connect to SQL server from my project while LOG4J library can't. I suppose since it loads driver at runtime.
Project menu -> Properties -> Java Build Path
You can add .jar files to your classpath in the Libraries tab
Related
This question already has answers here:
Get source JARs from Maven repository
(20 answers)
Closed 6 years ago.
Is there any way to view the source code of existing jars like those in Maven dependencies in Eclipse.
How is it possible to browse on the libs and view the source codes?
You can use Java decompiler plugin (Jad). It will decompile class file and you can see source code. This plugin can be easily integrated with eclipse
You can use below link to configure Jad in eclipse
http://www.mkyong.com/java/java-decompiler-plugin-for-eclipse/
This question already has an answer here:
How to export an Eclipse Project with External Jar dependencies?
(1 answer)
Closed 8 years ago.
I have developed a program that includes external jars also. Now I need to convert this program to a runnable jar (It has main method) and place it another location.
But how to include the external dependencies along with this conversion . I dont want other to download the external jars again and again.
Regards,
Siva
Right click on your project then go to Export -> Java -> Runnable JAR File and there select Package Required libraries into generated JAR radio box
This question already has answers here:
How to create a Jar file in Netbeans
(4 answers)
Closed 9 years ago.
I created a java project using netbeansIDE. Now I want to convert it into an .exe file, but I need to convert the java project into a .jar file first, since java project can't be compiled into a .exe file directly it can be only be converted to exe from jar file. So how shall I convert java project into a .jar file. Please answer in detail since I am a beginer in java programing.
Thank You.
If you are using Netbeans IDE then you can easily build a jar file of your project.
Just go to Run in the Menu above and select clean and build.
Now goto to you project folder, find Dist folder inside it and there you have your .jar file.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How can I convert my Java program to an .exe file?
I have Java project and will making a setup file to my project. İn my procet I have a jar file which runs my project. whan can I do to create a setup file to my Netbeans Java Project
There are software convert from jar to exe like JAR2EXE but it's not setup file
Check out Launch4J which will create an Windows executable from a Java JAR file.
This question already has answers here:
How to add directory to classpath in an application run profile in IntelliJ IDEA?
(8 answers)
Closed 9 years ago.
In IntelliJ, I have setup a runtime configuration for a Java (console) application. I need to add the directory c:/tmp to the classpath that the app is run with. I guess I need to add -cp c:/tmp to one of the boxes in this dialog, but I can't figure out which one:
Classpath is configured in the Module Dependencies.
The classpath is a VM parameter, so it should belong in there. However, I'm unsure whether you can overwrite the classpath at all using this technique...
If you want to specify the classpath for adding additional jars, you should use libraries instead.
Also, are you sure you want to change the classpath and not the working folder? (The classpath determines where to find classes, the working folder defines the starting directory of your application.)