Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / February 2006

Tip: Looking for answers? Try searching our database.

myjavaserver and JAR files

Thread view: 
phillip.s.powell@gmail.com - 13 Feb 2006 09:08 GMT
Does anyone know whether or not myjavaserver.com allows for storage and
utilization of JAR files? I need to be able to import tcl.lang.* within
one of my classes and have no ability to do so (keep getting
NoClassDefFoundError tcl/lang/TclException.

Do I need to create a /tcl/lang folder and place the JAR file in it for
it to work?

What do you advise?

Thanx
Phil
Thomas Hawtin - 13 Feb 2006 09:43 GMT
> Does anyone know whether or not myjavaserver.com allows for storage and
> utilization of JAR files? I need to be able to import tcl.lang.* within
[quoted text clipped - 3 lines]
> Do I need to create a /tcl/lang folder and place the JAR file in it for
> it to work?

If I remember correctly (forgot my password so can't check), all your
classes need to be in a package name starting with your account name.

So either ask to have the TCL libraries added, or rename them somehow.

Come to think of it, you could use URLClassLoader.newInstance to load
the libraries, but you would need all your code that uses TCL to be
loaded by the same class loader.

Tom Hawtin
Signature

Unemployed English Java programmer
http://jroller.com/page/tackline/

phillip.s.powell@gmail.com - 13 Feb 2006 15:35 GMT
> > Does anyone know whether or not myjavaserver.com allows for storage and
> > utilization of JAR files? I need to be able to import tcl.lang.* within
[quoted text clipped - 12 lines]
> the libraries, but you would need all your code that uses TCL to be
> loaded by the same class loader.

How would I use URLClassLoader? Would I instantiate that within each
class that uses TCL?

Phil

> Tom Hawtin
> --
> Unemployed English Java programmer
> http://jroller.com/page/tackline/
Thomas Hawtin - 13 Feb 2006 16:48 GMT
> How would I use URLClassLoader? Would I instantiate that within each
> class that uses TCL?

You would need to create one instance (with URLClassLoader.newInstance),
which would load all of the TCL library and all of your code that uses
it. I've not tried it, so I can't be sure myjavaserver permits the
technique.

Tom Hawtin
Signature

Unemployed English Java programmer
http://jroller.com/page/tackline/

phillip.s.powell@gmail.com - 14 Feb 2006 06:46 GMT
> > How would I use URLClassLoader? Would I instantiate that within each
> > class that uses TCL?
[quoted text clipped - 3 lines]
> it. I've not tried it, so I can't be sure myjavaserver permits the
> technique.

So I would have a "wrapper class" that would have
URLClassLoader.newInstance that would load the TCL library, code, etc.

Or would I have, in my original class (in this case, HTMLParser), a
URLClassLoader.newInstance that loads the TCL libraries, etc.?
Assuming I do not import, would I have to call any classes via
tcl.lang.* like

URLClassLoader.newInstance();
//...

tcl.lang.Interp interp = new tcl.lang.Interp();

Phil

> Tom Hawtin
> --
> Unemployed English Java programmer
> http://jroller.com/page/tackline/


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.