you need to setup CLASSPATH to your JAR file and then you will be able to compile your code simple way
peter_budo
Code tags enforcer
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 901
As I said previously you need to set CLASSPATH to location of JAR file. By doing so you tell your machine where the JAR can be found. So what you do is as follow:
Start > Control Panel > System
here select tab Advanced > Environment Variables
In system variables check if you have CLASSPATH, if not press New
In Variable name : type in capitals CLASSPATH and in Variable value : insert full path yo your JAR file which can be for example like this C:\Development\Custom_lib\swing-layout-1.0.jar;
I would recomend you restart your machine as this changes do not always take place after editing so it is better to restart system. Once this done you can compile your code as simple as this javac mycode.java
peter_budo
Code tags enforcer
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 901
You can also set the classpath as a parameter when you execute javac:
javac -cp "c:/program..swing-layout-1.0.jar" myCode.java
Ezzaral
Posting Genius
15,985 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847