Setting the Java class path?

517 views
Skip to first unread message

Bitcoin Broker

unread,
Jun 14, 2016, 2:15:14 PM6/14/16
to Lucee
Not quite sure how to set the path for java classes on the server. 

Igal @ Lucee.org

unread,
Jun 14, 2016, 2:18:54 PM6/14/16
to 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

unread,
Jun 14, 2016, 2:24:23 PM6/14/16
to 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

unread,
Jun 14, 2016, 3:21:15 PM6/14/16
to 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

unread,
Jun 14, 2016, 3:58:24 PM6/14/16
to Lucee
I'm trying to tell the Lucee server where to look for for Java classes that I want to use

Rory Laitila

unread,
Jun 14, 2016, 4:48:44 PM6/14/16
to 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>
Reply all
Reply to author
Forward
0 new messages