how to javac mycode.java and swing-layout-1.0.jar

Reply

Join Date: Jun 2007
Posts: 8
Reputation: dajiebuda is an unknown quantity at this point 
Solved Threads: 0
dajiebuda dajiebuda is offline Offline
Newbie Poster

how to javac mycode.java and swing-layout-1.0.jar

 
0
  #1
Jun 18th, 2007
I have a code generated with netBeans. It use org.jdesktop.layout. I have the file swing-layout-1.0.jar. But I don't know how to compile and run mycode.jave with that jar file.
Please write full comands if possible. I'm so new to java that every step use me 2 hours - 2 days. Thanks a lot.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,126
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 472
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: how to javac mycode.java and swing-layout-1.0.jar

 
0
  #2
Jun 18th, 2007
you need to setup CLASSPATH to your JAR file and then you will be able to compile your code simple way
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 8
Reputation: dajiebuda is an unknown quantity at this point 
Solved Threads: 0
dajiebuda dajiebuda is offline Offline
Newbie Poster

Re: how to javac mycode.java and swing-layout-1.0.jar

 
0
  #3
Jun 18th, 2007
my code is in fold Myfold. the jar file is in another fold c:\programs...

I run javac in c:\myfold.

I need to complie both mycode and the jar code together. Please tell me what I can do.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,126
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 472
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: how to javac mycode.java and swing-layout-1.0.jar

 
0
  #4
Jun 18th, 2007
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
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 4,364
Reputation: Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of 
Solved Threads: 500
Moderator
Featured Poster
Ezzaral's Avatar
Ezzaral Ezzaral is offline Offline
Industrious Poster

Re: how to javac mycode.java and swing-layout-1.0.jar

 
0
  #5
Jun 18th, 2007
You can also set the classpath as a parameter when you execute javac:
  1. javac -cp "c:/program..swing-layout-1.0.jar" myCode.java
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC