AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Netbeans JAR file execution from command line

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help
View previous topic :: View next topic  
Author Message
Luc The Perverse
Guest





PostPosted: Thu Oct 26, 2006 7:11 am    Post subject: Netbeans JAR file execution from command line Reply with quote



I needed to run a program I created called RandomPasswordGen and it wouldn't
run because it said it couldn't find some necessary classes, which I tracked
down to some swing layout jar file in netbeans.

Eventually I copied all the netbeans files into the sun java directory. I
have a feeling that is not the standard way of going about this.

How can I prevent a compatibility problem? I like to send people JAR files
to execute, and don't want them to have to have netbeans installed and
certainly don't want them to have to copy files from netbeans to java class
path.

What is the proper way to go about this?

--
LTP

:)
Back to top
Andrew Thompson
Guest





PostPosted: Thu Oct 26, 2006 7:11 am    Post subject: Re: Netbeans JAR file execution from command line Reply with quote



Luc The Perverse wrote:
Quote:
I needed to run a program I created called RandomPasswordGen and it wouldn't
run because it said it couldn't find some necessary classes, which I tracked
down to some swing layout jar file in netbeans.

Eventually I copied all the netbeans files into the sun java directory. I
have a feeling that is not the standard way of going about this.

How can I prevent a compatibility problem? I like to send people JAR files
to execute, and don't want them to have to have netbeans installed and
certainly don't want them to have to copy files from netbeans to java class
path.

What is the proper way to go about this?

'proper'? Dunno'.. here are several possible strategies..

- Rework your GUI's to not require the NB classes (which
are usually form generators? ..layouts?).
- Launch your GUI's using web start and refer to the
NB classes in a separate 'component' JNLP *.
- Put a manifest in the main jar that references the NB jars*
(and distribute them with your application, and put them
somewhere they can be found)
- Rejar the NB classes* in your main jar file.

* check NB docs. for (re)distrib. rights.

I would go for the first option.

Andrew T.
Back to top
Lion-O
Guest





PostPosted: Thu Oct 26, 2006 11:09 pm    Post subject: Re: Netbeans JAR file execution from command line Reply with quote



Quote:
How can I prevent a compatibility problem? I like to send people JAR
files to execute, and don't want them to have to have netbeans
installed and certainly don't want them to have to copy files from
netbeans to java class path.

Which NB version?

Normally NetBeans will put the compiled jar and all libraries it might
need in the 'dist' subdirectory of your projects home. Extra libraries
are stored in the dist/lib subdirectory. Also refer to the 'README.TXT'
file which explains as much.

The manifest file in the jar defines a classpath which includes optional
jar files in the lib subdirectory.

If those files aren't there then I wonder if your project has been
properly setup.

--
Groetjes, Peter

..\\ PGP/GPG key: http://www.catslair.org/pubkey.asc
Back to top
Luc The Perverse
Guest





PostPosted: Fri Oct 27, 2006 12:39 am    Post subject: Re: Netbeans JAR file execution from command line Reply with quote

"Lion-O" <nosp (AT) m (DOT) catslair.org> wrote in message
news:slrnek1udu.5cb.nosp (AT) ubuntu (DOT) intranet.lan...
Quote:
How can I prevent a compatibility problem? I like to send people JAR
files to execute, and don't want them to have to have netbeans
installed and certainly don't want them to have to copy files from
netbeans to java class path.

Which NB version?

Normally NetBeans will put the compiled jar and all libraries it might
need in the 'dist' subdirectory of your projects home. Extra libraries
are stored in the dist/lib subdirectory. Also refer to the 'README.TXT'
file which explains as much.

The manifest file in the jar defines a classpath which includes optional
jar files in the lib subdirectory.

If those files aren't there then I wonder if your project has been
properly setup.

In that case I likely just grabbed the wrong JAR file (and because it worked
on my system, I was thrown off)

--
LTP

:)
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.