Java Extension

  

hi, 

can anyone assist me with how to create a java extension, once the action is created a java file is also created for inserting customized code, my problem is that code needs to reference .jar files and outsystems does not seem to find theses jars even when it is added in the extension and is present in the lib folder, I have tried using netbeans and eclipse to correct this code but it returns as an error because it can't reference the jars

What is the exact error you are receiving?

Claring wrote:

What is the exact error you are receiving?

in the java file when im adding the code it is returning an error because it is not referencing in the jar file so its unknown, like if you dont declare a variable and try to use it, it will return cannot find symbol in the same way the jar file is not being referenced for the functions used in it 


Imraan Ismail wrote:

Claring wrote:

What is the exact error you are receiving?

in the java file when im adding the code it is returning an error because it is not referencing in the jar file so its unknown, like if you dont declare a variable and try to use it, it will return cannot find symbol in the same way the jar file is not being referenced for the functions used in it 



Ah I see, you could try to upload the jar files to an ESpace as recources. Then in your java extension you load the url at which they are located.


I actually haven't  tried my hand at java extensions for Outsystems yet, since our systems run on a .net stack, but if I have some extra free time I'll take a look at this.

Claring wrote:

Imraan Ismail wrote:

Claring wrote:

What is the exact error you are receiving?

in the java file when im adding the code it is returning an error because it is not referencing in the jar file so its unknown, like if you dont declare a variable and try to use it, it will return cannot find symbol in the same way the jar file is not being referenced for the functions used in it 



Ah I see, you could try to upload the jar files to an ESpace as recources. Then in your java extension you load the url at which they are located.


I actually haven't  tried my hand at java extensions for Outsystems yet, since our systems run on a .net stack, but if I have some extra free time I'll take a look at this.

i have attempted the first option and it still brings it back with the same problem, the reason i believe is because the java IDE uses the lib folder created in the project but because outsystems generates its own java file it does not have a typical java project structure so the IDE struggles to find the libraries, i am well aware of the problem but i have no idea what project structure outsystems uses in the case of java so my problem lies on the outsystems structure  


Hmm, my plan was to map out the structure of the outsystems directories.

Then you could try to locate where the jar files are placed.

Also, this might be a stupid question, but are you sure the java code is working on your local machine?

Claring wrote:

Hmm, my plan was to map out the structure of the outsystems directories.

Then you could try to locate where the jar files are placed.

Also, this might be a stupid question, but are you sure the java code is working on your local machine?

i do know where the jar files are located but the program is not referencing it, and yes i'm trying to add existing code from an application that does work into actions to use on outsystems 


Solution

i just found out that outsystems are removing this function in the next update, but other than that it is useless and does not work, complete pile of crap even the stuff created with the action doesnt work this is before any alterations have been made. So its pointless to even try to get it working 

Solution