# get path C:\\Program Files\\Servoy\\application\_server\\

**URL:** <https://forum.servoy.com/t/get-path-c-program-files-servoy-application-server/12580>\
**Category:** Classic Servoy\
**Created:** [August 3, 2010, 4:22pm UTC](https://forum.servoy.com/t/get-path-c-program-files-servoy-application-server/12580 "2010-08-03T16:22:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tokajac](https://avatars.discourse-cdn.com/v4/letter/t/838e76/32.png) [@Tokajac](https://forum.servoy.com/u/Tokajac)\
**Post date:** [August 3, 2010, 4:22pm UTC](https://forum.servoy.com/t/get-path-c-program-files-servoy-application-server/12580/1 "2010-08-03T16:22:19Z")

</div>

Hello,

Developing myplugin that will be exported to myplugin.jar and in it’s code it loads C:\Program Files\Servoy\application\_server\plugins\myplugin\additional.jar

Usual layout in the application\_server\plugins folder:  
application\_server\plugins\myplugin.jar  
application\_server\plugins\myplugin.jar.jnlp  
application\_server\plugins\myplugin\additional.jar

How can i read the path to C:\Program Files\Servoy\application\_server\plugins\myplugin\ ?  
As Servoy install dir might differ on other machines.

This part of the code does exactly what i need, but seems a bit clumsy:

```auto
	var f = plugins.file.convertToJSFile('deleteThisTempFile.txt')
	var i_occurrence = utils.stringPatternCount(f.getAbsoluteFile().getParent(), 'developer')
	var tillCut = utils.stringPosition(f.getAbsoluteFile().getParent(), 'developer', 0, i_occurrence)	
	
	var appServer = utils.stringLeft(f.getAbsoluteFile().getParent(), tillCut-1)+'application_server'
	application.output( 'appServerPath: ' + appServer )
	plugins.file.deleteFile(f)

```

Is there is a simpler way to reach C:\Program Files\Servoy\application\_server\ path?

Regards

---

<div class="post-metadata">

**Author:** ![ptalbot](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/ptalbot/32/4952_2.png) [@ptalbot](https://forum.servoy.com/u/ptalbot)\
**Post date:** [August 3, 2010, 5:23pm UTC](https://forum.servoy.com/t/get-path-c-program-files-servoy-application-server/12580/2 "2010-08-03T17:23:57Z")

</div>

Beware that the code you use here is only working because you are using it in Developer, the c:/Program files/etc… you refer to here is located on the client side.

But why do you need to know the server path that contains the jars on the server?

This path doesn’t make sense for a client anyway, and the jars in /plugins are loaded on the client side + those declared in your jnlp are loaded also on the client side.

I can’t imagine any use case for that. Could you tell us what you are trying to achieve?
