Xojo Conferences
XDCMay2019MiamiUSA

[MBS] Java plugin (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] Odd error with an pdfViewMBS of pdfkit
Next thread: [MBS] CheckCache Plugin crashing RS 2012r1.2


[MBS] QLPreviewViewMBS   -   Garth Hjelte
  [MBS] Java plugin   -   tiramisu rockisland.com
   Re: [MBS] Java plugin   -   Christian Schmitz
   Re: [MBS] Java plugin   -   tiramisu rockisland.com
   Re: [MBS] Java plugin   -   tiramisu rockisland.com
   Re: [MBS] Java plugin   -   tiramisu rockisland.com
   Re: [MBS] Java plugin   -   Basil Bourque
   Re: [MBS] Java plugin   -   Christian Schmitz
   Re: [MBS] Java plugin   -   tiramisu rockisland.com
   Re: [MBS] Java plugin   -   Christian Schmitz

[MBS] Java plugin
Date: 14.01.13 20:51 (Mon, 14 Jan 2013 11:51:31 -0800)
From: tiramisu rockisland.com
Hello,

I am currently using the shell command to run a java .jar file but it is
very slow. It is any faster to use the MBS plugin and have it embedded in
my program?

Thanks,

M

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Java plugin
Date: 18.01.13 08:02 (Fri, 18 Jan 2013 08:02:05 +0100)
From: Christian Schmitz

Am 16.01.2013 um 22:11 schrieb <email address removed>:

> Basil,
>
> I repacked the .jar file into something smaller with no odd hierarchy
> (using Pacifist). So it is just RunEquity.class and still MBS cannot find
> the classname. Do you think this still could be some kind of classpath
> problem or ?

Maybe.

Well, we load classes like this:

Dim system As JavaClassMBS = javaVm.FindClass("java/lang/System")

So path of class in with slashes.

Greetings
Christian

Re: [MBS] Java plugin
Date: 16.01.13 22:11 (Wed, 16 Jan 2013 13:11:01 -0800)
From: tiramisu rockisland.com
Basil,

I repacked the .jar file into something smaller with no odd hierarchy
(using Pacifist). So it is just RunEquity.class and still MBS cannot find
the classname. Do you think this still could be some kind of classpath
problem or ?

I do not work in Java and just want to use these classes that are not
available in C (if they where I could create a dylib and declare into it
with RS)

Thanks

>>> I used JarZilla to find the class names and they are listed like this:
>>>
>>> propokertools/cli/RunEquity.class
>
> ? and ?
>

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Java plugin
Date: 16.01.13 20:22 (Wed, 16 Jan 2013 11:22:19 -0800)
From: tiramisu rockisland.com
Hi Christian,

I have tried other .jar files and I still get the same nil cant find class
error. It will init but that is it. This is the code I am using:

const JNI_VERSION_1_1 = &h00010001
const JNI_VERSION_1_2 = &h00010002
const JNI_VERSION_1_4 = &h00010004

dim options(-1) as string
dim f as FolderItem=GetFolderItem("Equity.jar")
dim jclass as JavaClassMBS

vm=new JavaVMMBS(JNI_VERSION_1_4, options, f, false)

if vm.Handle = 0 then
MsgBox "Can't create Java VM"
else
MsgBox "Java Initialized."
end if

jclass=vm.FindClass("RunEquity")

if jclass=nil then msgbox "Can't find it" else msgbox "I found it"

any other ideas would be appreciated.

Thanks
>
> Am 14.01.2013 um 20:51 schrieb <email address removed>:
>
>> Hello,
>>
>> I am currently using the shell command to run a java .jar file but it is
>> very slow. It is any faster to use the MBS plugin and have it embedded
>> in
>> my program?
>
> Well, you can load classes from jar file with our plugins and call
> methods.
>
> Not sure if that will be faster.
>
> Greetings
> Christian
>
> --
> Read our blog about news on our plugins:
>
> http://www.mbsplugins.de/
>
> _______________________________________________
> Mbsplugins_monkeybreadsoftware.info mailing list
> <email address removed>
> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
>

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Java plugin
Date: 14.01.13 23:53 (Mon, 14 Jan 2013 14:53:38 -0800)
From: tiramisu rockisland.com
Hi Basil,

I tried that string and still no luck. I will continue to fiddle around
with it. Thanks for your help.

>>> I used JarZilla to find the class names and they are listed like this:
>>>
>>> propokertools/cli/RunEquity.class
>
> ? and ?
>
>>> I tried searching for just "RunEquity" and the entire above string and
>>> got
>>> a nil cant find class error. Any ideas?
>>
>> Try "propokertools/cli/RunEquity".
>
> The ?RunEquity.class? refers to files on you Mac/PC machine, while
> ?RunEquity? refers to a class *inside* the Java Virtual Machine.
>
> If using Java, you should read up a bit about ?ClassPath?.
>
> ClassPath is the JVM?s list of all the classes that are currently
> available to a running Java program. Those classes may have been loaded
> into the JVM in various ways from many various sources (.class files, .jar
> files, .war files, and more). To the running Java program, where the
> classes were loaded from is irrelevant ? either the class your program
> needs is loaded (?on the ClassPath?) and available by class name (without
> ?.class?) or not. The trick is that to get your Java program running, you
> have to tell where in the disk file system to find the .class file, and
> that means referring to ?.class? or ?.jar? file names.
>
> Context is key:
> ? Outside the JVM, think files (.class, .jar, etc.)
> ? Inside the JVM, think classes.
>
> ?Basil Bourque
>
> _______________________________________________
> Mbsplugins_monkeybreadsoftware.info mailing list
> <email address removed>
> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
>

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Java plugin
Date: 14.01.13 23:38 (Mon, 14 Jan 2013 14:38:10 -0800)
From: Basil Bourque
>> I used JarZilla to find the class names and they are listed like this:
>>
>> propokertools/cli/RunEquity.class

… and …

>> I tried searching for just "RunEquity" and the entire above string and got
>> a nil cant find class error. Any ideas?
>
>
> Try "propokertools/cli/RunEquity".

The “RunEquity.class” refers to files on you Mac/PC machine, while “RunEquity” refers to a class *inside* the Java Virtual Machine.

If using Java, you should read up a bit about “ClassPath”.

ClassPath is the JVM’s list of all the classes that are currently available to a running Java program. Those classes may have been loaded into the JVM in various ways from many various sources (.class files, .jar files, .war files, and more). To the running Java program, where the classes were loaded from is irrelevant — either the class your program needs is loaded (“on the ClassPath”) and available by class name (without “.class”) or not. The trick is that to get your Java program running, you have to tell where in the disk file system to find the .class file, and that means referring to “.class” or “.jar” file names.

Context is key:
• Outside the JVM, think files (.class, .jar, etc.)
• Inside the JVM, think classes.

—Basil Bourque

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Java plugin
Date: 14.01.13 23:23 (Mon, 14 Jan 2013 23:23:49 +0100)
From: Christian Schmitz

Am 14.01.2013 um 23:10 schrieb <email address removed>:

> Hi Christian,
>
> I tried searching for just "RunEquity" and the entire above string and got
> a nil cant find class error. Any ideas?

Try "propokertools/cli/RunEquity".

Greetings
Christian

Re: [MBS] Java plugin
Date: 14.01.13 23:10 (Mon, 14 Jan 2013 14:10:18 -0800)
From: tiramisu rockisland.com
Hi Christian,

I got the jar file to load but it cannot find any of the classes within it.

I used JarZilla to find the class names and they are listed like this:

propokertools/cli/RunEquity.class

I tried searching for just "RunEquity" and the entire above string and got
a nil cant find class error. Any ideas?

Thanks

>
> Am 14.01.2013 um 20:51 schrieb <email address removed>:
>
>> Hello,
>>
>> I am currently using the shell command to run a java .jar file but it is
>> very slow. It is any faster to use the MBS plugin and have it embedded
>> in
>> my program?
>
> Well, you can load classes from jar file with our plugins and call
> methods.
>
> Not sure if that will be faster.
>
> Greetings
> Christian
>
> --
> Read our blog about news on our plugins:
>
> http://www.mbsplugins.de/
>
> _______________________________________________
> Mbsplugins_monkeybreadsoftware.info mailing list
> <email address removed>
> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
>

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Java plugin
Date: 14.01.13 21:04 (Mon, 14 Jan 2013 21:04:31 +0100)
From: Christian Schmitz

Am 14.01.2013 um 20:51 schrieb <email address removed>:

> Hello,
>
> I am currently using the shell command to run a java .jar file but it is
> very slow. It is any faster to use the MBS plugin and have it embedded in
> my program?

Well, you can load classes from jar file with our plugins and call methods.

Not sure if that will be faster.

Greetings
Christian