Setting the Java class path?

522 vues
Accéder directement au premier message non lu

Bitcoin Broker

non lue,
14 juin 2016, 14:15:1414/06/2016
à Lucee
Not quite sure how to set the path for java classes on the server. 

Igal @ Lucee.org

non lue,
14 juin 2016, 14:18:5414/06/2016
à lu...@googlegroups.com

That depends on your setup, especially operating system etc.


Igal Sapir
Lucee Core Developer
Lucee.org

On 6/14/2016 11:12 AM, Bitcoin Broker wrote:
Not quite sure how to set the path for java classes on the server. 
--
Win a ticket to dev.objective from Lucee via Twitter, see http://bit.ly/1UbTMWj for details, good luck and see you there...
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/5c928db4-adbf-4820-844d-8b527a81bf25%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bitcoin Broker

non lue,
14 juin 2016, 14:24:2314/06/2016
à Lucee
I'm running Lucee on Windows 10 with CommandBox. Is that what you want? Pardon me, I'm quite new at this.

Rory Laitila

non lue,
14 juin 2016, 15:21:1514/06/2016
à Lucee
No worries. "set the path for java classes" can imply a number of things. What are you trying to accomplish specifically? (use a Java class from Lucee? Tell Java to look in a different directory for classes?) 

Bitcoin Broker

non lue,
14 juin 2016, 15:58:2414/06/2016
à Lucee
I'm trying to tell the Lucee server where to look for for Java classes that I want to use

Rory Laitila

non lue,
14 juin 2016, 16:48:4414/06/2016
à Lucee
Gotcha. The method Iike to use is to define in my Application.cfc where to find the jar files, so that my jars can be portable with my application and I don't need to copy them to server directories. 

//Application.cfc
//LoadPaths - Array of paths to jar files or directory
component
{this.javaSettings = {LoadPaths = [".\java_lib\",".\java\myjar.jar"]}
}


You can also put them in the Lucee lib folders for the whole server, or per context. Use can use the directory placeholders (ex. {lucee-web}) to find these paths on any Lucee install dynamically. Here are where my directories show up for my commandbox installation.


<cfscript>
<!--- Web Context --->
echo(expandPath('{lucee-web}/lib')); //C:\Users\Rory\.CommandBox\server\A9F9212AEA00D070AA3482E81E747F69\lib
<!--- Server Context --->
echo(expandPath('{lucee-server}/lib') & "
<br />"); //C:\Users\Rory\.CommandBox\engine\cfml\server\lucee-server\context\lib
</cfscript>
Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message