Quantcast

Weka for Mac Java executable

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Weka for Mac Java executable

Simon Zhu
I have installed Weka for Mac, and I see that the Mac application comes with a bundled JRE. How can I run my own java program in this JRE? I am working on a package for Weka, and I want to be able to spawn a new process to run a java program, but I can’t find any java executable in the jre folder.

-- 
Simon Zhu

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Weka for Mac Java executable

Michael Hall
On Jan 10, 2017, at 2:03 AM, Simon Zhu <[hidden email]> wrote:

I am working on a package for Weka

I believe Weka Explorer will load your package and run it with the embedded jre?

For use outside Explorer you would probably want to install a recent release of the java 8 jre/jdk.

ls /Applications/weka-3-8-1-oracle-jvm.app/Contents/PlugIns
jdk1.8.0_112.jdk

Normally an exact match to the _112 shouldn’t really be necessary, and might be difficult to match as Oracle rolls out java 8 updates.

The application installer for Weka probably strips out the java executable to save space. You could possibly install the java 8 jre yourself on your machine and if it is itself compatible to the Weka version you could copy the java executable from that into the Weka application bundle and then run with the exact same JRE as the weka application. A lot of effort if you don’t really have a compatibility issue between different java 1.8 versions that you are concerned with.

Michael Hall





_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Weka for Mac Java executable

Simon Zhu
Not exactly for use outside explorer, but I am wondering if, after Weka Explorer loads my package, it is possible for my code to start another process that runs with the embedded jre? Normally, I would get the location of the directory containing the jre that my package is running in and then run the java executable located in that directory, but that doesn’t work in this case. So is there any other method to achieve this?

-- 
Simon Zhu

On January 10, 2017 at 1:39:21 AM, Michael Hall ([hidden email]) wrote:

On Jan 10, 2017, at 2:03 AM, Simon Zhu <[hidden email]> wrote:

I am working on a package for Weka

I believe Weka Explorer will load your package and run it with the embedded jre?

For use outside Explorer you would probably want to install a recent release of the java 8 jre/jdk.

ls /Applications/weka-3-8-1-oracle-jvm.app/Contents/PlugIns
jdk1.8.0_112.jdk

Normally an exact match to the _112 shouldn’t really be necessary, and might be difficult to match as Oracle rolls out java 8 updates.

The application installer for Weka probably strips out the java executable to save space. You could possibly install the java 8 jre yourself on your machine and if it is itself compatible to the Weka version you could copy the java executable from that into the Weka application bundle and then run with the exact same JRE as the weka application. A lot of effort if you don’t really have a compatibility issue between different java 1.8 versions that you are concerned with.

Michael Hall




_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Weka for Mac Java executable

Michael Hall
On Jan 10, 2017, at 1:12 PM, Simon Zhu <[hidden email]> wrote:

Not exactly for use outside explorer, but I am wondering if, after Weka Explorer loads my package, it is possible for my code to start another process that runs with the embedded jre? Normally, I would get the location of the directory containing the jre that my package is running in and then run the java executable located in that directory, but that doesn’t work in this case. So is there any other method to achieve this?

You runtime exec java? If that is only way to run this other process you might try adding the executable command to the Weka application JRE.
I think the normal install puts one at…

ls /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java
The jdk should also install one you could copy.

Copy one of these into the Weka application bundle. This should work for you but I’m not sure about anyone else using the package.

Maybe something not requiring the java executable command would be better. What is the process you are trying to start and why does it have to run as a process?

Michael Hall





_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Loading...