Include all the classes of a Custom Package

Hi,

Can we include all the classes of a custom Package, in Servoy.

Just like import statement do in Java.

Can We?

What exactly is it you want to do?

I want to use some classes of that Package in my Application.

Like an Example,
I can access Font class by supplying the code

var my_font = java.awt.Font('Times Roman',1,10);

Maybe this gets you started: ClassWrapper Plugin: Create Plugins with No Java Coding! - Classic Servoy - Servoy Community

EXAMPLE USAGE
To use the utility jars in the ClassWrapper folder, you must first
use the Packages statement to get a new instance of the object.
The statement depends on the jar that you are using. An example
for the pf.jar to get in instance of the StringUtil class is

//get a new instance of StringUtil from Servoys Package loader
var myObject = Packages.org.pf.text.StringUtil.current()

//use the plugin to show methods in StringUtil
var isNull = myObject.isNullOrEmpty(“test”)

Hi,
Patrick,
I have gone through the topic.
It is really nice.
But i am not getting the code for creating an instance of a class.

var myObject = Packages.org.pf.text.StringUtil.current()

Please Help.

What do you mean by

But i am not getting the code for creating an instance of a class.

That mean,
yaa, now i am able to see the classes of that package under DDCClass Wrapper Plugin.
But how can i create an instance of a class.
So that i will use the methods or varibles present in the class.

Just as described in the post I gave you.

A remark: every question you ask here is about Java. Servoy is a tool that is built on Java, but not especially meant to be used with Java, but JavaScript. I think all these questions about JComponents, using external classes etc. should go to a forum that deals with Java.

Yaa,
i got the solution.