HendrikHoetker / OutlookItemTransfer

MIT License
2 stars 1 forks source link

Cannot compile with SWT 4.23 #2

Open Treeston opened 2 years ago

Treeston commented 2 years ago

I am unable to compile this library with the current SWT version (4.23). Apparently it relies on Eclipse internals which no longer exist.

[ERROR] oss/win32ole/outlookitemtransfer/CompoundStorage.java:[5,42] cannot find symbol
[ERROR]   symbol:   class IEnumSTATSTG
[ERROR]   location: package org.eclipse.swt.internal.ole.win32
[ERROR] oss/win32ole/outlookitemtransfer/CompoundStorage.java:[7,42] cannot find symbol
[ERROR]   symbol:   class STATSTG
[ERROR]   location: package org.eclipse.swt.internal.ole.win32
[ERROR] oss/win32ole/outlookitemtransfer/OutlookItemTransferFactory.java:[3,33] package com.bosch.pmtoolbox.utils does not exist
[ERROR] oss/win32ole/outlookitemtransfer/CompoundStorage.java:[49,28] cannot find symbol
[ERROR]   symbol:   method EnumElements(int,int,int,long[])
[ERROR]   location: variable storage of type org.eclipse.swt.internal.ole.win32.IStorage
[ERROR] oss/win32ole/outlookitemtransfer/CompoundStorage.java:[71,49] cannot find symbol
[ERROR]   symbol:   variable STGTY_STREAM
[ERROR]   location: class org.eclipse.swt.internal.ole.win32.COM
[ERROR] oss/win32ole/outlookitemtransfer/CompoundStorage.java:[87,49] cannot find symbol
[ERROR]   symbol:   variable STGTY_STORAGE
[ERROR]   location: class org.eclipse.swt.internal.ole.win32.COM
[ERROR] oss/win32ole/outlookitemtransfer/CompoundStorage.java:[92,68] cannot find symbol
[ERROR]   symbol:   method OpenStorage(java.lang.String,int,int,<nulltype>,int,long[])
[ERROR]   location: variable storage of type org.eclipse.swt.internal.ole.win32.IStorage
HendrikHoetker commented 2 years ago

Sorry to learn that this is not working anymore. Yes, it was using an older library of SWT. More critical than platform dependency is the issue of version dependency. I cannot provide a solution for this anymore, although I have the same problem now in an JavaFX project. There I will do it differently: Those native things will be handled in helper-tools (platform-OS executables). For the drop of outlook items another process will be started and accepting the drop from outlook. Vice versa there is another platform OS tool which uses an input stream to create a new outlook mail with attachment. These things are really native code and Java is not really suitable for the OLE stuff. It's better to use C#. It's similar to Java and quite easy to implement these things there. From Java you can than control the windows native app.

Sorry that I don't have a better proposal or a quick solution. Hope this brings you further.

HendrikHoetker commented 2 years ago

I leave this code here to show what I summarized from several sources and give you further hints potentially helping you to find own solutions.

Kershi23 commented 2 years ago

Outlooktransfer PST to Office 365 Migration tool. The application migrates all data from the outlook migration tool free https://www.outlooktransfer.com/ file to Exchange Online primary or archive mailbox in a few steps, preserving all folder hierarchy and email properties. It also provides a message filtering option to access specific emails to export PST file data.